04-11-2013
SOLVED Nagios snmp_check problem
SOLVED
First problem was the service definition were I added a register 0 definition. This is only used for macros.
Service Definition
define service{
use generic-service
name CPU-stats
check_command snmp_cpustats!supersecreto
service_description CPU Stats
host_name nagios02
notification_interval 0
notification_options c,r
notification_period 24x7
}
define service{
use generic-service
name CPU Load
check_command snmp_load!supersecreto!70!90
service_description CPU Load
host_name nagios02
notification_interval 0
notification_options c,r
notification_period 24x7
}
And the second problem was that the in the command definition the -C community parameter is not been taken by the check_snmp command giving a time out
# 'snmp_load' command definition
define command{
command_name snmp_load
command_line /usr/lib/nagios/plugins/check_snmp -H '$HOSTADDRESS$' -C
'$ARG1$' -o .1.3.6.1.4.1.2021.10.1.5.1,.1.3.6.1.4.1.2021.10.1. 5.2,.1.3.6.1.4.1.
2021.10.1.5.3 -w :'$ARG2$',:'$ARG3$',:'$ARG4$' -c :'$ARG5$',:'$ARG6$',:'$ARG7$'
-l load
}
# 'snmp_cpustats' command definition
define command{
command_name snmp_cpustats
command_line /usr/lib/nagios/plugins/check_snmp -H '$HOSTADDRESS$' -C
'$ARG1$' -o .1.3.6.1.4.1.2021.11.9.0,.1.3.6.1.4.1.2021.11.10.0 ,.1.3.6.1.4.1.202
1.11.11.0 -l 'CPU usage (user system idle)' -u '%'
}
After change this and harcode the community everything worked!!!
# 'snmp_load' command definition
define command{
command_name snmp_load
command_line /usr/lib/nagios/plugins/check_snmp -H '$HOSTADDRESS$' -C
supersecreto -o .1.3.6.1.4.1.2021.10.1.5.1,.1.3.6.1.4.1.2021.10.1. 5.2,.1.3.6.1.
4.1.2021.10.1.5.3 -w :'$ARG1$',:'$ARG2$',:'$ARG3$' -c :'$ARG4$',:'$ARG5$',:'$ARG
6$' -l load
}
# 'snmp_cpustats' command definition
define command{
command_name snmp_cpustats
command_line /usr/lib/nagios/plugins/check_snmp -H '$HOSTADDRESS$' -C
supersecreto -o .1.3.6.1.4.1.2021.11.9.0,.1.3.6.1.4.1.2021.11.10.0 ,.1.3.6.1.4.1
.2021.11.11.0 -l 'CPU usage (user system idle)' -u '%'
}
10 More Discussions You Might Find Interesting
1. Solaris
Hi ,
I want a clear a detailed manual or installation guide pls for Nagios .
I tried many time to use the original manual but the commands is related to linux i think ,,
I am using Solaris 9
Regards
Adel (2 Replies)
Discussion started by: ArabOracle.com
2 Replies
2. Solaris
Dear Members,
i make setup for nagios under linux Ubuntu Server 9.04 box
i when i try to install NRPE on Unix Box
i found this error
1- first step for installation
-bash-3.00# pwd
/download/nrpe-2.12
-bash-3.00# ./configure -with-ssl=/usr/sfw/ -with-ssl-lib=/usr/sfw/lib/
***... (1 Reply)
Discussion started by: sharkux
1 Replies
3. Infrastructure Monitoring
I'm running the latest version of Nagios (3.2.3). i discovered that the "secondary_address" object directive is no longer supported. does anyone know what it was replaced with?
i cant find anything on it.
i have a lot ofservers with secondary addresses and they kind of depend on this. how... (0 Replies)
Discussion started by: SkySmart
0 Replies
4. Solaris
I am trying to install nagios-plugins-1.4.15 on a Solaris 10 box and when I run the ./configure script I get this error:
checking for grep that handles long lines and -e... configure: error: no acceptable grep could be found in... (2 Replies)
Discussion started by: thatwaseasy
2 Replies
5. Infrastructure Monitoring
Hi Folks,
I have Nagios 3.0.6 which is monitoring 400+ servers in my environment and is administered by multiple administrators. I want to get notified if somebody enable or disable any notification of any of the hosts/services from GUI. Is it possible to configure?
If so, how? (0 Replies)
Discussion started by: SiddhV
0 Replies
6. Red Hat
Hello,
I installed Nagios on the Centreon Platform <----"Centralized monitoring platform" anyways now every time i click on any of the tabs inside centreon interface, it gives me a Blank page, i have no idea what to do. i thought of resetting nagios to an earlier time when it was running... (2 Replies)
Discussion started by: waelkd
2 Replies
7. Infrastructure Monitoring
Im new to monitoring so i was testing few monitoring tools and I've had this problem with nagios, i downloaded the Nagios XI VM and im using virtualbox to run it and when i reach the GRUB i get this Error 16 : inconsistent file system structure, i have tried troubleshooting the problem but i... (1 Reply)
Discussion started by: HashB
1 Replies
8. Red Hat
Hi Everybody,
I have configure nagios server and client on my lab machines which are running under VMWARE.
Now i would like to know how the nagios working in my systems. For that, what i did is i filled up the / partition with some data above 95% in client. But still it is report good... (0 Replies)
Discussion started by: mastansaheb
0 Replies
9. Infrastructure Monitoring
Hello Experts,
I have my windows servers located at different data-centers across US and I am monitoring all of them using Nagios server configured on a CentOS. All communications are done via public IP address and I doubt it can invite some security threats too. Can anyone let me know if it is... (3 Replies)
Discussion started by: naw_deepak
3 Replies
10. Infrastructure Monitoring
We have a dual Nagios server setup. One is setup for internal server monitoring on our LAN, while the second Nagios server is hosted externally and is used for external checks only such as URL and ping checks form the WAN side.
I was wondering if there is any way to setup cross dependencies... (1 Reply)
Discussion started by: eugenes18t
1 Replies
LEARN ABOUT DEBIAN
nagircbot
NAGIRCBOT(1) General Commands Manual NAGIRCBOT(1)
NAME
nagircbot - announce Nagios status to an IRC channel
SYNOPSIS
nagircbot [-CdeHmRStxX] [-A REGEX] [-c CHANNEL] [-f FILE] [-F HOST[:PORT]] [-i INTERVAL] [-I INTERVAL] [-k KEYWORD] [-n NICK] [-N PREFIX]
[-p PASSWORD] [-P FILE] [-s HOST[:PORT]] [-T LIST] [-u USERNAME] [-U NAME] [-z USER]
DESCRIPTION
nagircbot is an IRC bot that reads Nagios' status information and emits alerts to an IRC channel. It can filter alerts based on severity
(CRITICAL, HARD, SOFT, and/or UNKNOWN) or by regular expression. It can connect to IRC servers protected by password or SSL, and can
optionally set the topic to the current Nagios status.
OPTIONS
-A REGEX
Filter (omit) lines that match a basic regular expression.
-c CHANNEL
Channel to connect to, including the leading "#" (default: "#nagircbot").
-C Use colors in IRC messages.
-d Do not fork into the background.
-e Use encryption (SSL) when connecting to the IRC server.
-f FILE
Path to Nagios' status.log, indicated by the 'status_file' parameter in nagios.cfg (default: "/usr/local/nagios/var/status.log").
-F HOST[:PORT]
Retrieve status.log over the network. If no port is specified, the default is 33333.
-H Only announce alerts in 'HARD' state. This is the default.
-i INTERVAL
Nagios alert check interval, in seconds (default: 60).
-I INTERVAL
How often to announce Nagios global status in the channel, in seconds. Specify an interval of 0 (the default) to disable. Do not
specify an interval smaller than the alert check (-i) interval.
-k KEYWORD
Keyword for the channel (default: no keyword).
-m Display status information for an alert in separate IRC messages instead of combining on a single message.
-n NICK
IRC nick to use (default: "nagircbot").
-N PREFIX
Prefix for all in-channel IRC messages.
-p PASSWORD
IRC server password.
-P FILE
Write PID file.
-R Only announce CRITICAL/UNKNOWN alerts.
-s HOST[:PORT]
IRC server to connect to. If not specified, the default is "localhost:6667". If no port is specified, the default is 33333.
-S Also announce alerts in 'SOFT' state.
-t Set the channel topic to an alert summary.
-T LIST
Enable checks to see if Nagios is still running. Send 'check' in a private message to invoke the check. Accepts a comma-seperated
list (without spaces) with the following elements: max_time_last_host_update, max_time_oldest_host_update, max_time_last_host_check,
max_time_oldest_host_check, max_time_last_service_check, max_time_oldest_service_check, and max_time_oldest_next_service_check.
-u USERNAME
Username to log into the IRC server as.
-U NAME
IRC "real" or full name (default: "nagircbot").
-x status.log is in Nagios 1.0 format.
-X status.log is in Nagios 2.0/3.0 format. This is the default.
-z USER
User to run as.
AUTHOR
nagircbot was written by Folkert van Heusden <folkert@vanheusden.com>.
This manual page was written by John Morrissey <jwm@horde.net>, for the Debian project (and may be used by others).
December 13, 2010 NAGIRCBOT(1)