[Nagios-users] Fix for battery state Learning in check_perc.pl from Matt Stanford

2012-04-02 Thread Terry Carmen
I have no idea if anybody else is using this plugin or not, but I've 
been using it quite successfully on a bunch of older Dell machines, and 
it's been doing great, except for throwing a critical error when the 
Battery state is Learning.

I updated the code to handle the Learning state, but can't seem to 
find the author to submit the patch.

If anybody us using the plugin and would find the updated version 
useful, it's on my website at:

https://www.cnysupport.com/download/check_perc/check_perc.pl

Terry




--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
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] demand for information

2011-09-03 Thread Terry Carmen
Quoting Ndabunguye Frederic fndabunguy...@yahoo.fr:

 nagios need  database in order to monitor router,switch,ftpand smtp 
 thanks for support


Nagios does not require an external database.

However, if you want to keep your data in a database, look here: 

http://exchange.nagios.org/directory/Addons/Database-Backends

Terry
--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free Love Thy Logs t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev___
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] Email notifications not getting Out

2011-09-03 Thread Terry Carmen
 Verified in nagios.log, the notification was created but nothing ever shows
 up in /var/log/mail.  Last time I show something in /var/log/mail,
 was Aug 23.

What does your  etc/objects/commands.cfg notify-service-by-email command 
definition look like?

What does /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg 
say when it runs?

Terry

-- 
Terry Carmen
CNY Support, LLC
Web. Database. Business.
http://www.cnysupport.com--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free Love Thy Logs t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev___
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] Notifications for Services that are Up

2011-09-02 Thread Terry Carmen
Quoting Mike Lindsey mike-nag...@5dninja.net:

 On 9/2/11 7:59 AM, Michael Loiselle wrote:
 I am currently running Nagios 3.3.1 on Ubuntu 10.04 and everything  
 is working great.  I am monitoring 30 Windows servers with  
 NSClient++, and that is working as well.  Is it possible to receive  
 a notification for a specific service that is in the up position?

Just to toss another fly in the ointment, it's dangerous to test a  
service by examining what Windows thinks it's doing. Many times a  
service says it's up but is actually dead.

It would be more reliable to write a plugin that would actually  
examine the service to see if it can/is actually working. For example,  
with a database, you can do a SELECT on a known quantity and compare  
the result to what it should be.

What specific service are you trying to monitor?

Terry




--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free Love Thy Logs t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
___
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] Nagios authentication thru LDAP.

2011-08-10 Thread Terry Carmen
Quoting Robert J Molerio rjm...@nyu.edu:

 Can anyone indicate how this can be done?
 We would like users to log on to Nagios via LDAP.
 I think we need to configure the Apache server within Nagios to be able to
 do this but we're not sure.

It's definitely possible using Apache's LDAP auth, however you might want to 
consider that when your network is going ape, it's really nice to know that 
your Nagios machine doesn't require any external resources.

That's why I chose local auth (htpasswd).

Now matter how much of the brown stuff is flying around, Nagios is up.

Terry
--
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
___
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] check_http with multiple outcomes?

2011-08-09 Thread Terry Carmen
Quoting Dr. Ed Morbius dredmorb...@gmail.com:

 Terry:

 on 23:37 Mon 08 Aug, Terry Carmen (te...@cnysupport.com) wrote:
 Quoting Edward Morbius dredmorb...@gmail.com:
 
  When some things are going well and others aren't fully up to speed (slow
  database), we'll get a DATABASE_TEST_RAN_LONG, which isn't ideal, but at
  least for a few occurances (n = 5) we can live with.  In particular, we
  DON'T want a single result sounding off pagers in the middle of the night.

 You can specify -e OK,DATABASE_TEST_RAN_LONG, then let the plugin
 decide if it's slow or not, with the -w,  -c and -t  parameters.

 Terry

 Thanks.

 I'd considered that. It doesn't quite match what we want to test.  I'm
 thinking we may need to have a few different tests, possibly related to
 one another.

 If there's a 4xx/5xx error, it's a hard fail.

 If there's no 4xx/5xx error, but we get the DATABASE_TEST_RAN_LONG
 result, it's a soft fail, turning hard on 6 repeats.  That string
 appears in our application, it's not a nagios-determined slowness.
 Alternately, we might want to have a separate test for DB performance
 (there may well be, I'm still digging through rules and tests).

 If there's an OK result, there's no error.


 The 4xx/5xx errors are exclusive of the other two possible results. If
 there's no 4xx/5xx error, we've got the option of either of the other
 two conditions.

 So: is this a three-check test?  How would I set precedence among them?

You can actually completely ignore the DATABASE_TEST_RAN_LONG result and let 
the plugin decide if it ran long or not. That's part of it's design. The plugin 
also handles the 4xx and 5xx errors. 

However if you insist on using the DATABASE_TEST_RAN_LONG result to determine 
if the server is happy, then you'll need to modify the plugin to catch the 
string and interpret it as a WARNING OR CRITICAL as appropriate. Nagios won't 
notify on it until it happens several times in a row, depending on your 
specific settings.

Unless I'm misunderstanding something, The only result that matters is OK 
because everything else is Not OK, regardless of whether it's a performance 
issue, an access issue or a server failure. I believe you're unnecessarily 
complicating the test.
--
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
___
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] check_http with multiple outcomes?

2011-08-08 Thread Terry Carmen
Quoting Edward Morbius dredmorb...@gmail.com:

 When some things are going well and others aren't fully up to speed (slow
 database), we'll get a DATABASE_TEST_RAN_LONG, which isn't ideal, but at
 least for a few occurances (n = 5) we can live with.  In particular, we
 DON'T want a single result sounding off pagers in the middle of the night.

You can specify -e OK,DATABASE_TEST_RAN_LONG, then let the plugin decide if 
it's slow or not, with the -w,  -c and -t  parameters.

Terry

[-w warn time] [-c critical time] [-t timeout] [  

 The current test looks like:

 define command{
         command_name    check_jetty
         command_line    /usr/lib/nagios/plugins/check_http -H
 '$HOSTADDRESS$' -u /serviceStatus -e 200 -s OK
         }

 What would be a sane process of getting Nagios to:

  - Report all clear when we get a 200 status and OK text on page?
  - Wait for 6 consecutive instances of DATABASE_TEST_RAN_LONG before
 alerting for that result.
  - Alert immediately on any cases not matching one of the above?

 I don't believe we can capture this in a single test unless I'm missing
 something.

 Thanks in advance.

 --
 Dr. Ed Morbius
 Chief Scientist
 Krell Power Systems Unlimited


  

-- 
Terry Carmen
CNY Support, LLC
Web. Database. Business.
http://www.cnysupport.com--
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
___
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] Macro values don't seem to be consistent

2011-07-11 Thread Terry Carmen
Quoting Claudio Kuenzler c...@claudiokuenzler.com:

 Hello,

 Since today I have almost the same problem as Jim.
 The $HOSTALIAS$ macro works fine for all the checks, except one host alias
 is wrong. I got aware of it today.

 Same version as Jim's, 3.2.3, compiled from source as well.

 Host config:

 define host{
 use linux-platform-demo ; Name of host
 template to use
 ; This host
 definition will inherit all variables that are defined
 ; in (or inherited
 by) the linux-server host template definition.
 host_name   server14
 alias   SERVER14-RANDOMDEMO
 address 192.168.0.14
 }


What does your service definition look like?

Terry


--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
___
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] Separate mail server problems cause Nagios to plotz (or vice versa?)

2011-06-24 Thread Terry Carmen

 Simultaneously, Nagios, which is on a separate server, will send
 out
 notifications that every
 service on every server is down because Nagios cannot reach them.nbsp;


 Why can't it reach them? Is your mail server also your router?

 Good Gosh, no!  That's why this is so puzzling.

The next time it happens, unplug your mail server's network connection (it 
failed anyway). I'll bet it's flooding the network with (good?/bad?) packets 
and nagios can't get through.

It taking the mailserver offline fixes it, at least you know where to look,

I'd also check the mailserver logs. Some aren't too bright about handling 
bounces and if it's misconfiigured, you can end up with an infinite number of 
bounce messages for the bounce messages.

Terry
--
All the data continuously generated in your IT infrastructure contains a 
definitive record of customers, application performance, security 
threats, fraudulent activity and more. Splunk takes this data and makes 
sense of it. Business sense. IT sense. Common sense.. 
http://p.sf.net/sfu/splunk-d2d-c1___
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] Return code of 141 is out of bounds Error in Nagios 3.2.3

2011-06-19 Thread Terry Carmen
Quoting Rai Ricafrente maill...@ricafrente.com:

 The output returns OK status when run manually. It seems that the error
 occurs at random times, but as mentioned, will eventually go away. If the
 plugin is the issue, the error should be persistent. 

The plugin isn't handling one or more input conditions correctly and is 
returning an out-of-bounds value. This is the only possible cause I'm aware of 
for that message. It's very specific.

You should be able to examine the plugin's source code and see what conditions 
could trigger it.

FWIW, this is a bug in the plugin, since anything besides OK, Warning or 
Critical should be returned as Unknown (4).

Terry

--
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev___
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] Nagios Issue of not detecting down/up status of server and delay of mails notifications

2011-06-17 Thread Terry Carmen
Quoting Manish Kumar manikuma...@gmail.com:

 The problem is that nagios is not able to send e-mail notification as soon
 as any server/service/network device goes down. Some of the e-mails are
 delayed around 12 hours and some are not triggered even, for example if a
 server goes down for around a hour and is up again after that, nagios is not
 able to detect it. I have setup the fedora 14 to use its sendmail sever to
 relay the mails to our corporate smtp sever.

Your complaint is much too general.

You will need to turn on debugging in nagios and examine the debug log to see 
when the down state is detected and when the alert is generated. 

If the alert is being generated but not delivered on time, you'll need to 
examine your mail server's logs.

If the down-state isn't being detected soon enough, you'll need to determine if 
it's not being scheduled frequently enough or if your server or network is too 
overloaded to execute the checks on time.

Terry

--
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev___
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] Checking Status of Exchange 2010 Mailbox Store without check_nt

2011-06-16 Thread Terry Carmen
Quoting Ryan McHugh ryan.mch...@techtell.com:

 I have been looking for a way to check the status of the Exchange Mailbox
 Store with out using the check_nt daemon.  I do not have the option of
 installing anything on the exchange server at this time but can have WMI /
 RPC / snmp connections.  Does anyone know of a way to check and see if the
 Store is mounted, either directly or indrectly?  I may have access to the
 OWA but not POP/IMAP to try a client connect / html parse if there are
 tools for that.

You can setup auto-reply on a mailbox that lives in the store you're 
monitoring, send it an email and see if you get back the expected reply.

There is so much that can go wrong in Exchange that sending it an actual email 
and checking to see if you get the expected response is much more reliable than 
monitoring indirect statistics and settings.

Terry
--
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev___
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] Checking Status of Exchange 2010 Mailbox Store without check_nt

2011-06-16 Thread Terry Carmen
Quoting Ryan McHugh ryan.mch...@techtell.com:



 On Thu, 16 Jun 2011, Terry Carmen wrote:

 Quoting Ryan McHugh ryan.mch...@techtell.com:

 I have been looking for a way to check the status of the Exchange Mailbox
 Store with out using the check_nt daemon.  I do not have the option of
 installing anything on the exchange server at this time but can have WMI /
 RPC / snmp connections.  Does anyone know of a way to check and see if the
 Store is mounted, either directly or indrectly?  I may have access to the
 OWA but not POP/IMAP to try a client connect / html parse if there are
 tools for that.

 You can setup auto-reply on a mailbox that lives in the store you're 
 monitoring, send it an email and see if you get back the expected 
 reply.

 There is so much that can go wrong in Exchange that sending it an 
 actual email and checking to see if you get the expected response is 
 much more reliable than monitoring indirect statistics and settings.

 Terry


 We already send a message in and have it forwarded back to us.  This 
 does not detect a disconnected mailbox store because the queue 
 processes the message and drops it back in the outbound queue.  Does 
 the auto-responder still work with a disconnected mailbox store?

If the mailbox store is unavailable, the sender should get an NDR, although you 
would need to verify this, since I haven't tested it.

However, If this isn't the case, send an email that should be delivered. The 
SMTP protocol requires a reject if the delivery fails, which it must if the 
mailbox store isn't there.

Terry
--
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev___
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] How to scale the performance of nagios

2011-06-10 Thread Terry Carmen
Quoting Manish Kumar manikuma...@gmail.com:

 I want to know this thing that, is it very normal for the standalone
 implementation of nagios to monitor the size of infrastructure that i have
 mentioned quite efficiently without any delay in the alerts and
 notifications. Since i am monitoring very critical network elements any
 delay in the host/service failure notification will harm us.

As far as I know, the default configuration is for Nagios to wait for  
a hard state before sending out notifications.

If you used the default values for check frequencies, it could easily  
take a few minutes before it decides to send you an alert.

Terry


--
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
___
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] Services are dependent on the host they run on?

2011-05-26 Thread Terry Carmen
Quoting Assaf Flatto nag...@flatto.net:

 Any hint/advice/guidance is very welcome.

 Thank you and best regards.

 Robi

 check out service dependencies

 http://nagios.sourceforge.net/docs/3_0/dependencies.html


I'm in the same boat.

This should be very simple, but I'm probably just missing something.  
The above docs show all sorts of complex dependencies, but I'm  
actually looking for something simple.

If a host can't be pinged, there is little point in attempting to  
check disk space or anything else, so I'd like to disable all the  
other checks when ping fails; however according to the link above,  
this would require creating specific dependency definitions for each  
host and all services, defining everything as a dependency of ping.

Is there some sort of rule or wild-card that would tell Nagios that  
all network based checks should be disabled if the host can't be pinged?

Thanks!

Terry


--
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
___
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] Macro Expansion Problem

2011-05-21 Thread Terry Carmen
Quoting Jonathan Angliss j...@netdork.net:

 On 05/20/11 22:11, Terry Carmen wrote:
 Quoting Jonathan Angliss j...@netdork.net:



   That's not to say you won't see it defined in a service, but less likely
   than a command. What made you think $HOSTNAME$ was valid there? If it
   was valid, what value should it take? What are you trying to achieve?

 I would like to define it in the define host section as below, and
 have it expanded in the define service section right below it (in the
 same file).

 Nagios has no concept of what is in each file.  It simply reads them
 all, then parses the collective, rather than individually.

OK, that explains it.

Thanks!

Terry
--
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay___
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] Macro Expansion Problem

2011-05-20 Thread Terry Carmen
I'm trying to setup a more-or-less generic host file, but am having  
problems with the %HOSTNAME% macro

If I use this, everything is fine:

define host{
 host_name   mymachine
 hostgroups  MyGroup
 alias   mymachine
 address 10.1.2.100
 max_check_attempts  5
 contact_groups  admins
 check_command   check-host-alive
 }

define service{
 use generic-service
 host_name   mymachine
 service_description PING
 check_command   check_ping!100.0,20%!500.0,60%
 }

If I use this, I get Error: Could not find any host matching '$HOSTALIAS$'

define host{
 host_name   mymachine
 hostgroups  MyGroup
 alias   mymachine
 address 10.1.2.100
 max_check_attempts  5
 contact_groups  admins
 check_command   check-host-alive
 }

define service{
 use generic-service
 host_name   %HOSTNAME%
 service_description PING
 check_command   check_ping!100.0,20%!500.0,60%
 }

I'm probably doing something wrong with the macro, but can't seem to  
figure out what.

Any help would be appreciated.

Thanks!

Terry


--
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
___
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] Macro Expansion Problem

2011-05-20 Thread Terry Carmen
Sorry, typo:

Should be: Error: Could not find any host matching '$HOSTNAME$'

I was trying other macros and neither hostname or hostalias worked.

Thanks,

Terry
--
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay___
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] Macro Expansion Problem

2011-05-20 Thread Terry Carmen
Quoting Jonathan Angliss j...@netdork.net:

 That's not to say you won't see it defined in a service, but less likely
 than a command.  What made you think $HOSTNAME$ was valid there? If it
 was valid, what value should it take? What are you trying to achieve?

I would like to define it in the define host section as below, and have it 
expanded in the define service section right below it (in the same file).

It seems inefficient to be required to define an explicit hostname in each 
section of an object definition.

define host{
host_name               mymachine
hostgroups              MyGroup
alias                   mymachine
address                 10.1.2.100
max_check_attempts      5
contact_groups          admins
check_command           check-host-alive
}
define service{
use generic-service
host_name       %HOSTNAME%
 should expand to mymachine

service_description             PING
check_command                   check_ping!100.0,20%!500.0,60%
}
--
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay___
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] Newbie Question

2011-05-16 Thread Terry Carmen
Quoting Matty Sarro msa...@gmail.com:

  Hey everyone,
  I am still a newbie to nagios, so please bear with me. I am trying to
  find a plugin that will monitor the contents of a particular DB table.
  If certain status codes show up, then generate an alert. Is there
  something available off the shelf that can do this?

FWIW, you might be looking at the wrong end of the problem.

Instead of having Nagios constantly query the database for your status codes, 
why don't you add a trigger on the table to do what you want when the record is 
updated. This could include generating a trap or notifying Nagios though 
another method.

It's much more efficient to work with the actual data at the source, than to 
keep watching from the outside.

http://dev.mysql.com/doc/refman/5.0/en/create-trigger.html

Terry

--
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay___
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] Message Subject - PROBLEM Service Alert: hostname is UP (fixed)

2011-05-13 Thread Terry Carmen
Quoting Terry Carmen te...@cnysupport.com:

 I've been receiving a continuous stream of these messages and can't
 seem to figure out why or make them stop.

 Nagios is sending repeated notifications that various hosts are up
 even though they have never been down.

 I've googled a number of similar problems, but unfortunately no
 applicable solutions.

 Does anybody have any ideas what I could check?

Here's an update:

I found a seemingly unrelated problem. I had duplicated the  
notify-host-by-email command into the notify-service-by-email command.

While this accounted for the inappropriate message content, fixing it  
seems to have also fixed the repeating notifications (haven't received  
any in a while).

No idea why fixing the invalid message text would also fix the  
repeating notifications, but it seems OK now.

I'm posting the answer here in case anybody else runs into this problem.

The lines below are working nicely on a system that uses postfix as  
the mailer.

This also takes care of postix's sendmail not respecting the -s  
(subject) command line option. The macros below add the subject to the  
message.

// from commands.cfg ///

# 'notify-host-by-email' command definition
define command{
command_namenotify-host-by-email
command_line/usr/bin/printf %b Subject: ** $NOTIFICATIONTYPE$  
Host Alert: $HOSTNAME$ is $HOSTSTATE$ **\n\n* Nagios  
*\n\nNotification Type: $NOTIFICATIONTYPE$\nHost:  
$HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo:  
$HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n\nService:  
$SERVICECHECKCOMMAND$Host Output: [$HOSTOUTPUT$]\n\nHost Output  
(Long): $LONGHOSTOUTPUT$\n\nPerformance Data: $HOSTPERFDATA$\n\n |  
/usr/sbin/sendmail -f nag...@example.com $CONTACTEMAIL$
}

# 'notify-service-by-email' command definition
define command{
command_namenotify-service-by-email
command_line/usr/bin/printf %b Subject: ** $NOTIFICATIONTYPE$  
alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **\n\n* Nagios  
@VERSION@ *\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService:  
$SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState:  
$SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nService Output:  
$SERVICEOUTPUT$\n\nLong Service Output:  
$LONGSERVICEOUTPUT$\n\nAdditional Info:\n\n$OUTPUT$ |  
/usr/sbin/sendmail -f nag...@example.com $CONTACTEMAIL$
}


--
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
___
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