Re: [Nagios-users] Monitor netstat connection states using nagios.
Hi Giorgio, I tried all the ways to fix the problem but still no luck. Do not know how to run the custom scripts, i will explain in detail here, please someone guide me here, Nagios server: Running the below command, this command will go to nagios client (172.16.17.18) and execute check_netstat script. The netstat script will check for port 80 listen status also if there are any TIME_WAIT connections happens, then it should alert us (WARNING - STATUS= TIME_WAIT port status on airlin | WARNING - STATUS=TIME_WAIT port status on airlin). For testing I made some connections happend to be listen on port 80 and as TIME_WAIT status. But it still reports as (OK, which means this is reporting incorrectly) [nag...@lnx-nagios ~]$ /usr/local/nagios/libexec/check_nrpe -H 172.16.17.18 -c check_netstat OK - The port is up and running NO established connections on airlin on Nagios client:, I executed below command here, and this reports exactly correct as there are some TIME_WAIT listening on port 80 [nag...@airlin nagios]$ netstat -an | grep 80 tcp0 0 0.0.0.0:80 0.0.0.0:* LISTEN tcp0 0 172.16.17.18:80 10.10.19.85:2293 TIME_WAIT [nag...@airlin nagios]$ /usr/local/nagios/libexec/check_netstat WARNING - STATUS= TIME_WAIT port status on airlin | WARNING - STATUS=TIME_WAIT port status on airlin. The same warning message should appear when I execute first command on nagios server but it reports incorrectly as (OK, no port status) I am running above commands as nagios user because this as preivileges to run nrpe. the check_nrpe , nrpe , check_netstat owned by nagios:nagios on both the servers. in /etc/sudoers file I wrote below line on both the servers nagios ALL=/bin/netstat and [r...@airlin libexec]# sudo -u nagios sudo -l Password: User nagios may run the following commands on this host: (root) /bin/netstat in the check_netstat script I wrote the netstat command as, netstat -an | grep 80 synport12 should I add sudo here??? Please help your valuable suggestions.. thanks On Thu, Apr 9, 2009 at 8:52 PM, Giorgio Zarrelli gior...@zarrelli.orgwrote: Hi As I told before, that netstat command won't work out of the box, with an unprivileged user. Giorgio Marc Powell (m...@ena.com) scritto: On Apr 9, 2009, at 8:26 AM, asa...@gmail.com wrote: Hi, I did copy the scipt to the remote host as check_netstat and used check_nrpe method to excute from nagios server. It looks when executing the command on remote server works well, [r...@airlin libexec]# /usr/local/nagios/libexec/check_netstat WARNING - STATUS= TIME_WAIT port status on airlin | WARNING - STATUS=TIME_WAIT port status on airlin You're testing as root here. Test as the user nrpe runs as. It could very well be a difference in privileges... -- Marc -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null -- Shankar Asam -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
[Nagios-users] how macros on event handlers work
Hi, I'm slightly unsure about how i used event_handler in this situation [Fri Apr 10 05:38:16 2009];Nagios 3.0.6 starting... (PID=1017) [Fri Apr 10 05:38:16 2009];Local time is Fri Apr 10 05:38:16 EDT 2009 [Fri Apr 10 05:38:16 2009];LOG VERSION: 2.0 [Fri Apr 10 05:38:16 2009];Finished daemonizing... (New PID=1018) [Fri Apr 10 05:38:16 2009];INITIAL HOST STATE: remotehost;UP;HARD;1; [Fri Apr 10 05:38:16 2009];INITIAL HOST STATE: mynagios;UP;HARD;1; [Fri Apr 10 05:38:16 2009];INITIAL SERVICE STATE: remotehost;check_nagios_cronjob;OK;HARD;1;(null) [Fri Apr 10 05:38:16 2009];INITIAL SERVICE STATE: mynagios;Current Load;OK;HARD;1;(null) [Fri Apr 10 05:51:16 2009];Warning: The results of service 'check_nagios_cronjob' on host 'remotehost' are stale by 0d 0h 3m 0s (threshold=0d 0h 10m 0s). I'm forcing an immediate check of the service. [Fri Apr 10 05:51:21 2009];SERVICE ALERT: remotehost;check_nagios_cronjob;WARNING;HARD;1;WARNING: no information received from passive check (stale) [Fri Apr 10 05:51:21 2009];SERVICE EVENT HANDLER: remotehost;check_nagios_cronjob;(null);(null);(null);check_by_ssh define command{ command_namecheck_by_ssh command_line$USER1$/eventhandlers/check_by_ssh.pl $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$ $HOSTNAME$ } define service{ use passive_template service_description check_nagios_cronjob hostgroup_name testgroup check_command i_am_stale event_handler check_by_ssh freshness_treshold 600 } define command{ command_namei_am_stale command_line$USER1$/check_dummy 1 no information received from passive check (stale) } based on the configuration above, im expecting a passive check to timeout after 10 mins. Then check_command will kick in, but it just returns WARNING which is HARD (i've set max_check_attempts to 1). it will then execute the event_handler, passing the macros $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$ $HOSTNAME$ as argument to check_by_ssh.pl. But based on the log output above, these macros contain 'null'? i'm not sure why but im pretty sure macros are working since $HOSTNAME$ was passed correctly. Please give me a hint on what im missing. Thanks, Marc -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
[Nagios-users] Integrating host notes into Nagios html...
I'm thinking about using something like sysreport to generate info about our hosts. It (and other tools like it) have the ability to output to html. To me that makes it somewhat logical to add a per-host html link into Nagios (clicking the host name would take you to a page that shows the detailed info). Have any of you tried this or something similar? Care to share your experience or what you edited, etc? -- A. Davis Email: ncc...@gmail.com There is no limit to what a man can accomplish if he doesn't care who gets the credit. - Ronald Reagan -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] Centreon
Just wondering, why do you not recommend RH5 for centreon? -Original Message- From: Simon Finch [mailto:fin...@stgeorge.com.au] Sent: Friday, April 10, 2009 12:52 AM To: nagios-users@lists.sourceforge.net; nagios-users-requ...@lists.sourceforge.net Subject: Re: [Nagios-users] Centreon Chris, Centreon is a very powerful addition to Nagios, so good that I have managed to replace a large enterprise deployment of IBM Tivoli monitoring with Nagios, but only by using Centreon, Nagios by itself wouldn't have stood a chance. I started using it from version 2.0 beta 4 and the doco was terrible or non existent. I am currently using version 2.1 and the doco is still non existent, but the wiki / forum support more than makes up for it. If you compiled Nagios, nrpe, ndo and got it all working then you could easily get Centreon working. I work in IT for a moderately large bank in Australia who has recently been taken over by a larger bank. The new IT top dog is an American who used to run IT for a huge US aircraft manufacturer, he was impressed by what he saw in our NOC / war room. It was Nagios3 front ended by Centreon with management eye candy provided by NagVis, so I truly believe it when I say it's worth the effort because I am in the middle of doing it. If you want more details the feel free to ask as I found a number of traps in the beginning, eg, I don't recommend Redhat RHEL5 for the main server that runs Centreon, I switched to Ubuntu 8.04 , but I still use Redhat RHEL4 5 for the remote satellite Nagios servers. Rgds, Simon Simon Finch ESM Team Leader St George Bank ** * IMPORTANT INFORMATION* This document should be read only by those persons to whom it is addressed and its content is not intended for use by any other persons. If you have received this message in error, please notify us immediately. Please also destroy and delete the message from your computer. Any unauthorised form of reproduction of this message is strictly prohibited. St George Bank Limited AFSL 240997, Advance Asset Management Limited AFSL 240902, St George Life Limited AFSL 240900, ASGARD Capital Management Limited AFSL 240695 and Securitor Financial Group Limited AFSL 240687 is not liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt. ** -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] trouble w/SNMP
On Fri, Apr 10, 2009 at 12:57, Natalie Aloi a...@experisdatacenters.comwrote: I am trying to get something to work in Nagios and my command generates a response of unknown, but the snmpwalk generates a value of 2 I also tried another oid and the values generated are identical for the snmpwalk and the snmpget (the one for the upsBatteryStatus is the one I am curious about) [r...@nagios mibwalk]# /usr/lib/nagios/plugins/check_snmp -H 10.1.102.40 -C public -o SNMPv2-SMI::mib-2.33.1.2.2.0 SNMP OK - 0 seconds | UPS-MIB::upsSecondsOnBattery.0=0 seconds [r...@nagios mibwalk]# /usr/lib/nagios/plugins/check_snmp -H 10.1.102.40 -C public -o SNMPv2-SMI::mib-2.33.1.2.1.0 SNMP OK - unknown(1) | UPS-MIB::upsBatteryStatus.0=unknown(1) [r...@nagios mibwalk]# Data from snmpwalk is below: UPS-MIB::upsBatteryStatus.0 = INTEGER: batteryNormal(2) UPS-MIB::upsSecondsOnBattery.0 = INTEGER: 0 seconds try something like: snmpget -v 1 -c public 10.1.102.40 SNMPv2-SMI::mib-2.33.1.2.1.0 Assuming SNMP-v1; try with -v 2c as well, to see which one matches your results. I don't have a commandline available to check which the snmp command plugin uses, but maybe this will give you an idea whether the snmpwalk differs form the snmpget result, perhaps an avenue to investigate further. Allan -- all...@chickenandporn.com 金鱼 http://linkedin.com/in/goldfish please, no proprietary attachments (http://tinyurl.com/cbgq) -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] trouble w/SNMP
Natalie, On Fri, Apr 10, 2009 at 12:57 PM, Natalie Aloi na...@experisdatacenters.com wrote: I am trying to get something to work in Nagios and my command generates a response of unknown, but the snmpwalk generates a value of 2 I also tried another oid and the values generated are identical for the snmpwalk and the snmpget (the one for the upsBatteryStatus is the one I am curious about) If you do an SNMP get for the battery status from the CLI using the Net-SNMP snmpget command do you get the same response (unknown) as you do from the check_snmp command? - Max -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] trouble w/SNMP
[r...@nagios mibwalk]# snmpget -v 1 -c public 10.1.102.40 SNMPv2-SMI::mib-2.33.1.2.1.0 SNMPv2-SMI::mib-2.33.1.2.1.0 = INTEGER: 1 [r...@nagios mibwalk]# Huh? - weird! why would snmpget give me 1, but walk gives me 2? -Original Message- From: Allan Clark [mailto:all...@chickenandporn.com] Sent: Friday, April 10, 2009 01:19 PM To: 'Natalie Aloi' Cc: 'Nagios Users Mail-list' Subject: Re: [Nagios-users] trouble w/SNMP On Fri, Apr 10, 2009 at 12:57, Natalie Aloi a...@experisdatacenters.com wrote: I am trying to get something to work in Nagios and my command generates a response of unknown, but the snmpwalk generates a value of 2 I also tried another oid and the values generated are identical for the snmpwalk and the snmpget (the one for the upsBatteryStatus is the one I am curious about) [r...@nagios mibwalk]# /usr/lib/nagios/plugins/check_snmp -H 10.1.102.40 -C public -o SNMPv2-SMI::mib-2.33.1.2.2.0 SNMP OK - 0 seconds | UPS-MIB::upsSecondsOnBattery.0=0 seconds [r...@nagios mibwalk]# /usr/lib/nagios/plugins/check_snmp -H 10.1.102.40 -C public -o SNMPv2-SMI::mib-2.33.1.2.1.0 SNMP OK - unknown(1) | UPS-MIB::upsBatteryStatus.0=unknown(1) [r...@nagios mibwalk]# Data from snmpwalk is below: UPS-MIB::upsBatteryStatus.0 = INTEGER: batteryNormal(2) UPS-MIB::upsSecondsOnBattery.0 = INTEGER: 0 seconds try something like: snmpget -v 1 -c public 10.1.102.40 SNMPv2-SMI::mib-2.33.1.2.1.0 Assuming SNMP-v1; try with -v 2c as well, to see which one matches your results. I don't have a commandline available to check which the snmp command plugin uses, but maybe this will give you an idea whether the snmpwalk differs form the snmpget result, perhaps an avenue to investigate further. Allan -- all...@chickenandporn.com 金鱼 http://linkedin.com/in/goldfish please, no proprietary attachments (http://tinyurl.com/cbgq) -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
[Nagios-users] trouble w/SNMP
I am trying to get something to work in Nagios and my command generates a response of unknown, but the snmpwalk generates a value of 2 I also tried another oid and the values generated are identical for the snmpwalk and the snmpget (the one for the upsBatteryStatus is the one I am curious about) [r...@nagios mibwalk]# /usr/lib/nagios/plugins/check_snmp -H 10.1.102.40 -C public -o SNMPv2-SMI::mib-2.33.1.2.2.0 SNMP OK - 0 seconds | UPS-MIB::upsSecondsOnBattery.0=0 seconds [r...@nagios mibwalk]# /usr/lib/nagios/plugins/check_snmp -H 10.1.102.40 -C public -o SNMPv2-SMI::mib-2.33.1.2.1.0 SNMP OK - unknown(1) | UPS-MIB::upsBatteryStatus.0=unknown(1) [r...@nagios mibwalk]# Data from snmpwalk is below: UPS-MIB::upsBatteryStatus.0 = INTEGER: batteryNormal(2) UPS-MIB::upsSecondsOnBattery.0 = INTEGER: 0 seconds Natalie Experis Data Center LLC 8209 Valley Pike PO Box 535 Middletown,VA 22645 phone:540-869-8702 cell:240-988-3267 fax:540-869-8710 e-mail:na...@experisdatacenters.com -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] trouble w/SNMP
tried v 2c too - same results - testing walk again still gives a value of 2 UPS-MIB::upsBatteryStatus.0 = INTEGER: batteryNormal(2) [r...@nagios mibwalk]# snmpget -v 2c -c public 10.1.102.40 SNMPv2-SMI::mib-2.33.1.2.1.0 SNMPv2-SMI::mib-2.33.1.2.1.0 = INTEGER: 1 -Original Message- From: Natalie Aloi [mailto:na...@experisdatacenters.com] Sent: Friday, April 10, 2009 01:28 PM To: 'Allan Clark', 'Natalie Aloi' Cc: 'Nagios Users Mail-list' Subject: Re: [Nagios-users] trouble w/SNMP [r...@nagios mibwalk]# snmpget -v 1 -c public 10.1.102.40 SNMPv2-SMI::mib-2.33.1.2.1.0 SNMPv2-SMI::mib-2.33.1.2.1.0 = INTEGER: 1 [r...@nagios mibwalk]# Huh? - weird! why would snmpget give me 1, but walk gives me 2? -Original Message- From: Allan Clark [mailto:all...@chickenandporn.com] Sent: Friday, April 10, 2009 01:19 PM To: 'Natalie Aloi' Cc: 'Nagios Users Mail-list' Subject: Re: [Nagios-users] trouble w/SNMP On Fri, Apr 10, 2009 at 12:57, Natalie Aloi a...@experisdatacenters.com wrote: I am trying to get something to work in Nagios and my command generates a response of unknown, but the snmpwalk generates a value of 2 I also tried another oid and the values generated are identical for the snmpwalk and the snmpget (the one for the upsBatteryStatus is the one I am curious about) [r...@nagios mibwalk]# /usr/lib/nagios/plugins/check_snmp -H 10.1.102.40 -C public -o SNMPv2-SMI::mib-2.33.1.2.2.0 SNMP OK - 0 seconds | UPS-MIB::upsSecondsOnBattery.0=0 seconds [r...@nagios mibwalk]# /usr/lib/nagios/plugins/check_snmp -H 10.1.102.40 -C public -o SNMPv2-SMI::mib-2.33.1.2.1.0 SNMP OK - unknown(1) | UPS-MIB::upsBatteryStatus.0=unknown(1) [r...@nagios mibwalk]# Data from snmpwalk is below: UPS-MIB::upsBatteryStatus.0 = INTEGER: batteryNormal(2) UPS-MIB::upsSecondsOnBattery.0 = INTEGER: 0 seconds try something like: snmpget -v 1 -c public 10.1.102.40 SNMPv2-SMI::mib-2.33.1.2.1.0 Assuming SNMP-v1; try with -v 2c as well, to see which one matches your results. I don't have a commandline available to check which the snmp command plugin uses, but maybe this will give you an idea whether the snmpwalk differs form the snmpget result, perhaps an avenue to investigate further. Allan -- all...@chickenandporn.com 金鱼 http://linkedin.com/in/goldfish please, no proprietary attachments (http://tinyurl.com/cbgq) -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
[Nagios-users] Survey: Nagios Conference at LISA '09
Hey Nagios Admins - [Apologies for cross-posting. This message originally went to the -announce list last week. So far we've had ~70 responses to the survey, which isn't yet statistically significant enough for us to make a decision on a conference...] We're considering holding a Nagios event of some sort to be co-located with the USENIX LISA Conference November 1–6 in Baltimore, MD (see http://www.usenix.org/events/lisa09/). We're currently thinking of a one-day or two-day mini conference to be held the Sunday and/or Monday, November 1/2. This is in the idea stage at the moment, and we'd like to gauge the community's interest before we get too far down the planning path. If you would be interested in attending or participating in the conference, please take our survey by visiting the nagios.org website using the URL below: http://www.surveymonkey.com/s.aspx?sm=G9_2f6HPGVHeRUuY9008Wv_2bA_3d_3d Until later, happy monitoring! - Ethan Galstad -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] trouble w/SNMP
2009/4/10 Natalie Aloi na...@experisdatacenters.com (moved top-post) -Original Message- *From:* Allan Clark [mailto:all...@chickenandporn.com] *Sent:* Friday, April 10, 2009 01:19 PM *To:* 'Natalie Aloi' *Cc:* 'Nagios Users Mail-list' *Subject:* Re: [Nagios-users] trouble w/SNMP On Fri, Apr 10, 2009 at 12:57, Natalie Aloi a...@experisdatacenters.comwrote: I am trying to get something to work in Nagios and my command generates a response of unknown, but the snmpwalk generates a value of 2 I also tried another oid and the values generated are identical for the snmpwalk and the snmpget (the one for the upsBatteryStatus is the one I am curious about) [r...@nagios mibwalk]# /usr/lib/nagios/plugins/check_snmp -H 10.1.102.40 -C public -o SNMPv2-SMI::mib-2.33.1.2.2.0 SNMP OK - 0 seconds | UPS-MIB::upsSecondsOnBattery.0=0 seconds [r...@nagios mibwalk]# /usr/lib/nagios/plugins/check_snmp -H 10.1.102.40 -C public -o SNMPv2-SMI::mib-2.33.1.2.1.0 SNMP OK - unknown(1) | UPS-MIB::upsBatteryStatus.0=unknown(1) [r...@nagios mibwalk]# Data from snmpwalk is below: UPS-MIB::upsBatteryStatus.0 = INTEGER: batteryNormal(2) UPS-MIB::upsSecondsOnBattery.0 = INTEGER: 0 seconds try something like: snmpget -v 1 -c public 10.1.102.40 SNMPv2-SMI::mib-2.33.1.2.1.0 Assuming SNMP-v1; try with -v 2c as well, to see which one matches your results. I don't have a commandline available to check which the snmp command plugin uses, but maybe this will give you an idea whether the snmpwalk differs form the snmpget result, perhaps an avenue to investigate further. Allan [r...@nagios mibwalk]# snmpget -v 1 -c public 10.1.102.40 SNMPv2-SMI::mib-2.33.1.2.1.0 SNMPv2-SMI::mib-2.33.1.2.1.0 = INTEGER: 1 [r...@nagios mibwalk]# Huh? - weird! why would snmpget give me 1, but walk gives me 2? If we assume Nagios is doing snmpget rather than snmpwalk, then the problem is slightly different: how would we get snmpget to produce the desired/accurate 2 rather than 1. For giggles, try: snmpget -v 1 -c public 10.1.102.40 SNMPv2-SMI::mib-2.33.1.2.1 (dropping the .0) I'm curious about this because I remember something with snmpwalk needing a .0 in places where snmpget didn't seem to. Don't recall exactly what it was. Allan -- all...@chickenandporn.com 金鱼 http://linkedin.com/in/goldfish please, no proprietary attachments (http://tinyurl.com/cbgq) Sent from New York, NY, United States -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] trouble w/SNMP
try: /usr/lib/nagios/plugins/check_snmp -H 10.1.102.40 -C public -o SNMPv2-SMI::mib-2.33.1.2.1.0 -r ok Giovanni Natalie Aloi wrote: I am trying to get something to work in Nagios and my command generates a response of unknown, but the snmpwalk generates a value of 2 I also tried another oid and the values generated are identical for the snmpwalk and the snmpget (the one for the upsBatteryStatus is the one I am curious about) [r...@nagios mibwalk]# /usr/lib/nagios/plugins/check_snmp -H 10.1.102.40 -C public -o SNMPv2-SMI::mib-2.33.1.2.2.0 SNMP OK - 0 seconds | UPS-MIB::upsSecondsOnBattery.0=0 seconds [r...@nagios mibwalk]# /usr/lib/nagios/plugins/check_snmp -H 10.1.102.40 -C public -o SNMPv2-SMI::mib-2.33.1.2.1.0 SNMP OK - unknown(1) | UPS-MIB::upsBatteryStatus.0=unknown(1) [r...@nagios mibwalk]# Data from snmpwalk is below: UPS-MIB::upsBatteryStatus.0 = INTEGER: batteryNormal(2) UPS-MIB::upsSecondsOnBattery.0 = INTEGER: 0 seconds Natalie Experis Data Center LLC 8209 Valley Pike PO Box 535 Middletown,VA 22645 phone:540-869-8702 cell:240-988-3267 fax:540-869-8710 e-mail:na...@experisdatacenters.com -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] trouble w/SNMP
Thanks Allan! That's what its doing a getnext - see below! note mib oid and value! [r...@nagios mibwalk]# snmpgetnext -v 1 -c public 10.1.102.40 SNMPv2-SMI::mib-2.33.1.1.5.0 SNMPv2-SMI::mib-2.33.1.2.1.0 = INTEGER: 1 [r...@nagios mibwalk]# hmmm now I need to figure out how to tell nagios to do a walk on that oid... -Original Message- From: Allan Clark [mailto:all...@chickenandporn.com] Sent: Friday, April 10, 2009 01:57 PM To: 'Natalie Aloi' Cc: 'Nagios Users Mail-list' Subject: Re: [Nagios-users] trouble w/SNMP 2009/4/10 Natalie Aloi na...@experisdatacenters.com (moved top-post) -Original Message- From: Allan Clark [mailto:all...@chickenandporn.com] Sent: Friday, April 10, 2009 01:19 PM To: 'Natalie Aloi' Cc: 'Nagios Users Mail-list' Subject: Re: [Nagios-users] trouble w/SNMP On Fri, Apr 10, 2009 at 12:57, Natalie Aloi a...@experisdatacenters.com wrote: I am trying to get something to work in Nagios and my command generates a response of unknown, but the snmpwalk generates a value of 2 I also tried another oid and the values generated are identical for the snmpwalk and the snmpget (the one for the upsBatteryStatus is the one I am curious about) [r...@nagios mibwalk]# /usr/lib/nagios/plugins/check_snmp -H 10.1.102.40 -C public -o SNMPv2-SMI::mib-2.33.1.2.2.0 SNMP OK - 0 seconds | UPS-MIB::upsSecondsOnBattery.0=0 seconds [r...@nagios mibwalk]# /usr/lib/nagios/plugins/check_snmp -H 10.1.102.40 -C public -o SNMPv2-SMI::mib-2.33.1.2.1.0 SNMP OK - unknown(1) | UPS-MIB::upsBatteryStatus.0=unknown(1) [r...@nagios mibwalk]# Data from snmpwalk is below: UPS-MIB::upsBatteryStatus.0 = INTEGER: batteryNormal(2) UPS-MIB::upsSecondsOnBattery.0 = INTEGER: 0 seconds try something like: snmpget -v 1 -c public 10.1.102.40 SNMPv2-SMI::mib-2.33.1.2.1.0 Assuming SNMP-v1; try with -v 2c as well, to see which one matches your results. I don't have a commandline available to check which the snmp command plugin uses, but maybe this will give you an idea whether the snmpwalk differs form the snmpget result, perhaps an avenue to investigate further. Allan [r...@nagios mibwalk]# snmpget -v 1 -c public 10.1.102.40 SNMPv2-SMI::mib-2.33.1.2.1.0 SNMPv2-SMI::mib-2.33.1.2.1.0 = INTEGER: 1 [r...@nagios mibwalk]# Huh? - weird! why would snmpget give me 1, but walk gives me 2? If we assume Nagios is doing snmpget rather than snmpwalk, then the problem is slightly different: how would we get snmpget to produce the desired/accurate 2 rather than 1. For giggles, try: snmpget -v 1 -c public 10.1.102.40 SNMPv2-SMI::mib-2.33.1.2.1 (dropping the .0) I'm curious about this because I remember something with snmpwalk needing a .0 in places where snmpget didn't seem to. Don't recall exactly what it was. Allan -- all...@chickenandporn.com 金鱼 http://linkedin.com/in/goldfish please, no proprietary attachments (http://tinyurl.com/cbgq) Sent from New York, NY, United States -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] trouble w/SNMP
TADA! Thanks you so much! [r...@nagios mibwalk]# snmpwalk -v 1 -c public 10.1.102.40 UPS-MIB::upsBatteryStatus.0 UPS-MIB::upsBatteryStatus.0 = INTEGER: unknown(1) [r...@nagios mibwalk]# snmpwalk -v 1 -c public 10.1.102.40 UPS-MIB::upsBatteryStatus UPS-MIB::upsBatteryStatus.0 = INTEGER: batteryNormal(2) [r...@nagios mibwalk]# -Original Message- From: Allan Clark [mailto:all...@chickenandporn.com] Sent: Friday, April 10, 2009 01:57 PM To: 'Natalie Aloi' Cc: 'Nagios Users Mail-list' Subject: Re: [Nagios-users] trouble w/SNMP 2009/4/10 Natalie Aloi na...@experisdatacenters.com (moved top-post) -Original Message- From: Allan Clark [mailto:all...@chickenandporn.com] Sent: Friday, April 10, 2009 01:19 PM To: 'Natalie Aloi' Cc: 'Nagios Users Mail-list' Subject: Re: [Nagios-users] trouble w/SNMP On Fri, Apr 10, 2009 at 12:57, Natalie Aloi a...@experisdatacenters.com wrote: I am trying to get something to work in Nagios and my command generates a response of unknown, but the snmpwalk generates a value of 2 I also tried another oid and the values generated are identical for the snmpwalk and the snmpget (the one for the upsBatteryStatus is the one I am curious about) [r...@nagios mibwalk]# /usr/lib/nagios/plugins/check_snmp -H 10.1.102.40 -C public -o SNMPv2-SMI::mib-2.33.1.2.2.0 SNMP OK - 0 seconds | UPS-MIB::upsSecondsOnBattery.0=0 seconds [r...@nagios mibwalk]# /usr/lib/nagios/plugins/check_snmp -H 10.1.102.40 -C public -o SNMPv2-SMI::mib-2.33.1.2.1.0 SNMP OK - unknown(1) | UPS-MIB::upsBatteryStatus.0=unknown(1) [r...@nagios mibwalk]# Data from snmpwalk is below: UPS-MIB::upsBatteryStatus.0 = INTEGER: batteryNormal(2) UPS-MIB::upsSecondsOnBattery.0 = INTEGER: 0 seconds try something like: snmpget -v 1 -c public 10.1.102.40 SNMPv2-SMI::mib-2.33.1.2.1.0 Assuming SNMP-v1; try with -v 2c as well, to see which one matches your results. I don't have a commandline available to check which the snmp command plugin uses, but maybe this will give you an idea whether the snmpwalk differs form the snmpget result, perhaps an avenue to investigate further. Allan [r...@nagios mibwalk]# snmpget -v 1 -c public 10.1.102.40 SNMPv2-SMI::mib-2.33.1.2.1.0 SNMPv2-SMI::mib-2.33.1.2.1.0 = INTEGER: 1 [r...@nagios mibwalk]# Huh? - weird! why would snmpget give me 1, but walk gives me 2? If we assume Nagios is doing snmpget rather than snmpwalk, then the problem is slightly different: how would we get snmpget to produce the desired/accurate 2 rather than 1. For giggles, try: snmpget -v 1 -c public 10.1.102.40 SNMPv2-SMI::mib-2.33.1.2.1 (dropping the .0) I'm curious about this because I remember something with snmpwalk needing a .0 in places where snmpget didn't seem to. Don't recall exactly what it was. Allan -- all...@chickenandporn.com 金鱼 http://linkedin.com/in/goldfish please, no proprietary attachments (http://tinyurl.com/cbgq) Sent from New York, NY, United States -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
[Nagios-users] upgrading nagios
has anyone done upgrage from 2.x to 3.x the previous guy who has installed 2.8 had specified different directories , instead of /usr/local/nagios. I almost figured it out what the directories are. Now should i specify them in ./configure --bindir=/usr/bin --sbindir=/usr/lib/nagios/cgi --datadir=/usr/share/nagios --sysconfdir=/etc/nagios --localstatedir=/var/log/nagios What is --prefix will do, and is there any thing else that is left over? Can any one guide me through proper direction -- Anirudh Srinivasan -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] upgrading nagios
-Original Message- From: Anirudh Srinivasan [mailto:srianir...@gmail.com] Sent: Friday, April 10, 2009 3:16 PM To: nagios-users@lists.sourceforge.net Subject: [Nagios-users] upgrading nagios has anyone done upgrage from 2.x to 3.x the previous guy who has installed 2.8 had specified different directories , instead of /usr/local/nagios. I almost figured it out what the directories are. Now should i specify them in ./configure --bindir=/usr/bin --sbindir=/usr/lib/nagios/cgi --datadir=/usr/share/nagios --sysconfdir=/etc/nagios --localstatedir=/var/log/nagios What is --prefix will do, and is there any thing else that is left over? Can any one guide me through proper direction -- Anirudh Srinivasan --prefix=/usr/local/nagios would install all files in: /usr/local/nagios/ . (i.e /usr/local/nagios/bin ,/usr/local/nagios/etc [] In other words, it would put the whole nagios install under /usr/local/nagios, the default location if you do not specify an alternate prefix. Personally, if I were you, I would _not_ rebuild it in a non-standard way like you mention above unless you have very good reason to do so - Yes, there may be more work involved, but the end result will be worth it. (The guy who takes over your job down the road will also be grateful, and you won't have to hunt over the whole system to find the stuff you need!) Cheers, Jamie -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
[Nagios-users] Lilac Configurator 1.0.1 Nagios Configuration Tool Released, Bug-fixes.
Lilac Configurator 1.0.1., the most powerful Web-Based Nagios Configuration tool has been released with a handful of bugfixes to help improve the installer and general experience of Lilac. Feel free to download and upgrade today at http://www.lilacplatform.com. Introducing Commercial Support And Services: Lilac Networks, the parent company behind the Lilac Platform, is now offering commercial support and services. We can help you design, implement and support your open source monitoring solutions. For more information, direct your browser to www.lilacnetworks.com. -- Taylor Dondich Check out Lilac, a configuration tool for Nagios 3 at http://www.lilacplatform.com -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
[Nagios-users] how macros on event handlers work
Hi, I'm slightly unsure about how i used event_handler in this situation [Fri Apr 10 05:38:16 2009];Nagios 3.0.6 starting... (PID=1017) [Fri Apr 10 05:38:16 2009];Local time is Fri Apr 10 05:38:16 EDT 2009 [Fri Apr 10 05:38:16 2009];LOG VERSION: 2.0 [Fri Apr 10 05:38:16 2009];Finished daemonizing... (New PID=1018) [Fri Apr 10 05:38:16 2009];INITIAL HOST STATE: remotehost;UP;HARD;1; [Fri Apr 10 05:38:16 2009];INITIAL HOST STATE: mynagios;UP;HARD;1; [Fri Apr 10 05:38:16 2009];INITIAL SERVICE STATE: remotehost;check_nagios_cronjob;OK;HARD;1;(null) [Fri Apr 10 05:38:16 2009];INITIAL SERVICE STATE: mynagios;Current Load;OK;HARD;1;(null) [Fri Apr 10 05:51:16 2009];Warning: The results of service 'check_nagios_cronjob' on host 'remotehost' are stale by 0d 0h 3m 0s (threshold=0d 0h 10m 0s). I'm forcing an immediate check of the service. [Fri Apr 10 05:51:21 2009];SERVICE ALERT: remotehost;check_nagios_cronjob;WARNING;HARD;1;WARNING: no information received from passive check (stale) [Fri Apr 10 05:51:21 2009];SERVICE EVENT HANDLER: remotehost;check_nagios_cronjob;(null);(null);(null);check_by_ssh define command{ command_namecheck_by_ssh command_line$USER1$/eventhandlers/check_by_ssh.pl $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$ $HOSTNAME$ } define service{ use passive_template service_description check_nagios_cronjob hostgroup_name testgroup check_command i_am_stale event_handler check_by_ssh freshness_treshold 600 } define command{ command_namei_am_stale command_line$USER1$/check_dummy 1 no information received from passive check (stale) } based on the configuration above, im expecting a passive check to timeout after 10 mins. Then check_command will kick in, but it just returns WARNING which is HARD (i've set max_check_attempts to 1). it will then execute the event_handler, passing the macros $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$ $HOSTNAME$ as argument to check_by_ssh.pl. But based on the log output above, these macros contain 'null'? i'm not sure why but im pretty sure macros are working since $HOSTNAME$ was passed correctly. Please give me a hint on what im missing. Thanks, Marc -- This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null