Re: [Nagios-users] Defining passive checks

2012-08-16 Thread mohamed ben romdhane
Hello Jonathan,

I think that you must put 

define service {
         service_description            Oracle
         host_name                      oddjob.resnet.bris.ac.uk
         use                            resnet-service
        max_check_attempts        1
    check_freshness 1
    freshness_threshold 86400

        check_command   check_dummy!1 no news since 24h
}
= The check_dummy command will run if no passive check has been received 
within 24 hours (86400seconds) and display warnig alert (1)  and info status 
no news since 24h

Regards, 

Mohamed



 De : Jonathan Gazeley jonathan.gaze...@bristol.ac.uk
À : nagios-users@lists.sourceforge.net 
Envoyé le : Mercredi 15 août 2012 15h07
Objet : [Nagios-users] Defining passive checks
 
I'm a long-time user of Nagios with active checks. Today I started using 
passive checks with NSCA and I'm having a problem.

The documentation states A service must be defined in Nagios before you 
can submit passive check results for it.

I defined a config block like this, to define a service for the Oracle 
service that I want to monitor passively - omitting the check_command 
directive.

define service {
         service_description            Oracle
         host_name                      oddjob.resnet.bris.ac.uk
         use                            resnet-service
}



But running nagios -v gives this output:

Error: Service description, host name, or check command is NULL
Error: Could not register service (config file 
'/etc/nagios/nagios_service.cfg', starting on line 8618)
    Error processing object config files!


So what's the approved way of defining a service without specifying a 
command for active checks?

Thanks,
Jonathan

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
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--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
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] Issues with check_by_ssh

2012-08-16 Thread James Osbourn
I see that you are talking to a XenServer host.  I am performing something 
similar.  What I have had to do to achieve results is to create a local Nagios 
user on the XenServer host which has SSH keys to allow the server Nagios user 
to connect and avoid using any root SSH keys which the Nagios user is unlikely 
to be able to read.

Once you have connected to the XenServer host check that the Nagios user can 
execute the commands you are running.  If you are simply looking at the dom0 as 
if it was a host and checking items such as cpu, memory or disk usage then you 
should not have a problem.  If you are executing XenServer xe commands then you 
will need to pass a username and password that has access to the XenServer to 
run these commands.  This will be root or another account that has been granted 
access.  You can store these values in the resources.cfg file and pass them in 
your command definition.

I have also noticed that your service definition is passing 4 arguments, where 
your command definition is only using 3 arguments and the hostaddress.  It 
would be worth checking to make sure that you are passing the correct arguments 
from your service and command definitions to your remote host.

James

From: Eduardo Montes de Oca S. [mailto:edren...@gmail.com]
Sent: 15 August 2012 18:52
To: nagios-users@lists.sourceforge.net
Subject: [Nagios-users] Issues with check_by_ssh

Hi list,

I have some issues with the plugin check_by_ssh. In particular, there is one 
error:

When I run a shell script located in another server, from the Nagios server 
using the check_by_ssh plugin, I don't have any errors and I can see the result 
of the script, like this:

root@nagioserver#mailto:root@TSM-SRV-V-114 
/usr/lib/nagios/plugins/check_by_ssh -l root -H ipxenserver -C 
/usr/lib/nagios/plugins/check_Xencpu
OK:CPU%= 3

But, by any strange reason, when I configure the check for Nagios presents the 
results in its interface, I have the error:
[cid:image001.png@01CD7B8F.4994F110]

I have made the ssh authorization keys in both servers (Nagios and Xen), I 
configured the users, permissions,etc. And I can't to do this work it.

Could someone help me solve this problem


This is a part of my definition files:
#XENServer
define command {
   command_name check_by_ssh_xentop
   command_line /usr/lib/nagios/plugins/check_by_ssh -l '$ARG1$' -H 
'$HOSTADDRESS$' -C '$ARG2$' -i '$ARG3$'
   }
#Hypervisor check
define service{
use  generic-service
host_name  ORLANDO
service_description Hypervisor CPU
check_command 
check_by_ssh_xentop!root!ipxenserver!/usr/lib/nagios/plugins/check_Xencpu.sh!/root/.ssh/id_rsa!
}




Regards!


--
IC. Eduardo Montes de Oca Sánchez
Skype: edrendar
Gmail: edren...@gmail.commailto:edren...@gmail.com
MSN: ed_montesde...@hotmail.commailto:ed_montesde...@hotmail.com
Movil: 5523419886
https://linuxcounter.net/cert/549074.png
inline: image001.png--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
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] Defining passive checks

2012-08-16 Thread Jonathan Gazeley
Hi Mohamed,

Thanks for your response - this worked.

Have a nice day,
Jonathan


On 16/08/12 08:08, mohamed ben romdhane wrote:
 Hello Jonathan,

 I think that you must put
 define service {
  service_descriptionOracle
  host_name  oddjob.resnet.bris.ac.uk
  useresnet-service
 max_check_attempts1
 check_freshness 1
  freshness_threshold 86400
 check_command   check_dummy!1 no news since 24h
 }
 = The check_dummy command will run if no passive check has been
 received within 24 hours (86400seconds) and display warnig alert (1)
 and info status no news since 24h

 Regards,
 Mohamed
 
 *De :* Jonathan Gazeley jonathan.gaze...@bristol.ac.uk
 *À :* nagios-users@lists.sourceforge.net
 *Envoyé le :* Mercredi 15 août 2012 15h07
 *Objet :* [Nagios-users] Defining passive checks

 I'm a long-time user of Nagios with active checks. Today I started using
 passive checks with NSCA and I'm having a problem.

 The documentation states A service must be defined in Nagios before you
 can submit passive check results for it.

 I defined a config block like this, to define a service for the Oracle
 service that I want to monitor passively - omitting the check_command
 directive.

 define service {
  service_descriptionOracle
  host_name  oddjob.resnet.bris.ac.uk
  useresnet-service
 }



 But running nagios -v gives this output:

 Error: Service description, host name, or check command is NULL
 Error: Could not register service (config file
 '/etc/nagios/nagios_service.cfg', starting on line 8618)
  Error processing object config files!


 So what's the approved way of defining a service without specifying a
 command for active checks?

 Thanks,
 Jonathan

 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and
 threat landscape has changed and how IT managers can respond. Discussions
 will include endpoint security, mobile security and the latest in malware
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 ___
 Nagios-users mailing list
 Nagios-users@lists.sourceforge.net
 mailto: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




 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and
 threat landscape has changed and how IT managers can respond. Discussions
 will include endpoint security, mobile security and the latest in malware
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/



 ___
 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



--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
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] My Own Command Deinifition Weird Behavior.

2012-08-16 Thread Net Warrior
Hi there guys.

I defined my own command to use an internal sms sistems, so we can send an
sms alert along with the e-mail ones.
This is what the script do.
#!/bin/bash

HOST=$1
STATE=$2
lynx http://server:/SMSService/$HOST-State-$STATE

The command definition is:

# send-sms
define command{
   command_name   send-sms
   command_line /path/sms.sh $HOSTNAME$ $SERVICESTATE$
   }

The problem is that with some host I receive the SERVICESTATE condition, Ok
or Critical, but with others dont, only get $
As I can see on the debug file:

Processed notification command: /path/sms.sh server333 CRITICAL - This is
good
Processed notification command: /path/sms.sh server333 OK  - This is good

But for the other servers I get:

Processed notification command: /path/sms.sh server222 $SERVICESTATE$ -
Only get the variable name instead its content, ok or critical.

Any idea what the problem could be?

Thanks in advance.
Best Regards
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
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] My Own Command Deinifition Weird Behavior.

2012-08-16 Thread James Osbourn
The first thing that spring to mind is that the SMS script is being run for 
host alerts for which the service variable would not be defined.  It may be 
worth checking your contact notification definitions to make sure that hosts or 
services are different.

James

From: Net Warrior [mailto:netwarrior...@gmail.com]
Sent: 16 August 2012 13:29
To: nagios-users@lists.sourceforge.net
Subject: [Nagios-users] My Own Command Deinifition Weird Behavior.

Hi there guys.

I defined my own command to use an internal sms sistems, so we can send an sms 
alert along with the e-mail ones.
This is what the script do.
#!/bin/bash

HOST=$1
STATE=$2
lynx http://server:/SMSService/$HOST-State-$STATE

The command definition is:

# send-sms
define command{
   command_name   send-sms
   command_line /path/sms.sh $HOSTNAME$ $SERVICESTATE$
   }

The problem is that with some host I receive the SERVICESTATE condition, Ok or 
Critical, but with others dont, only get $
As I can see on the debug file:

Processed notification command: /path/sms.sh server333 CRITICAL - This is good
Processed notification command: /path/sms.sh server333 OK  - This is good

But for the other servers I get:

Processed notification command: /path/sms.sh server222 $SERVICESTATE$ - Only 
get the variable name instead its content, ok or critical.

Any idea what the problem could be?

Thanks in advance.
Best Regards



--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
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] My Own Command Deinifition Weird Behavior.

2012-08-16 Thread mohamed ben romdhane
Hi,
try to use the attribute  $SERVICESTATEID$ 
(A number that corresponds to the current state of the service: 0=OK, 
1=WARNING, 2=CRITICAL, 3=UNKNOWN.)

Best regards,
Mohamed



 De : Net Warrior netwarrior...@gmail.com
À : nagios-users@lists.sourceforge.net 
Envoyé le : Jeudi 16 août 2012 13h28
Objet : [Nagios-users] My Own Command Deinifition Weird Behavior.
 

Hi there guys.

I defined my own command to use an internal sms sistems, so we can send an sms 
alert along with the e-mail ones.
This is what the script do.
#!/bin/bash

HOST=$1
STATE=$2
lynx http://server:/SMSService/$HOST-State-$STATE

The command definition is:

# send-sms
define command{
   command_name   send-sms
   command_line /path/sms.sh $HOSTNAME$ $SERVICESTATE$
   }

The problem is that with some host I receive the SERVICESTATE condition, Ok or 
Critical, but with others dont, only get $
As I can see on the debug file:

Processed notification command: /path/sms.sh server333 CRITICAL - This is good
Processed notification command: /path/sms.sh server333 OK  - This is good

But for the other servers I get:

Processed notification command: /path/sms.sh server222 $SERVICESTATE$ - Only 
get the variable name instead its content, ok or critical.

Any idea what the problem could be?

Thanks in advance.
Best Regards





--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
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--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
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] My Own Command Deinifition Weird Behavior.

2012-08-16 Thread Net Warrior
Yes, you are right, after I fired the mail to the list, I checked that, my
appologies, I notice that host uses HOSTSTATE and service uses
SERVICESTATE, I changed that and defined two commands instead, gonna see if
that fix the problem

service_notification_commands   send-sms-service,notify-service-by-email
host_notification_commands  send-sms-host,notify-host-by-email

command_line /path/sms.sh $HOSTNAME$ $HOSTSTATE$
command_line /path/sms.sh $HOSTNAME$ $SERVICESTATE$

Thank you vey much, sorry for the noise.
Best regards

2012/8/16 mohamed ben romdhane med_li...@yahoo.fr

 Hi,
 try to use the attribute  $SERVICESTATEID$  (A number that corresponds to
 the current state of the service: 0=OK, 1=WARNING, 2=CRITICAL, 3=UNKNOWN.)

 Best regards,
 Mohamed
   --
 *De :* Net Warrior netwarrior...@gmail.com
 *À :* nagios-users@lists.sourceforge.net
 *Envoyé le :* Jeudi 16 août 2012 13h28
 *Objet :* [Nagios-users] My Own Command Deinifition Weird Behavior.

 Hi there guys.

 I defined my own command to use an internal sms sistems, so we can send an
 sms alert along with the e-mail ones.
 This is what the script do.
 #!/bin/bash

 HOST=$1
 STATE=$2
 lynx http://server:/SMSService/$HOST-State-$STATE

 The command definition is:

 # send-sms
 define command{
command_name   send-sms
command_line /path/sms.sh $HOSTNAME$ $SERVICESTATE$
}

 The problem is that with some host I receive the SERVICESTATE condition,
 Ok or Critical, but with others dont, only get $
 As I can see on the debug file:

 Processed notification command: /path/sms.sh server333 CRITICAL - This is
 good
 Processed notification command: /path/sms.sh server333 OK  - This is good

 But for the other servers I get:

 Processed notification command: /path/sms.sh server222 $SERVICESTATE$ -
 Only get the variable name instead its content, ok or critical.

 Any idea what the problem could be?

 Thanks in advance.
 Best Regards






 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and
 threat landscape has changed and how IT managers can respond. Discussions
 will include endpoint security, mobile security and the latest in malware
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 ___
 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



 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and
 threat landscape has changed and how IT managers can respond. Discussions
 will include endpoint security, mobile security and the latest in malware
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 ___
 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

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
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] check_openmanage and ESXi

2012-08-16 Thread Hölzel , Arnold
All,

I don't know if anyone else already posted this, I just joined the mail list.

We have been using check_openmanage (brilliant piece of work!) to check the 
hardware status of our Dell machines, lately we are moving from ESX 4 to ESXi 5 
and found that the check_openmanage check could not help us with the monitoring 
of ESXi 5 hardware, because check_openmanage needs OMSA for its checks. Today I 
found a other plugin to check ESXi hardware, see 
http://www.claudiokuenzler.com/nagios-plugins/check_esxi_hardware.php

There is one disadvantage to this plugin and that is that you always get the 
same status details back with a OK. I don't know if it is possible but it would 
be nice to have the checks from the check_esxi_hardware available in the 
check_openmanage, only problem is one is written in Python the other in Perl...

I hope it helps and that maybe someone (Trond the author of check_openmanage?) 
can create one check of this.
Met vriendelijke groet/with kind regards,
Arnold Hölzel

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
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_openmanage and ESXi

2012-08-16 Thread Randal, Phil
You get more reported back from check_esxi_hardware.py if the check detects any 
error conditions.

I did a lot of work on this last year, see my blog post about it for example 
output when things don't work:

http://www.rebee.clara.net/blog/archives/2011/04/entry_185.html

Cheers,

Phil

--
Phil Randal
Infrastructure Engineer
Hoople Ltd | Thorn Office Centre | Hereford HR2 6JT
Tel: 01432 260415 | Email: phil.ran...@hoopleltd.co.uk

From: Hölzel, Arnold [mailto:arnold.hol...@kpn.com]
Sent: 16 August 2012 16:00
To: nagios-users@lists.sourceforge.net
Subject: [Nagios-users] check_openmanage and ESXi

All,

I don't know if anyone else already posted this, I just joined the mail list.

We have been using check_openmanage (brilliant piece of work!) to check the 
hardware status of our Dell machines, lately we are moving from ESX 4 to ESXi 5 
and found that the check_openmanage check could not help us with the monitoring 
of ESXi 5 hardware, because check_openmanage needs OMSA for its checks. Today I 
found a other plugin to check ESXi hardware, see 
http://www.claudiokuenzler.com/nagios-plugins/check_esxi_hardware.php

There is one disadvantage to this plugin and that is that you always get the 
same status details back with a OK. I don't know if it is possible but it would 
be nice to have the checks from the check_esxi_hardware available in the 
check_openmanage, only problem is one is written in Python the other in Perl...

I hope it helps and that maybe someone (Trond the author of check_openmanage?) 
can create one check of this.
Met vriendelijke groet/with kind regards,
Arnold Hölzel

Any opinion expressed in this e-mail or any attached files are those of the 
individual and not necessarily those of Hoople Ltd. You should be aware that 
Hoople Ltd. monitors its email service. This e-mail and any attached files are 
confidential and intended solely for the use of the addressee. This 
communication may contain material protected by law from being passed on. If 
you are not the intended recipient and have received this e-mail in error, you 
are advised that any use, dissemination, forwarding, printing or copying of 
this e-mail is strictly prohibited. If you have received this e-mail in error 
please contact the sender immediately and destroy all copies of it.
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
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