Solved

snmp and nagios

Posted on 2007-03-21
7
2,722 Views
Last Modified: 2012-08-14
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.
0
Comment
Question by:wilsj
  • 4
  • 3
7 Comments
 
LVL 27

Expert Comment

by:Nopius
ID: 18769071
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

0
 
LVL 5

Author Comment

by:wilsj
ID: 18771576
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
        }
0
 
LVL 5

Author Comment

by:wilsj
ID: 18771621
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?
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 5

Author Comment

by:wilsj
ID: 18780098
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.
0
 
LVL 27

Accepted Solution

by:
Nopius earned 500 total points
ID: 18784864
Hi, wilsj.
I didn't help you much, you found a solution yourself, which is much better :-)
Have a nice holidays.
0
 
LVL 5

Author Comment

by:wilsj
ID: 18813080
I guess this question can be refunded then?
0
 
LVL 27

Expert Comment

by:Nopius
ID: 18813125
Yes, ask in community support area to refund.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now