[Nagios-users] error check_snmp for UPS

2009-10-01 Thread nadia kheffache

Hi,

I wont to monitor an ups (onduleur),i use a basic nagios plugin_snmp.

but i have these error, i can't get any information about this ups.

can you help me please?

thank you

[nag...@nagios01 libexec]$ ./check_snmp -H UPS-onduleur1 -C public - o 
.1.3.6.1.4.1.4555.1.1.1.1.6.2.1.1.17 .w 185:210 -c 286:999  -l '\Input 
Voltage\' -u '\Volts\'

\Input Voltage\ problème - Pas de données reçues de l'hôte

Commande: /usr/bin/snmpget -t 1 -r 5 -m '' -v 1 [authpriv] UPS-onduleur1:161



Nadia


  

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
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] RE [spam?] error check_snmp for UPS

2009-10-01 Thread frank . bourdeau
Hi,

Have you test with snmpwalk to see if you UPS onduleur respond ? Is the 
UPS mib installed on the nagios server ?

Frank

email: frank.bourd...@dga.defense.gouv.fr
fonction: administrateur systèmes et réseaux
tel: 0241936560 
fax: 0241936681
ETAS - BP 60036 - route de Laval - 49245 AVRILLE CEDEX
[ENVOYE PAR INTERNET]



nadia kheffache nadiakheffa...@yahoo.fr 
01/10/2009 10:16

A
nagios-users@lists.sourceforge.net
cc

Objet
[spam?] [Nagios-users] error check_snmp for UPS







Hi,

I wont to monitor an ups (onduleur),i use a basic nagios plugin_snmp.

but i have these error, i can't get any information about this ups.

can you help me please?

thank you

[nag...@nagios01 libexec]$ ./check_snmp -H UPS-onduleur1 -C public - o 
.1.3.6.1.4.1.4555.1.1.1.1.6.2.1.1.17 .w 185:210 -c 286:999  -l '\Input 
Voltage\' -u '\Volts\'

\Input Voltage\ problème - Pas de données reçues de l'hôte

Commande: /usr/bin/snmpget -t 1 -r 5 -m '' -v 1 [authpriv] 
UPS-onduleur1:161



Nadia


 

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register 
now#33;
http://p.sf.net/sfu/devconf
___
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



--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
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] Fw : Re : RE [spam?] error check_snmp for UPS

2009-10-01 Thread nadia kheffache
Hi Franck,
 
 I think i have a probleme with my oids, i have the mib
 file, but i dont'know how to use it to define these oid? i
 take one in the internet!
 
 but how can i use the the mib file? i use this link to
 monitor my ups:
 http://wiki.nagios.org/index.php/Howtos:snmp-apc-smart-ups
 
 please, how can i use the mib file?
 
 the snmpwalk guives me lot of information:
 
 [nag...@nagios01 libexec]$ snmpwalk -c public -v 3 -H
 UPS-onduleur1 IfranIfDescr         
                
         Configuration directives
 understood:
 
 No log handling enabled - turning on stderr logging
 
   In snmpwalk.conf and snmpwalk.local.conf:
 
     includeRequested     
    (1|yes|true|0|no|false)
 
     excludeRequested     
    (1|yes|true|0|no|false)
 
     printStatistics       
   (1|yes|true|0|no|false)
 
     dontCheckOrdering       
 (1|yes|true|0|no|false)
 
     timeResults         
     (1|yes|true|0|no|false)
 
   In snmp.conf and snmp.local.conf:
 
     doDebugging         
     (1|0)
 
     debugTokens         
     token[,token...]
 
     logTimestamp       
      (1|yes|true|0|no|false)
 
     mibdirs         
         [mib-dirs|+mib-dirs|-mib-dirs]
 
     mibs           
      
    [mib-tokens|+mib-tokens]
 
     mibfile         
         mibfile-to-read
 
     showMibErrors       
     (1|yes|true|0|no|false)
 
     strictCommentTerm       
 (1|yes|true|0|no|false)
 
     mibAllowUnderline       
 (1|yes|true|0|no|false)
 
     mibWarningLevel       
   integerValue
 
     mibReplaceWithLatest 
    (1|yes|true|0|no|false)
 
     printNumericEnums       
 (1|yes|true|0|no|false)
 
     printNumericOids     
    (1|yes|true|0|no|false)
 
     escapeQuotes       
      (1|yes|true|0|no|false)
 
     dontBreakdownOids       
 (1|yes|true|0|no|false)
 
     quickPrinting       
     (1|yes|true|0|no|false)
 
     numericTimeticks     
    (1|yes|true|0|no|false)
 
     oidOutputFormat       
   integerValue
 
     suffixPrinting       
    integerValue
 
     extendedIndex       
     (1|yes|true|0|no|false)
 
     printHexText       
      (1|yes|true|0|no|false)
 
     printValueOnly       
    (1|yes|true|0|no|false)
 
     dontPrintUnits       
    (1|yes|true|0|no|false)
 
     hexOutputLength       
   integerValue
 
     dumpPacket         
      (1|yes|true|0|no|false)
 
     reverseEncodeBER     
    (1|yes|true|0|no|false)
 
     defaultPort         
     integerValue
 
     defCommunity       
      string
 
     noTokenWarnings       
   (1|yes|true|0|no|false)
 
     noRangeCheck       
      (1|yes|true|0|no|false)
 
     persistentDir       
     string
 
     tempFilePattern       
   string
 
     noDisplayHint       
     (1|yes|true|0|no|false)
 
     16bitIDs         
        (1|yes|true|0|no|false)
 
     clientaddr         
      string
 
     serverSendBuf       
     integerValue
 
     serverRecvBuf       
     integerValue
 
     clientSendBuf       
     integerValue
 
     clientRecvBuf       
     integerValue
 
     noPersistentLoad     
    (1|yes|true|0|no|false)
 
     noPersistentSave     
    (1|yes|true|0|no|false)
 
    defSecurityModel     
    string
 
     defSecurityName       
   string
 
     defContext         
      string
 
     defPassphrase       
     string
 
     defAuthPassphrase       
 string
 
     defPrivPassphrase       
 string
 
     defAuthMasterKey     
    string
 
     defPrivMasterKey     
    string
 
     defAuthLocalizedKey     
 string
 
     defPrivLocalizedKey     
 string
 
     defVersion         
      1|2c|3
 
     defAuthType         
     MD5|SHA
 
     defPrivType         
     DES|AES
 
     defSecurityLevel     
    noAuthNoPriv|authNoPriv|authPriv
 
   In snmpapp.conf and snmpapp.local.conf:
 
     engineID         
        string
 
     engineIDType       
      num
 
     engineIDNic         
     string
 
 
 
 
 --- En date de : Jeu 1.10.09, frank.bourd...@dga.defense.gouv.fr
 frank.bourd...@dga.defense.gouv.fr
 a écrit :
 
  De: frank.bourd...@dga.defense.gouv.fr
 frank.bourd...@dga.defense.gouv.fr
  Objet: RE [spam?] [Nagios-users] error check_snmp for
 UPS
  À: nadia kheffache nadiakheffa...@yahoo.fr
  Cc: nagios-users@lists.sourceforge.net
  Date: Jeudi 1 Octobre 2009, 10h37
  Hi,
  
  Have you test with snmpwalk to see if you UPS
 onduleur
  respond ? Is the 
  UPS mib installed on the nagios server ?
  
  Frank
  
  email: frank.bourd...@dga.defense.gouv.fr
  fonction: administrateur systèmes et réseaux
  tel: 0241936560 
  fax: 0241936681
  ETAS - BP 60036 - route de Laval - 49245 AVRILLE
 CEDEX
  [ENVOYE PAR INTERNET]
  
  
  
  nadia kheffache nadiakheffa...@yahoo.fr
  
  01/10/2009 10:16
  
  A
  nagios-users@lists.sourceforge.net
  cc
  
  Objet
  [spam?] [Nagios-users] error check_snmp for UPS
  
  
  
  
  
  
  
  Hi,
  
  I wont to monitor an ups (onduleur),i use a basic
 nagios
  plugin_snmp.
  
  but i have these error, i can't get any information
 about
  this ups.
  
  can you help me please?
  
  thank 

[Nagios-users] disable all authentication

2009-10-01 Thread Albert Shih
Hi all

How can I disable all authentication on Nagios ? (It's not for production,
and I known what I'm doing ;-) )

I've put

use_authentication=0
default_user_name=guest

and put «*» on 

authorized_for_system_information=*
authorized_for_configuration_information=*
authorized_for_system_commands=*
authorized_for_all_services=*
authorized_for_all_hosts=*
authorized_for_all_service_commands=*
authorized_for_all_host_commands=*

but when I try to access on any «Service Commands» I've got a message from
HAL 9000.

If it's not possible to do that, what's the more simple method to do a
authentication ? 

Regards.
-- 
Albert SHIH
SIO batiment 15
Observatoire de Paris Meudon
5 Place Jules Janssen
92195 Meudon Cedex
Téléphone : 01 45 07 76 26/06 86 69 95 71
Heure local/Local time:
Jeu 1 oct 2009 11:14:48 CEST

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
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 monitor a linux file opened closed status using Nagios

2009-10-01 Thread Selvakumar A
Hi,
  Thanks for your guidance.I followed your instructions.I installed net_nc in 
windows-XP and  I could only get the file's modified time.
  I am also interested to know about how to monitor a linux file's status 
whether it is opened or closed and modified etc.I used chech_file_age plugin 
which gives only the age of the file.Is there any way please help me.

Regards

A.Selvakumar



 



-Original Message-
From: Anthony Montibello [mailto:amontibe...@gmail.com]
Sent: Thu 10/1/2009 6:53 AM
To: Selvakumar A
Cc: nagios-users@lists.sourceforge.net
Subject: Re: [Nagios-users] How to monitor a windows file using Nagios
 
Hi,
It sounds like it is returning the Directory Age and not the Age of the
Files in the directory.

Check_nt requires a Plugin on the Windows Host,
So what plugin is on the Windows Host?

Nc_net should allow for testing Modified Date via Check_nc_net of both Files
or directorys.
Windows will report different values for these, and nc_net has options to
choose between these.

I do not know how this is implemented through the other Windows Plugins.

An alternative if you cannot find a plugin to do it, is to write a VB script

then send the results via NSCA, or Fetch usin NRPE.

Tony (Author of NC_NEt)

On Tue, Sep 29, 2009 at 12:42 AM, Selvakumar A selvakuma...@europlex.inwrote:

  Hi,
 I would like to know  How to monitor a windows file using nagios. I
 would like to monitor whether the file is opened or closed,and its size
 etc.I checked with check_nt plugin but  I got the result what I did not
 expect.The output shows the files age as 478years for all files. So anybody
 know how to monitor a windows file? Thanks  a lot in advance!!



 Regards

 A.Selvakumar



 This message (including attachments) is confidential and may be privileged. 
 If you have
 received it by mistake please notify the sender by return e-mail and delete 
 this message
 from your system. You may not copy, disclose or use the contents in any way. 
 SBTPL
 does not guarantee integrity of this communication nor is that this 
 communication free of
 issues, interceptions or interference. This communication does not create or 
 modify any
 contract, and unless otherwise stated, is not intended to be contractually 
 binding. Views
 or opinions expressed in this e-mail message are those of the author only.



 --
 Come build with us! The BlackBerryreg; Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay
 ahead of the curve. Join us from November 9-12, 2009. Register now!
 http://p.sf.net/sfu/devconf
 ___
 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 message (including attachments) is confidential and may be privileged. If 
you have 
received it by mistake please notify the sender by return e-mail and delete 
this message 
from your system. You may not copy, disclose or use the contents in any way. 
SBTPL 
does not guarantee integrity of this communication nor is that this 
communication free of 
issues, interceptions or interference. This communication does not create or 
modify any 
contract, and unless otherwise stated, is not intended to be contractually 
binding. Views 
or opinions expressed in this e-mail message are those of the author only.
--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf___
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] Re : RE [spam?] error check_snmp for UPS

2009-10-01 Thread nadia kheffache
Can you help me please? i have the same error when i execute this commande:

command_line $USER1$/check_snmp -H $HOSTADDRESS$ -o 
.1.3.6.1.4.1.3854.1.2.2.1.16.1.3.0 -w $ARG2$:$ARG1$ -c $ARG4$:$ARG3$ -C $ARG5$ 
-l
Temperature -u °C

./check_snmp -H sensorIP -v 1 -o .1.3.6.1.4.1.3854.1.2.2.1.16.1.3.0 -w 25:29 -c 
30:99 -C public -l Temperature -u °C

Temperature problème - Pas de donnèes reçues de l'hôte
Commande: /usr/bin/snmpget -t 1 -r 5 -m '' -v 1 [authpriv] 1:161  
.1.3.6.1.4.1.3854.1.2.2.1.16.1.3.0

to monitore the temperature in the local server with sensorIP, snmpwalk is ok,

i have the same error with the UPS-onduleur

thank you


--- En date de : Jeu 1.10.09, frank.bourd...@dga.defense.gouv.fr 
frank.bourd...@dga.defense.gouv.fr a écrit :

 De: frank.bourd...@dga.defense.gouv.fr frank.bourd...@dga.defense.gouv.fr
 Objet: RE [spam?] [Nagios-users] error check_snmp for UPS
 À: nadia kheffache nadiakheffa...@yahoo.fr
 Cc: nagios-users@lists.sourceforge.net
 Date: Jeudi 1 Octobre 2009, 10h37
 Hi,
 
 Have you test with snmpwalk to see if you UPS onduleur
 respond ? Is the 
 UPS mib installed on the nagios server ?
 
 Frank
 
 email: frank.bourd...@dga.defense.gouv.fr
 fonction: administrateur systèmes et réseaux
 tel: 0241936560 
 fax: 0241936681
 ETAS - BP 60036 - route de Laval - 49245 AVRILLE CEDEX
 [ENVOYE PAR INTERNET]
 
 
 
 nadia kheffache nadiakheffa...@yahoo.fr
 
 01/10/2009 10:16
 
 A
 nagios-users@lists.sourceforge.net
 cc
 
 Objet
 [spam?] [Nagios-users] error check_snmp for UPS
 
 
 
 
 
 
 
 Hi,
 
 I wont to monitor an ups (onduleur),i use a basic nagios
 plugin_snmp.
 
 but i have these error, i can't get any information about
 this ups.
 
 can you help me please?
 
 thank you
 
 [nag...@nagios01 libexec]$ ./check_snmp -H UPS-onduleur1 -C
 public - o 
 .1.3.6.1.4.1.4555.1.1.1.1.6.2.1.1.17 .w 185:210 -c
 286:999  -l '\Input 
 Voltage\' -u '\Volts\'
 
 \Input Voltage\ problème - Pas de données reçues de
 l'hôte
 
 Commande: /usr/bin/snmpget -t 1 -r 5 -m '' -v 1 [authpriv]
 
 UPS-onduleur1:161
 
 
 
 Nadia
 
 
  
 
 --
 Come build with us! The BlackBerryreg; Developer
 Conference in SF, CA
 is the only developer event you need to attend this year.
 Jumpstart your
 developing skills, take BlackBerry mobile applications to
 market and stay 
 ahead of the curve. Join us from November 9-12, 2009.
 Register 
 now!
 http://p.sf.net/sfu/devconf
 ___
 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
 
 
 


  

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
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] disable all authentication

2009-10-01 Thread Marc Powell

On Oct 1, 2009, at 4:18 AM, Albert Shih wrote:

 Hi all

 How can I disable all authentication on Nagios ? (It's not for  
 production,
 and I known what I'm doing ;-) )

 I've put

 use_authentication=0
 default_user_name=guest

 and put «*» on

 authorized_for_system_information=*
 authorized_for_configuration_information=*
 authorized_for_system_commands=*
 authorized_for_all_services=*
 authorized_for_all_hosts=*
 authorized_for_all_service_commands=*
 authorized_for_all_host_commands=*

I'm 99% certain wildcards are not supported here. Have you seen in the  
documentation that they are supported? Use the real user_name 'guest'  
here.

--
Marc


--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
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 monitor a linux file opened closed status using Nagios

2009-10-01 Thread Marc Powell

On Oct 1, 2009, at 6:48 AM, Selvakumar A wrote:

 Hi,
   Thanks for your guidance.I followed your instructions.I installed  
 net_nc in windows-XP and  I could only get the file's modified time.
   I am also interested to know about how to monitor a linux file's  
 status whether it is opened or closed and modified etc.I used  
 chech_file_age plugin which gives only the age of the file.Is there  
 any way please help me.

I'm not aware of any plugins that check these. If you decide to write  
your own plugin, lsof (when run using sudo) will be your friend.

'is opened' - specified file appears in the output of lsof
'is closed' - specified file does not appear in the output of lsof
'is modified' - depends on what you mean by modified. File age may be  
sufficient but if you want to see if actual changes were made you'll  
need to create a copy at each run and compare the current with the  
previous (using cmp or diff, for example).

A quick google for 'nagios check lsof' doesn't yield any interesting  
initial results but you might have luck further in the search results.

--
Marc


--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
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] Not sending e-mails

2009-10-01 Thread Scott Miller
I know this has been hit over and over, and I've read literally everything I
could find, but to no avail.  I have a newly install of Nagios 3.2.0 on a
Fedora Core 8 with Postfix/Dovecot.  I have a modified script (postfix mail
queue monitor I shared a week or so ago).  The only thing Nagios is doing on
this box is looking at local services.  When I change any threshold so I
will go into alarm, it does, but no e-mails get sent out.  

I can see in my logs the following when something comes into alarm:

[1254408621] SERVICE ALERT: localhost;Postfix Mail
Queue;CRITICAL;SOFT;1;CRITICAL: Postfix mailq has 14 messages queued for a
total of 12492 Kbytes.
[1254408651] SERVICE ALERT: localhost;Current Load;OK;SOFT;2;OK - load
average: 4.87, 2.73, 1.43
[1254408681] SERVICE ALERT: localhost;Postfix Mail
Queue;CRITICAL;SOFT;2;CRITICAL: Postfix mailq has 16 messages queued for a
total of 12497 Kbytes.
[1254408741] SERVICE ALERT: localhost;Postfix Mail
Queue;CRITICAL;SOFT;3;CRITICAL: Postfix mailq has 16 messages queued for a
total of 12689 Kbytes.
[1254408801] SERVICE ALERT: localhost;Postfix Mail
Queue;CRITICAL;HARD;4;CRITICAL: Postfix mailq has 15 messages queued for a
total of 12494 Kbytes.
[1254408801] SERVICE NOTIFICATION: nagiosadmin2;localhost;Postfix Mail
Queue;CRITICAL;notify-service-by-email;CRITICAL: Postfix mailq has 15
messages queued for a total of 12494 Kbytes.
[1254408801] SERVICE NOTIFICATION: nagiosadmin;localhost;Postfix Mail
Queue;CRITICAL;notify-service-by-email;CRITICAL: Postfix mailq has 15
messages queued for a total of 12494 Kbytes.

Wondering if anyone could double check the pertinent parts of my config?

Thanks in advance.

Scott Miller




contacts.cfg

define contact{
contact_namenagiosadmin ; Short name
of user
use generic-contact ; Inherit
default values from generic-contact template (defined above)
alias   Nagios Admin; Full name
of user
email srmil...@interbel.net ; *
CHANGE THIS TO YOUR EMAIL ADDRESS **
}

define contact{
contact_namenagiosadmin2; Short name
of user
use generic-contact ; Inherit
default values from generic-contact template (defined above)
alias   Nagios Admin; Full name
of user
email ...@vzwpix.com; *
CHANGE THIS TO YOUR EMAIL ADDRESS **
}


define contactgroup{
contactgroup_name   admins
alias   Nagios Administrators
members nagiosadmin,nagiosadmin2
}


hosts.cfg
=
define hostgroup{
hostgroup_name  Postfix Server
 alias  POSTFIX-SERVERS ; Long name of the group
members localhost ; Comma separated list of hosts that
belong to this group
}


localhost.cfg
=
define host{
use linux-server; 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   localhost
alias   localhost
address 127.0.0.1
icon_image  redhat.jpg
}

define hostgroup{
hostgroup_name  linux-servers ; The name of the hostgroup
alias   Linux Servers ; Long name of the group
members localhost ; Comma separated list of hosts that
belong to this group
}

define service{
use local-service ; Name of
service template to use
host_name   localhost
service_description Postfix Mail Queue
check_command   check_postfix_mailq!5!10
}


templates.cfg
=
define contact{
namegeneric-contact ; The name
of this contact template
service_notification_period 24x7; service
notifications can be sent anytime
host_notification_period24x7; host
notifications can be sent anytime
service_notification_optionsw,u,c,r,f,s ; send
notifications for all service states, flapping events, and scheduled
downtime events
host_notification_options   d,u,r,f,s   ; send
notifications for all host states, flapping events, and scheduled downtime
events
service_notification_commands   notify-service-by-email ; send
service notifications via email
host_notification_commands  notify-host-by-email; send host

Re: [Nagios-users] Not sending e-mails

2009-10-01 Thread Morris, Patrick
Scott Miller wrote:
 I know this has been hit over and over, and I've read literally everything I
 could find, but to no avail.  I have a newly install of Nagios 3.2.0 on a
 Fedora Core 8 with Postfix/Dovecot.  I have a modified script (postfix mail
 queue monitor I shared a week or so ago).  The only thing Nagios is doing on
 this box is looking at local services.  When I change any threshold so I
 will go into alarm, it does, but no e-mails get sent out.

 I can see in my logs the following when something comes into alarm:

 [1254408621] SERVICE ALERT: localhost;Postfix Mail
 Queue;CRITICAL;SOFT;1;CRITICAL: Postfix mailq has 14 messages queued for a
 total of 12492 Kbytes.
 [1254408651] SERVICE ALERT: localhost;Current Load;OK;SOFT;2;OK - load
 average: 4.87, 2.73, 1.43
 [1254408681] SERVICE ALERT: localhost;Postfix Mail
 Queue;CRITICAL;SOFT;2;CRITICAL: Postfix mailq has 16 messages queued for a
 total of 12497 Kbytes.
 [1254408741] SERVICE ALERT: localhost;Postfix Mail
 Queue;CRITICAL;SOFT;3;CRITICAL: Postfix mailq has 16 messages queued for a
 total of 12689 Kbytes.
 [1254408801] SERVICE ALERT: localhost;Postfix Mail
 Queue;CRITICAL;HARD;4;CRITICAL: Postfix mailq has 15 messages queued for a
 total of 12494 Kbytes.
 [1254408801] SERVICE NOTIFICATION: nagiosadmin2;localhost;Postfix Mail
 Queue;CRITICAL;notify-service-by-email;CRITICAL: Postfix mailq has 15
 messages queued for a total of 12494 Kbytes.
 [1254408801] SERVICE NOTIFICATION: nagiosadmin;localhost;Postfix Mail
 Queue;CRITICAL;notify-service-by-email;CRITICAL: Postfix mailq has 15
 messages queued for a total of 12494 Kbytes.

 Wondering if anyone could double check the pertinent parts of my config?

 Thanks in advance.

 Scott Miller

What's in your mail log?  Nagios is trying to send notifications using 
the command you've defined, according to the logs. You haven't provided 
the definition for that command (notify-service-by-email), but I assume 
it's trying to send an email.

If you're using anything like the example commands that come with 
Nagios, it is probably using something like /bin/mail to send the 
message, and your mail log would be a good place to look for why it's 
not being delivered.

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
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] getting repeat emails

2009-10-01 Thread Kriek Jooste
I am sure I am missing something simple, and would like some extra eyes on this.

The effect I'm seeing is that when a service is in a state I want to
send notifications (e.g. CRITICAL) for, it seems to keep on sending
notifications out, every 20 or 30 minutes or so.  For example:
2009-9-29 13:36:38  SERVICE NOTIFICATION:
kriek-email;kokeyserver;Login
Requests;CRITICAL;notify-by-email;CRITICAL LoginRequests:1065(1000.0)
2009-9-29 14:06:25  SERVICE NOTIFICATION:
kriek-email;kokeyserver;Login
Requests;CRITICAL;notify-by-email;CRITICAL LoginRequests:1128(1000.0)
2009-9-29 14:46:33  SERVICE NOTIFICATION:
kriek-email;kokeyserver;Login
Requests;CRITICAL;notify-by-email;CRITICAL LoginRequests:1046(1000.0)

What I want is for it to notify me only once when it goes from OK to
CRITICAL, until the service is OK again.

I would have thought this is controlled by notification interval, but
here's the service from the objects cache:

define service {
host_name   kokeyserver
service_description Login Requests
check_period24x7
check_command   service-is-stale
contact_groups  linux-admins
notification_period 24x7
initial_state   o
check_interval  5.00
retry_interval  1.00
max_check_attempts  3
is_volatile 0
parallelize_check   1
active_checks_enabled   0
passive_checks_enabled  1
obsess_over_service 0
event_handler_enabled   1
low_flap_threshold  0.00
high_flap_threshold 0.00
flap_detection_enabled  0
flap_detection_options  o,w,u,c
freshness_threshold 1800
check_freshness 1
notification_optionsu,w,c,r
notifications_enabled   1
notification_interval   10080.00
first_notification_delay0.00
stalking_optionsn
process_perf_data   1
failure_prediction_enabled  1
retain_status_information   1
retain_nonstatus_information1
}

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
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] FW: Not sending e-mails

2009-10-01 Thread Scott Miller

Scott Miller wrote:
 I know this has been hit over and over, and I've read literally
everything I
 could find, but to no avail.  I have a newly install of Nagios 3.2.0 on a
 Fedora Core 8 with Postfix/Dovecot.  I have a modified script (postfix
mail
 queue monitor I shared a week or so ago).  The only thing Nagios is doing
on
 this box is looking at local services.  When I change any threshold so I
 will go into alarm, it does, but no e-mails get sent out.

 I can see in my logs the following when something comes into alarm:

 [1254408621] SERVICE ALERT: localhost;Postfix Mail
 Queue;CRITICAL;SOFT;1;CRITICAL: Postfix mailq has 14 messages queued for
a
 total of 12492 Kbytes.
 [1254408651] SERVICE ALERT: localhost;Current Load;OK;SOFT;2;OK - load
 average: 4.87, 2.73, 1.43
 [1254408681] SERVICE ALERT: localhost;Postfix Mail
 Queue;CRITICAL;SOFT;2;CRITICAL: Postfix mailq has 16 messages queued for
a
 total of 12497 Kbytes.
 [1254408741] SERVICE ALERT: localhost;Postfix Mail
 Queue;CRITICAL;SOFT;3;CRITICAL: Postfix mailq has 16 messages queued for
a
 total of 12689 Kbytes.
 [1254408801] SERVICE ALERT: localhost;Postfix Mail
 Queue;CRITICAL;HARD;4;CRITICAL: Postfix mailq has 15 messages queued for
a
 total of 12494 Kbytes.
 [1254408801] SERVICE NOTIFICATION: nagiosadmin2;localhost;Postfix Mail
 Queue;CRITICAL;notify-service-by-email;CRITICAL: Postfix mailq has 15
 messages queued for a total of 12494 Kbytes.
 [1254408801] SERVICE NOTIFICATION: nagiosadmin;localhost;Postfix Mail
 Queue;CRITICAL;notify-service-by-email;CRITICAL: Postfix mailq has 15
 messages queued for a total of 12494 Kbytes.

 Wondering if anyone could double check the pertinent parts of my config?

 Thanks in advance.

 Scott Miller

 What's in your mail log?  Nagios is trying to send notifications using 
 the command you've defined, according to the logs. You haven't provided 
 the definition for that command (notify-service-by-email), but I assume 
 it's trying to send an email.

 If you're using anything like the example commands that come with 
 Nagios, it is probably using something like /bin/mail to send the 
 message, and your mail log would be a good place to look for why it's 
 not being delivered.

Sorry - didn't include that from the commands.cfg - Here's what I have.

commands.cfg

# 'notify-host-by-email' command definition
define command{
command_namenotify-host-by-email
command_line/usr/bin/printf %b * Nagios
*\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState:
$HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time:
$LONGDATETIME$\n | /bin/mail -s ** $NOTIFICATIONTYPE$ Host Alert:
$HOSTNAME$ is $HOSTSTATE$ ** $CONTACTEMAIL$
}

# 'notify-service-by-email' command definition
define command{
command_namenotify-service-by-email
command_line/usr/bin/printf %b * Nagios
*\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService:
$SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState:
$SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional
Info:\n\n$SERVICEOUTPUT$ | /bin/mail -s ** $NOTIFICATIONTYPE$ Service
Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ ** $CONTACTEMAIL$
}

This is the exact same way I have it on another machine running checks for
multiple boxes and devices.  The only difference, is this server is running
Postfix, the other (working) is running Sendmail.

In my logs:
/var/log/maillog - grep for nagios - there's nothing
/var/log/messages shows
Oct  1 10:53:20 mail4 nagios: SERVICE NOTIFICATION:
nagiosadmin2;localhost;Postfix Mail
Queue;CRITICAL;notify-service-by-email;CRITICAL: Postfix mailq has 13
messages queued for a total of 3326 Kbytes.
Oct  1 10:53:20 mail4 nagios: SERVICE NOTIFICATION:
nagiosadmin;localhost;Postfix Mail
Queue;CRITICAL;notify-service-by-email;CRITICAL: Postfix mailq has 13
messages queued for a total of 3326 Kbytes.

Looks like it's trying - maybe something in Postfix stoping it?  I'll have
to do a bit more digging and testing.

Scott Miller



--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
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] FW: Not sending e-mails

2009-10-01 Thread Martin Melin
Try simply copying the command_line for notify-service-by-email and running
it in a shell yourself. Or just do:
# echo Hello world | /bin/mail -s Test Email r...@localhost

On Thu, Oct 1, 2009 at 8:28 PM, Scott Miller srmil...@interbel.net wrote:


 Scott Miller wrote:
  I know this has been hit over and over, and I've read literally
 everything I
  could find, but to no avail.  I have a newly install of Nagios 3.2.0 on
 a
  Fedora Core 8 with Postfix/Dovecot.  I have a modified script (postfix
 mail
  queue monitor I shared a week or so ago).  The only thing Nagios is
 doing
 on
  this box is looking at local services.  When I change any threshold so I
  will go into alarm, it does, but no e-mails get sent out.
 
  I can see in my logs the following when something comes into alarm:
 
  [1254408621] SERVICE ALERT: localhost;Postfix Mail
  Queue;CRITICAL;SOFT;1;CRITICAL: Postfix mailq has 14 messages queued for
 a
  total of 12492 Kbytes.
  [1254408651] SERVICE ALERT: localhost;Current Load;OK;SOFT;2;OK - load
  average: 4.87, 2.73, 1.43
  [1254408681] SERVICE ALERT: localhost;Postfix Mail
  Queue;CRITICAL;SOFT;2;CRITICAL: Postfix mailq has 16 messages queued for
 a
  total of 12497 Kbytes.
  [1254408741] SERVICE ALERT: localhost;Postfix Mail
  Queue;CRITICAL;SOFT;3;CRITICAL: Postfix mailq has 16 messages queued for
 a
  total of 12689 Kbytes.
  [1254408801] SERVICE ALERT: localhost;Postfix Mail
  Queue;CRITICAL;HARD;4;CRITICAL: Postfix mailq has 15 messages queued for
 a
  total of 12494 Kbytes.
  [1254408801] SERVICE NOTIFICATION: nagiosadmin2;localhost;Postfix Mail
  Queue;CRITICAL;notify-service-by-email;CRITICAL: Postfix mailq has 15
  messages queued for a total of 12494 Kbytes.
  [1254408801] SERVICE NOTIFICATION: nagiosadmin;localhost;Postfix Mail
  Queue;CRITICAL;notify-service-by-email;CRITICAL: Postfix mailq has 15
  messages queued for a total of 12494 Kbytes.
 
  Wondering if anyone could double check the pertinent parts of my config?
 
  Thanks in advance.
 
  Scott Miller
 
  What's in your mail log?  Nagios is trying to send notifications using
  the command you've defined, according to the logs. You haven't provided
  the definition for that command (notify-service-by-email), but I assume
  it's trying to send an email.
 
  If you're using anything like the example commands that come with
  Nagios, it is probably using something like /bin/mail to send the
  message, and your mail log would be a good place to look for why it's
  not being delivered.

 Sorry - didn't include that from the commands.cfg - Here's what I have.

 commands.cfg
 
 # 'notify-host-by-email' command definition
 define command{
command_namenotify-host-by-email
command_line/usr/bin/printf %b * Nagios
 *\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState:
 $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time:
 $LONGDATETIME$\n | /bin/mail -s ** $NOTIFICATIONTYPE$ Host Alert:
 $HOSTNAME$ is $HOSTSTATE$ ** $CONTACTEMAIL$
}

 # 'notify-service-by-email' command definition
 define command{
command_namenotify-service-by-email
command_line/usr/bin/printf %b * Nagios
 *\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService:
 $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState:
 $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional
 Info:\n\n$SERVICEOUTPUT$ | /bin/mail -s ** $NOTIFICATIONTYPE$ Service
 Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ ** $CONTACTEMAIL$
}

 This is the exact same way I have it on another machine running checks for
 multiple boxes and devices.  The only difference, is this server is running
 Postfix, the other (working) is running Sendmail.

 In my logs:
 /var/log/maillog - grep for nagios - there's nothing
 /var/log/messages shows
 Oct  1 10:53:20 mail4 nagios: SERVICE NOTIFICATION:
 nagiosadmin2;localhost;Postfix Mail
 Queue;CRITICAL;notify-service-by-email;CRITICAL: Postfix mailq has 13
 messages queued for a total of 3326 Kbytes.
 Oct  1 10:53:20 mail4 nagios: SERVICE NOTIFICATION:
 nagiosadmin;localhost;Postfix Mail
 Queue;CRITICAL;notify-service-by-email;CRITICAL: Postfix mailq has 13
 messages queued for a total of 3326 Kbytes.

 Looks like it's trying - maybe something in Postfix stoping it?  I'll have
 to do a bit more digging and testing.

 Scott Miller




 --
 Come build with us! The BlackBerryreg; Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay
 ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
 http://p.sf.net/sfu/devconf
 ___
 Nagios-users mailing list
 Nagios-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/nagios-users
 ::: Please include Nagios 

Re: [Nagios-users] FW: Not sending e-mails

2009-10-01 Thread Michael Saldivar
On Thu, Oct 1, 2009 at 12:28 PM, Scott Miller srmil...@interbel.net wrote:


 Scott Miller wrote:

 commands.cfg
 
 # 'notify-host-by-email' command definition
 define command{
command_namenotify-host-by-email
command_line/usr/bin/printf %b * Nagios
 *\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState:
 $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time:
 $LONGDATETIME$\n | /bin/mail -s ** $NOTIFICATIONTYPE$ Host Alert:
 $HOSTNAME$ is $HOSTSTATE$ ** $CONTACTEMAIL$
}

 # 'notify-service-by-email' command definition
 define command{
command_namenotify-service-by-email
command_line/usr/bin/printf %b * Nagios
 *\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService:
 $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState:
 $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional
 Info:\n\n$SERVICEOUTPUT$ | /bin/mail -s ** $NOTIFICATIONTYPE$ Service
 Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ ** $CONTACTEMAIL$
}



My Postfix e-mail commands look like this, with slightly different syntax:

# NEW '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* Nagios *\n\nNotification
Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress:
$HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n |
/usr/sbin/sendmail $CONTACTEMAIL$
}

# NEW 'notify-service-by-email' command definition
define command{
command_namenotify-service-by-email
command_line/usr/bin/printf %b Subject:** $NOTIFICATIONTYPE$
Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **\n* Nagios
*\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService:
$SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState:
$SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional
Info:\n\n$SERVICEOUTPUT$ | /usr/sbin/sendmail $CONTACTEMAIL$
}


-- 
Mike Saldivar
Direct Financial Solutions
Information Systems Manager
Desk: 435-774-8252
Cell: 435-881-3778
--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf___
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] FW: Not sending e-mails

2009-10-01 Thread Morris, Patrick
Scott Miller wrote:
 Scott Miller wrote:
   
 I know this has been hit over and over, and I've read literally
   
 everything I
   
 could find, but to no avail.  I have a newly install of Nagios 3.2.0 on a
 Fedora Core 8 with Postfix/Dovecot.  I have a modified script (postfix
   
 mail
   
 queue monitor I shared a week or so ago).  The only thing Nagios is doing
   
 on
   
 this box is looking at local services.  When I change any threshold so I
 will go into alarm, it does, but no e-mails get sent out.

 I can see in my logs the following when something comes into alarm:

 [1254408621] SERVICE ALERT: localhost;Postfix Mail
 Queue;CRITICAL;SOFT;1;CRITICAL: Postfix mailq has 14 messages queued for
   
 a
   
 total of 12492 Kbytes.
 [1254408651] SERVICE ALERT: localhost;Current Load;OK;SOFT;2;OK - load
 average: 4.87, 2.73, 1.43
 [1254408681] SERVICE ALERT: localhost;Postfix Mail
 Queue;CRITICAL;SOFT;2;CRITICAL: Postfix mailq has 16 messages queued for
   
 a
   
 total of 12497 Kbytes.
 [1254408741] SERVICE ALERT: localhost;Postfix Mail
 Queue;CRITICAL;SOFT;3;CRITICAL: Postfix mailq has 16 messages queued for
   
 a
   
 total of 12689 Kbytes.
 [1254408801] SERVICE ALERT: localhost;Postfix Mail
 Queue;CRITICAL;HARD;4;CRITICAL: Postfix mailq has 15 messages queued for
   
 a
   
 total of 12494 Kbytes.
 [1254408801] SERVICE NOTIFICATION: nagiosadmin2;localhost;Postfix Mail
 Queue;CRITICAL;notify-service-by-email;CRITICAL: Postfix mailq has 15
 messages queued for a total of 12494 Kbytes.
 [1254408801] SERVICE NOTIFICATION: nagiosadmin;localhost;Postfix Mail
 Queue;CRITICAL;notify-service-by-email;CRITICAL: Postfix mailq has 15
 messages queued for a total of 12494 Kbytes.

 Wondering if anyone could double check the pertinent parts of my config?

 Thanks in advance.

 Scott Miller
   
 What's in your mail log?  Nagios is trying to send notifications using 
 the command you've defined, according to the logs. You haven't provided 
 the definition for that command (notify-service-by-email), but I assume 
 it's trying to send an email.

 If you're using anything like the example commands that come with 
 Nagios, it is probably using something like /bin/mail to send the 
 message, and your mail log would be a good place to look for why it's 
 not being delivered.
 

 Sorry - didn't include that from the commands.cfg - Here's what I have.

 commands.cfg
 
 # 'notify-host-by-email' command definition
 define command{
   command_namenotify-host-by-email
   command_line/usr/bin/printf %b * Nagios
 *\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState:
 $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time:
 $LONGDATETIME$\n | /bin/mail -s ** $NOTIFICATIONTYPE$ Host Alert:
 $HOSTNAME$ is $HOSTSTATE$ ** $CONTACTEMAIL$
   }

 # 'notify-service-by-email' command definition
 define command{
   command_namenotify-service-by-email
   command_line/usr/bin/printf %b * Nagios
 *\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService:
 $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState:
 $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional
 Info:\n\n$SERVICEOUTPUT$ | /bin/mail -s ** $NOTIFICATIONTYPE$ Service
 Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ ** $CONTACTEMAIL$
   }

 This is the exact same way I have it on another machine running checks for
 multiple boxes and devices.  The only difference, is this server is running
 Postfix, the other (working) is running Sendmail.

 In my logs:
 /var/log/maillog - grep for nagios - there's nothing
 /var/log/messages shows
 Oct  1 10:53:20 mail4 nagios: SERVICE NOTIFICATION:
 nagiosadmin2;localhost;Postfix Mail
 Queue;CRITICAL;notify-service-by-email;CRITICAL: Postfix mailq has 13
 messages queued for a total of 3326 Kbytes.
 Oct  1 10:53:20 mail4 nagios: SERVICE NOTIFICATION:
 nagiosadmin;localhost;Postfix Mail
 Queue;CRITICAL;notify-service-by-email;CRITICAL: Postfix mailq has 13
 messages queued for a total of 3326 Kbytes.

 Looks like it's trying - maybe something in Postfix stoping it?  I'll have
 to do a bit more digging and testing.
   
Look fine. Check your mail logs.

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
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] remote check with no nagios tools at remote node

2009-10-01 Thread G. S. Marzot


Along the lines of probing hosts that may or (more importantly) may not 
have nagios checks installed... I wonder if there is an ssh (there is 
often key based logins avail) based check that will run things like 'ps' 
or 'top' or various shell based commands and parse them to do some sort 
of health check...

thanks for any pointers.

-G

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
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] getting repeat emails

2009-10-01 Thread Fernando Rocha
Hi Kriek!

If you want just to be notified one time, you must set :
notification_interval 0

regards
-- 
Fernando Rocha fernando.ro...@opservices.com.br 
Analista de Suporte - Operação 
OpServices - Porto Alegre - RS - Brasil 
+55 51 3275.3588 
www.opservices.com.br 
www.opmon.org 


- Kriek Jooste nag...@speakopen.org wrote:

 I am sure I am missing something simple, and would like some extra
 eyes on this.
 
 The effect I'm seeing is that when a service is in a state I want to
 send notifications (e.g. CRITICAL) for, it seems to keep on sending
 notifications out, every 20 or 30 minutes or so.  For example:
 2009-9-29 13:36:38  SERVICE NOTIFICATION:
 kriek-email;kokeyserver;Login
 Requests;CRITICAL;notify-by-email;CRITICAL LoginRequests:1065(1000.0)
 2009-9-29 14:06:25  SERVICE NOTIFICATION:
 kriek-email;kokeyserver;Login
 Requests;CRITICAL;notify-by-email;CRITICAL LoginRequests:1128(1000.0)
 2009-9-29 14:46:33  SERVICE NOTIFICATION:
 kriek-email;kokeyserver;Login
 Requests;CRITICAL;notify-by-email;CRITICAL LoginRequests:1046(1000.0)
 
 What I want is for it to notify me only once when it goes from OK to
 CRITICAL, until the service is OK again.
 
 I would have thought this is controlled by notification interval, but
 here's the service from the objects cache:
 
 define service {
 host_name   kokeyserver
 service_description Login Requests
 check_period24x7
 check_command   service-is-stale
 contact_groups  linux-admins
 notification_period 24x7
 initial_state   o
 check_interval  5.00
 retry_interval  1.00
 max_check_attempts  3
 is_volatile 0
 parallelize_check   1
 active_checks_enabled   0
 passive_checks_enabled  1
 obsess_over_service 0
 event_handler_enabled   1
 low_flap_threshold  0.00
 high_flap_threshold 0.00
 flap_detection_enabled  0
 flap_detection_options  o,w,u,c
 freshness_threshold 1800
 check_freshness 1
 notification_optionsu,w,c,r
 notifications_enabled   1
 notification_interval   10080.00
 first_notification_delay0.00
 stalking_optionsn
 process_perf_data   1
 failure_prediction_enabled  1
 retain_status_information   1
 retain_nonstatus_information1
 }
 
 --
 Come build with us! The BlackBerryreg; Developer Conference in SF,
 CA
 is the only developer event you need to attend this year. Jumpstart
 your
 developing skills, take BlackBerry mobile applications to market and
 stay 
 ahead of the curve. Join us from November 9#45;12, 2009. Register
 now#33;
 http://p.sf.net/sfu/devconf
 ___
 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
 
 __

__

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
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] DHCP hosts

2009-10-01 Thread G. S. Marzot
Hari Sekhon wrote:
 G. S. Marzot wrote:
 Does anyone have a good solution for monitoring DHCP hosts which may 
 come and go? I would like to see them in some hostgroup when they are 
 active but not generate any alerts when gone...

 ideas?
   
 
 I wrote a plugin for dhcpd which lists hosts that currently have leases:
 
 http://www.monitoringexchange.org/cgi-bin/page.cgi?g=Detailed%2F1450.html;d=1 
 
 
 -h
 


Thank you for the pointer to this cool plugin...

Unfortunately no solutions to date really fill the bill as the leases 
are allocated by a router that does not publish them in a way I know how 
to get... nor can I put anything on the DHCP hosts... they are not under 
my control...

Maybe there is a way to hack into my router and get the lease info... or 
maybe I need a little daemon that will just go and probe for all 
possible hosts... I would just like to see an accurate depiction of who 
is on the net at any given time... maybe this is not something nagios is 
good at (i.e., dynamic host groups).

-G

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
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] Notification period 0

2009-10-01 Thread Kurktchiev, Boris
Ok so I set all my notification periods to 0 (in both services and hosts)
and now I am getting a whole bunch of errors:
Error: Notification period '0' specified for service 'ADVAPPS SSH' on host
'advapps.blah' is not defined anywhere!

As far as I understood the documentation setting the period to 0 is all that
was required... Do I have to do define it anywhere?


--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
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] Notification period 0

2009-10-01 Thread Kurktchiev, Boris
Aaaand I am an idiot... Disregard this.


On 10/1/09 2:12 PM, Kurktchiev, Boris bo...@unt.edu wrote:

 Ok so I set all my notification periods to 0 (in both services and hosts)
 and now I am getting a whole bunch of errors:
 Error: Notification period '0' specified for service 'ADVAPPS SSH' on host
 'advapps.blah' is not defined anywhere!
 
 As far as I understood the documentation setting the period to 0 is all that
 was required... Do I have to do define it anywhere?
 
 
 --
 Come build with us! The BlackBerryreg; Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay
 ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
 http://p.sf.net/sfu/devconf
 ___
 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


--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
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] remote check with no nagios tools at remote node

2009-10-01 Thread Mathew Walker

i think the plugin you're looking for is CHECK_BY_SSH

-- 
Mat W. - http://www.techadre.com


 
 Date: Thu, 1 Oct 2009 14:29:08 -0400
 From: gmar...@marzot.net
 To: nagios-users@lists.sourceforge.net
 Subject: [Nagios-users] remote check with no nagios tools at remote node
 
 
 
 Along the lines of probing hosts that may or (more importantly) may not 
 have nagios checks installed... I wonder if there is an ssh (there is 
 often key based logins avail) based check that will run things like 'ps' 
 or 'top' or various shell based commands and parse them to do some sort 
 of health check...
 
 thanks for any pointers.
 
 -G
 
 --
 Come build with us! The BlackBerryreg; Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay 
 ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
 http://p.sf.net/sfu/devconf
 ___
 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
  
_
Microsoft brings you a new way to search the web.  Try  Bing™ now
http://www.bing.com?form=MFEHPGpubl=WLHMTAGcrea=TEXT_MFEHPG_Core_tagline_try 
bing_1x1--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf___
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] Notification period 0

2009-10-01 Thread Mathieu Gagné
On 10/1/09 3:12 PM, Kurktchiev, Boris wrote:
 Ok so I set all my notification periods to 0 (in both services and hosts)
 and now I am getting a whole bunch of errors:
 Error: Notification period '0' specified for service 'ADVAPPS SSH' on host
 'advapps.blah' is not defined anywhere!

 As far as I understood the documentation setting the period to 0 is all that
 was required... Do I have to do define it anywhere?

notification_interval != notification_period

Try notification_interval 0 instead of notification_period 0.

 notification_interval:This directive is used to define the number of 
 time units to wait before re-notifying a contact that this service is still 
 in a non-OK state. Unless you've changed the interval_length directive from 
 the default value of 60, this number will mean minutes. If you set this value 
 to 0, Nagios will not re-notify contacts about problems for this service - 
 only one problem notification will be sent out.

Ref: http://nagios.sourceforge.net/docs/3_0/objectdefinitions.html#service

--
Mathieu

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
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] FW: Not sending e-mails

2009-10-01 Thread Scott Miller
[r...@mail4 ~]# echo Hello world | /bin/mail -s Test Email
r...@localhost

[r...@mail4 ~]# /etc/mail/sendmail.cf: line 0: cannot open: No such file or
directory

[r...@mail4 ~]#

 

I'm running postfix - not sure why it's looking for sendmail.

 

 

From: Martin Melin [mailto:mme...@gmail.com] 
Sent: Thursday, October 01, 2009 11:01 AM
To: nagios-users@lists.sourceforge.net
Subject: Re: [Nagios-users] FW: Not sending e-mails

 

Try simply copying the command_line for notify-service-by-email and running
it in a shell yourself. Or just do:
# echo Hello world | /bin/mail -s Test Email r...@localhost

On Thu, Oct 1, 2009 at 8:28 PM, Scott Miller srmil...@interbel.net wrote:


Scott Miller wrote:
 I know this has been hit over and over, and I've read literally
everything I
 could find, but to no avail.  I have a newly install of Nagios 3.2.0 on a
 Fedora Core 8 with Postfix/Dovecot.  I have a modified script (postfix
mail
 queue monitor I shared a week or so ago).  The only thing Nagios is doing
on
 this box is looking at local services.  When I change any threshold so I
 will go into alarm, it does, but no e-mails get sent out.

 I can see in my logs the following when something comes into alarm:

 [1254408621] SERVICE ALERT: localhost;Postfix Mail
 Queue;CRITICAL;SOFT;1;CRITICAL: Postfix mailq has 14 messages queued for
a
 total of 12492 Kbytes.
 [1254408651] SERVICE ALERT: localhost;Current Load;OK;SOFT;2;OK - load
 average: 4.87, 2.73, 1.43
 [1254408681] SERVICE ALERT: localhost;Postfix Mail
 Queue;CRITICAL;SOFT;2;CRITICAL: Postfix mailq has 16 messages queued for
a
 total of 12497 Kbytes.
 [1254408741] SERVICE ALERT: localhost;Postfix Mail
 Queue;CRITICAL;SOFT;3;CRITICAL: Postfix mailq has 16 messages queued for
a
 total of 12689 Kbytes.
 [1254408801] SERVICE ALERT: localhost;Postfix Mail
 Queue;CRITICAL;HARD;4;CRITICAL: Postfix mailq has 15 messages queued for
a
 total of 12494 Kbytes.
 [1254408801] SERVICE NOTIFICATION: nagiosadmin2;localhost;Postfix Mail
 Queue;CRITICAL;notify-service-by-email;CRITICAL: Postfix mailq has 15
 messages queued for a total of 12494 Kbytes.
 [1254408801] SERVICE NOTIFICATION: nagiosadmin;localhost;Postfix Mail
 Queue;CRITICAL;notify-service-by-email;CRITICAL: Postfix mailq has 15
 messages queued for a total of 12494 Kbytes.

 Wondering if anyone could double check the pertinent parts of my config?

 Thanks in advance.

 Scott Miller

 What's in your mail log?  Nagios is trying to send notifications using
 the command you've defined, according to the logs. You haven't provided
 the definition for that command (notify-service-by-email), but I assume
 it's trying to send an email.

 If you're using anything like the example commands that come with
 Nagios, it is probably using something like /bin/mail to send the
 message, and your mail log would be a good place to look for why it's
 not being delivered.

Sorry - didn't include that from the commands.cfg - Here's what I have.

commands.cfg

# 'notify-host-by-email' command definition
define command{
   command_namenotify-host-by-email
   command_line/usr/bin/printf %b * Nagios
*\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState:
$HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time:
$LONGDATETIME$\n | /bin/mail -s ** $NOTIFICATIONTYPE$ Host Alert:
$HOSTNAME$ is $HOSTSTATE$ ** $CONTACTEMAIL$
   }

# 'notify-service-by-email' command definition
define command{
   command_namenotify-service-by-email
   command_line/usr/bin/printf %b * Nagios
*\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService:
$SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState:
$SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional
Info:\n\n$SERVICEOUTPUT$ | /bin/mail -s ** $NOTIFICATIONTYPE$ Service
Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ ** $CONTACTEMAIL$
   }

This is the exact same way I have it on another machine running checks for
multiple boxes and devices.  The only difference, is this server is running
Postfix, the other (working) is running Sendmail.

In my logs:
/var/log/maillog - grep for nagios - there's nothing
/var/log/messages shows
Oct  1 10:53:20 mail4 nagios: SERVICE NOTIFICATION:
nagiosadmin2;localhost;Postfix Mail
Queue;CRITICAL;notify-service-by-email;CRITICAL: Postfix mailq has 13
messages queued for a total of 3326 Kbytes.
Oct  1 10:53:20 mail4 nagios: SERVICE NOTIFICATION:
nagiosadmin;localhost;Postfix Mail
Queue;CRITICAL;notify-service-by-email;CRITICAL: Postfix mailq has 13
messages queued for a total of 3326 Kbytes.

Looks like it's trying - maybe something in Postfix stoping it?  I'll have
to do a bit more digging and testing.

Scott Miller





--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile 

Re: [Nagios-users] FW: Not sending e-mails

2009-10-01 Thread Marc Powell

On Oct 1, 2009, at 3:23 PM, Scott Miller wrote:

 [r...@mail4 ~]# echo Hello world | /bin/mail -s Test Email  
 r...@localhost
 [r...@mail4 ~]# /etc/mail/sendmail.cf: line 0: cannot open: No such  
 file or directory
 [r...@mail4 ~]#

 I’m running postfix – not sure why it’s looking for sendmail.

If this is Redhat/clone, it's because /usr/lib/sendmail ends up being  
pointed to sendmail.

$ ls -al /usr/lib/sendmail
lrwxrwxrwx 1 root root 30 Nov  7  2008 /usr/lib/sendmail - /etc/ 
alternatives/mta-sendmail

$ ls -l /etc/alternatives/mta-sendmail
lrwxrwxrwx 1 root root 26 Nov  7  2008 /etc/alternatives/mta-sendmail - 
  /usr/lib/sendmail.sendmail

$ ls -l /usr/lib/sendmail*
lrwxrwxrwx 1 root root 30 Nov  7  2008 /usr/lib/sendmail - /etc/ 
alternatives/mta-sendmail
lrwxrwxrwx 1 root root 24 Nov  7  2008 /usr/lib/sendmail.postfix - ../ 
sbin/sendmail.postfix
lrwxrwxrwx 1 root root 16 Nov  7  2008 /usr/lib/sendmail.sendmail - 
  ../sbin/sendmail

You can use the 'alternatives' command to view and change this  
configuration --

# alternatives --display mta
mta - status is auto.
  link currently points to /usr/sbin/sendmail.sendmail
/usr/sbin/sendmail.sendmail - priority 90
  slave mta-pam: /etc/pam.d/smtp.sendmail
  slave mta-mailq: /usr/bin/mailq.sendmail
  slave mta-newaliases: /usr/bin/newaliases.sendmail
  slave mta-rmail: /usr/bin/rmail.sendmail
  slave mta-sendmail: /usr/lib/sendmail.sendmail
  slave mta-mailqman: /usr/share/man/man1/mailq.sendmail.1.gz
  slave mta-newaliasesman: /usr/share/man/man1/newaliases.sendmail.1.gz
  slave mta-aliasesman: /usr/share/man/man5/aliases.sendmail.5.gz
  slave mta-sendmailman: /usr/share/man/man8/sendmail.sendmail.8.gz
/usr/sbin/sendmail.postfix - priority 30
  slave mta-pam: /etc/pam.d/smtp.postfix
  slave mta-mailq: /usr/bin/mailq.postfix
  slave mta-newaliases: /usr/bin/newaliases.postfix
  slave mta-rmail: /usr/bin/rmail.postfix
  slave mta-sendmail: /usr/lib/sendmail.postfix
  slave mta-mailqman: /usr/share/man/man1/mailq.postfix.1.gz
  slave mta-newaliasesman: /usr/share/man/man1/newaliases.postfix.1.gz
  slave mta-aliasesman: /usr/share/man/man5/aliases.postfix.5.gz
  slave mta-sendmailman: /usr/share/man/man1/sendmail.postfix.1.gz
Current `best' version is /usr/sbin/sendmail.sendmail.

I believe that all you need to do is run 'alternatives --config mta'  
and choose postfix but I haven't researched this extensively.

--
Marc


--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
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] FW: Not sending e-mails

2009-10-01 Thread Scott Miller
I agree - I've found a few other oddities while messing around with Postfix.
Gotta fix those first.

 

Thanks,

Scott

 

 

From: Martin Melin [mailto:mme...@gmail.com] 
Sent: Thursday, October 01, 2009 12:58 PM
To: nagios-users@lists.sourceforge.net
Subject: Re: [Nagios-users] FW: Not sending e-mails

 

Looks like your postfix installation isn't really complete since /bin/mail
still thinks it's supposed to send using sendmail. On a complete postfix
setup you should have a command sendmail - Postfix to Sendmail
compatibility interface which I believe /bin/mail will use. So the issue
here isn't really Nagios-specific, since you're unable to send mail with
/bin/mail outside of Nagios as well. If you fix the email setup, Nagios
notifications will be delivered just fine, and Postfix setup is too off
topic for this list :-) Good luck!

On Thu, Oct 1, 2009 at 10:23 PM, Scott Miller srmil...@interbel.net wrote:

[r...@mail4 ~]# echo Hello world | /bin/mail -s Test Email
r...@localhost

[r...@mail4 ~]# /etc/mail/sendmail.cf: line 0: cannot open: No such file or
directory

[r...@mail4 ~]#

 

I'm running postfix - not sure why it's looking for sendmail.

 

 

From: Martin Melin [mailto:mme...@gmail.com] 
Sent: Thursday, October 01, 2009 11:01 AM
To: nagios-users@lists.sourceforge.net
Subject: Re: [Nagios-users] FW: Not sending e-mails

 

Try simply copying the command_line for notify-service-by-email and running
it in a shell yourself. Or just do:
# echo Hello world | /bin/mail -s Test Email r...@localhost

On Thu, Oct 1, 2009 at 8:28 PM, Scott Miller srmil...@interbel.net wrote:


Scott Miller wrote:
 I know this has been hit over and over, and I've read literally
everything I
 could find, but to no avail.  I have a newly install of Nagios 3.2.0 on a
 Fedora Core 8 with Postfix/Dovecot.  I have a modified script (postfix
mail
 queue monitor I shared a week or so ago).  The only thing Nagios is doing
on
 this box is looking at local services.  When I change any threshold so I
 will go into alarm, it does, but no e-mails get sent out.

 I can see in my logs the following when something comes into alarm:

 [1254408621] SERVICE ALERT: localhost;Postfix Mail
 Queue;CRITICAL;SOFT;1;CRITICAL: Postfix mailq has 14 messages queued for
a
 total of 12492 Kbytes.
 [1254408651] SERVICE ALERT: localhost;Current Load;OK;SOFT;2;OK - load
 average: 4.87, 2.73, 1.43
 [1254408681] SERVICE ALERT: localhost;Postfix Mail
 Queue;CRITICAL;SOFT;2;CRITICAL: Postfix mailq has 16 messages queued for
a
 total of 12497 Kbytes.
 [1254408741] SERVICE ALERT: localhost;Postfix Mail
 Queue;CRITICAL;SOFT;3;CRITICAL: Postfix mailq has 16 messages queued for
a
 total of 12689 Kbytes.
 [1254408801] SERVICE ALERT: localhost;Postfix Mail
 Queue;CRITICAL;HARD;4;CRITICAL: Postfix mailq has 15 messages queued for
a
 total of 12494 Kbytes.
 [1254408801] SERVICE NOTIFICATION: nagiosadmin2;localhost;Postfix Mail
 Queue;CRITICAL;notify-service-by-email;CRITICAL: Postfix mailq has 15
 messages queued for a total of 12494 Kbytes.
 [1254408801] SERVICE NOTIFICATION: nagiosadmin;localhost;Postfix Mail
 Queue;CRITICAL;notify-service-by-email;CRITICAL: Postfix mailq has 15
 messages queued for a total of 12494 Kbytes.

 Wondering if anyone could double check the pertinent parts of my config?

 Thanks in advance.

 Scott Miller

 What's in your mail log?  Nagios is trying to send notifications using
 the command you've defined, according to the logs. You haven't provided
 the definition for that command (notify-service-by-email), but I assume
 it's trying to send an email.

 If you're using anything like the example commands that come with
 Nagios, it is probably using something like /bin/mail to send the
 message, and your mail log would be a good place to look for why it's
 not being delivered.

Sorry - didn't include that from the commands.cfg - Here's what I have.

commands.cfg

# 'notify-host-by-email' command definition
define command{
   command_namenotify-host-by-email
   command_line/usr/bin/printf %b * Nagios
*\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState:
$HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time:
$LONGDATETIME$\n | /bin/mail -s ** $NOTIFICATIONTYPE$ Host Alert:
$HOSTNAME$ is $HOSTSTATE$ ** $CONTACTEMAIL$
   }

# 'notify-service-by-email' command definition
define command{
   command_namenotify-service-by-email
   command_line/usr/bin/printf %b * Nagios
*\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService:
$SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState:
$SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional
Info:\n\n$SERVICEOUTPUT$ | /bin/mail -s ** $NOTIFICATIONTYPE$ Service
Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ ** $CONTACTEMAIL$
   }

This is the exact same way I have it on another machine running checks for
multiple boxes and devices.  The only difference, is this server is running
Postfix, the other 

Re: [Nagios-users] FW: Not sending e-mails

2009-10-01 Thread Michael Saldivar
Did you try the two notification mail commands I sent over?  Postfix uses
different syntax than what comes in the default Nagios config, and the ones
I'm using are from a functional Ubuntu/Postfix setup.  It uses Postfix's
alias to sendmail instead of the mail command, which doesn't work with
Postfix.

-Mike



On Thu, Oct 1, 2009 at 3:53 PM, Scott Miller srmil...@interbel.net wrote:

  I agree – I’ve found a few other oddities while messing around with
 Postfix.  Gotta fix those first.



 Thanks,

 Scott





--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf___
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] FW: Not sending e-mails

2009-10-01 Thread Scott Miller
I actually go it to work using your suggestion - I double checked it, and
misspelled one word - fixed it, lowered the threshold to alarm, and
restarted - got a notification within about 5 min.

 

# NEW '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* Nagios *\n\nNotification
Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress:
$HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n |
/usr/sbin/sendmail.postfix $CONTACTEMAIL$

}

 

# NEW 'notify-service-by-email' command definition

define command{

command_namenotify-service-by-email

command_line/usr/bin/printf %b Subject:** $NOTIFICATIONTYPE$
Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **\n* Nagios
*\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService:
$SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState:
$SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional
Info:\n\n$SERVICEOUTPUT$ | /usr/sbin/sendmail.postfix $CONTACTEMAIL$

 

Awesome - thanks!

 

http://65.19.234.227:1

 

Scott Miller

 

 

From: mike.saldi...@directfinancialsolutions.com
[mailto:mike.saldi...@directfinancialsolutions.com] On Behalf Of Michael
Saldivar
Sent: Thursday, October 01, 2009 2:04 PM
To: Scott Miller
Cc: nagios-users@lists.sourceforge.net
Subject: Re: [Nagios-users] FW: Not sending e-mails

 

Did you try the two notification mail commands I sent over?  Postfix uses
different syntax than what comes in the default Nagios config, and the ones
I'm using are from a functional Ubuntu/Postfix setup.  It uses Postfix's
alias to sendmail instead of the mail command, which doesn't work with
Postfix.

-Mike




On Thu, Oct 1, 2009 at 3:53 PM, Scott Miller srmil...@interbel.net wrote:

I agree - I've found a few other oddities while messing around with Postfix.
Gotta fix those first.

 

Thanks,

Scott

 

 

 

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf___
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] DHCP hosts

2009-10-01 Thread Morris, Patrick
G. S. Marzot wrote:
 Thank you for the pointer to this cool plugin...

 Unfortunately no solutions to date really fill the bill as the leases 
 are allocated by a router that does not publish them in a way I know how 
 to get... nor can I put anything on the DHCP hosts... they are not under 
 my control...

 Maybe there is a way to hack into my router and get the lease info... or 
 maybe I need a little daemon that will just go and probe for all 
 possible hosts... I would just like to see an accurate depiction of who 
 is on the net at any given time... maybe this is not something nagios is 
 good at (i.e., dynamic host groups).

Nagios is good at what it does, and it really sounds like this just 
isn't it.

However, I don't see a reason you couldn't hack together a really simple 
check using a tool that *is* good at this sort of thing (like, say, 
nmap), and based on the results of that tool, feed the results back to 
Nagios .

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
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] remote check with no nagios tools at remote node

2009-10-01 Thread G. S. Marzot
Mathew Walker wrote:
 i think the plugin you're looking for is CHECK_BY_SSH


aybe... except the man page for this shows downloading plugins to be run 
on the remote host... I am looking for almost zero footprint there or 
leveraging am ssh login that already exists... the plugin I have in mind 
(and am pretty sure it does not exist) are things like check_load but 
where the system info is pulled back to the local host with

ssh -c 

check_load_ssh might be a reasonable name for this and all it would 
require is a key based login on the remote host ...

just dreaming out load.

thanks, G

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
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