0

I'm taking over a nagios server and trying to figure out where the previous admin kept his snmpv3 user and password variables, would anyone have a clue where the standard location for this is?

2 Answers 2

1

Given how extremely flexible nagios is they could be almost anywhere.

T I would look first include the resources.cfg which is a file generally used to define global variables to be used anywhere in nagios. I would then look at the SNMP service definition, a host definition that is using NSMP, and command definition for your command that is performing the SNMP check.

You might find them: - Pass as part part of the service defintion. In the service you might see something like check_command check_snmp!username!password. - hard coded in the the command resource that does the SNMP checking.

In any case if you look at the command for the SNMP check command then it should be pretty that it is either hard coded in the check command definition, or you should see the variable name being used. Once you find the variable name then you simply need to look in the correct place for that variable.

If you are not sure, you can update your question which exactly what you have for the check snmp command, and we should be able to give you a better idea.

0

If you're using the Nagios check_snmp command, or something else based on Net-SNMP, check the locations described in the snmp_config(5) manpage. By default, they are:

  1. /usr/local/etc/snmp (or possibly /etc/snmp)
  2. /usr/local/share/snmp (or /usr/share/snmp)
  3. /usr/local/lib/snmp (or /usr/lib/snmp or /usr/lib64/snmp)
  4. $HOME/.snmp

Failing that, your check scripts might be setting a custom location with the $SNMPCONFPATH environment variable.

Regardless of the location, the file to look for is either snmp.conf or snmp.local.conf. The configuration options you're probably interested in are:

  • defVersion
  • defSecurityLevel
  • defAuthType
  • defAuthPassphrase
  • defPrivType
  • defPrivPassphrase
1
  • I'm going to leave my answer up, because it's correct in the general sense. However, with respect to Panerai's specific question, it may not be. It turns out that if SNMPv3 is being used, check_snmp requires the user to specify the username, authentication password, and privacy password. It will not even bother to invoke snmpget if these arguments are not received, even if snmpget would do the right thing. If Panerai's Nagios installation is using check_snmp, Zoredache's answer will be more helpful than mine. Jan 10, 2014 at 21:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .