Link to home
Start Free TrialLog in
Avatar of wilsj
wilsj

asked on

snmp and nagios

Hey All,
OS = fedora core 6
software = nagios 2.7

Having a little problem getting snmp to work with nagios. I want to use the check_snmp_disk plugin evertime I issue this command (check_snmp_disk -H localhost -C community) it tells me no disks found. I then try to do and snmp walk like this snmpwalk -v 1 localhost -c l00n3t00n$ .1.3.6.1.4.1.2021.9 and I don't get any output from it. If I go up one number ie. .1.3.6.1.4.1.2021.10 I get the information for load and if I change the 10 to a 4 I get the output for mem usage so I know that snmp is working. Any ideas on why it will not print out the stats for the disk usuage? Thanks in advance.
Avatar of Arty K
Arty K
Flag of Kazakhstan image

If you use net-snmp, probably it wasn't compiled with 'ucd-snmp/disk' module as described here: http://net-snmp.sourceforge.net/docs/man/snmpd.conf.html#lbAP

You may use 'snmpdf' to check if snmp-df querying works: http://net-snmp.sourceforge.net/docs/man/snmpdf.html

Avatar of wilsj
wilsj

ASKER

Ok I found out I do have ucd-snmp/disk. It should be default from what I read. The problem I am having now it I can run this from the CLI check_snmp_disk -H hostip -C password and I get Checked 1 disks.

but if I enter the command into commands.cfg and also into services.cfg I get this check_snmp_disk: Could not fetch list of disks . Here are my commands.cfg and services.cfg for this command. Is my format wrong. because if I try check_snmp_disk with the wrong password I get the same error. Can nagios process passwords with symbols? ie #$%

commands.cfg
#'check_snmp_disk' command definition
define command{
        command_name    check_snmp_disk
        command_line    $USER1$/check_snmp_disk -H $HOSTADDRESS$ -C $ARG1$
        }

services.cfg
define service{
        use                             local-service
        host_name                       hostname
        service_description             SMNP_CHECK_DISK
        check_command                   check_snmp_disk!password
        }
Avatar of wilsj

ASKER

Thats it. Nagios has a problem reading symbols in the password. That sucks. I still only get checked 1 disk as the outcome do you know how I would get the percentages of the disk like the percentage of disk left or used?
Avatar of wilsj

ASKER

I finally figured it out. I don't know if the plugin I have isn't capable of it but I downloaded a different plugin that in my opinion is a lot better. here is the link to the page where I got my new plugins. Just incase anyone else comes across this post.

http://nagios.manubulon.com/index_snmp.html

Thanks for all your help.
ASKER CERTIFIED SOLUTION
Avatar of Arty K
Arty K
Flag of Kazakhstan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of wilsj

ASKER

I guess this question can be refunded then?
Yes, ask in community support area to refund.