Re: [Nagios-users] Remote event handlers using NRPE

2012-08-30 Thread Steven Carr
You could create an NRPE command who's sole purpose is to restart a
single service, that way all you do is call the command and it
restarts the service. Though yes, if you have lots of services to
restart then you are going to have to configure lots of separate NRPE
commands.

Steve


On 30 August 2012 01:54, Daniel Wittenberg
daniel.wittenberg.r...@statefarm.com wrote:
 WMI assumes you are running Windows…

 With NRPE I haven't seen a way to do it without being pass arguments.  I'm 
 just careful with scripts that can take arguments that they scrub what's 
 being passed in.

 Dan


--
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] uptime check returns wrong result

2012-08-30 Thread Patrick Morris

On 8/9/2012 1:23 AM, Andreas Brandino wrote:

Hi all,

I am using check_uptime.pl http://check_uptime.pl from here:
http://exchange.nagios.org/directory/Plugins/System-Metrics/Uptime/check_uptime--2F-check_snmp_uptime/details

The problem that I face is that this service caclulates SNMP service 
uptime instead of windows.

If I restart the SNMP service (and not the server) , plugin

This problem happen only to windows and not to linux or cisco devices.

The check commands are:
check_uptime.pl http://check_uptime.pl -H linux_server -C community 
-w 0 -c 15 -T unix-host
check_uptime.pl http://check_uptime.pl -H windows_server -C 
community -w 0 -c 15 -T win


Any ideas?
Is the plugin not working as expected?


It sounds to me like the plugin is working as expected, but that your 
Windows boxes simply don't report uptime correctly via SNMP.


However, you seem to have left out the part where you describe exactly 
what your issue us.
--
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] How to deal with hosts that are not always on

2012-08-30 Thread Patrick Morris
On 7/29/2012 1:51 AM, Marc Haber wrote:
 Hi,

 I have a number of hosts that are not always turned on, such as my
 Notebook, my home server (which sleeps if not used) and a number of
 test VMs. To get a reasonable volume of checks in my test installation
 of Nagios, I would like to have those machines monitored by it.

 Obviously, I have notifications for those hosts turned off. This,
 however, leads to non-zero numbers in the critical, warning and
 unknown fields in the CGI, which gives a wrong impression of my health
 status since it is normal and expected that those hosts/services are
 down.

 Is there any solution for this dilemma? Can I have Nagios monitor
 hosts without reporting them as down when they are down?

 I know this may sound strange, but I would like to have statistics
 about how long the machines have been up and when.

 Greetings
 Marc

If you want to know how long the machines have been up and when, don't 
you also need to know when they're not up?  I'm not sure how you'd get 
any idea of your uptimes if you completely ignore downtimes -- Nagios 
would think they'd always been up, and you'd have no usable statistics.

--
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] How to deal with hosts that are not always on

2012-08-30 Thread Werner Flamme
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Marc Haber [29.07.2012 10:51]:
 Hi,
 
 I have a number of hosts that are not always turned on, such as my 
 Notebook, my home server (which sleeps if not used) and a number
 of test VMs. To get a reasonable volume of checks in my test
 installation of Nagios, I would like to have those machines
 monitored by it.
 
 Obviously, I have notifications for those hosts turned off. This, 
 however, leads to non-zero numbers in the critical, warning and 
 unknown fields in the CGI, which gives a wrong impression of my
 health status since it is normal and expected that those
 hosts/services are down.
 
 Is there any solution for this dilemma? Can I have Nagios monitor 
 hosts without reporting them as down when they are down?
 
 I know this may sound strange, but I would like to have statistics 
 about how long the machines have been up and when.


Marc,

we use action handler scripts to schedule downtime in this case.

As an example, a downtime for a service is scheduled for 6 minutes if
$1 is CRITICAL and $2 is HARD. That is the maximum amount of time this
service needs to be restarted (via nrpe, in the same script):

/usr/bin/printf [%lu]
SCHEDULE_SVC_DOWNTIME;host5.example.com;Host5;`date +%s`;$((`date +%s`
+ 6 * 60));1;0;0;serveradmin;Service on Host5 is restarted\n `date
+%s`  /var/spool/nagios/nagios.cmd

Following
http://old.nagios.org/developerinfo/externalcommands/commandlist.php, you
can send the command DEL_SVC_DOWNTIME if the service is up before the
scheduled downtime ends.

The same should be possible with SCHEDULE_HOST_DOWNTIME or
SCHEDULE_HOST_SVC_DOWNTIME and DEL_HOST_DOWNTIME.

So Nagios will still see the downtime, but since it is marked as
scheduled downtime, your statistics may look better ;-)

HTH
Werner

- -- 
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.18 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlA/SnEACgkQk33Krq8b42NDRACaA1Gr5NS/FqWEWaP/qrb/ST6k
HocAni3ka4fC+tilNYBefzlz0IFAsDT7
=fZIL
-END PGP SIGNATURE-

--
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] How to deal with hosts that are not always on

2012-08-30 Thread Marc Haber
On Thu, Aug 30, 2012 at 03:34:49AM -0700, Patrick Morris wrote:
 On 7/29/2012 1:51 AM, Marc Haber wrote:
  I have a number of hosts that are not always turned on, such as my
  Notebook, my home server (which sleeps if not used) and a number of
  test VMs. To get a reasonable volume of checks in my test installation
  of Nagios, I would like to have those machines monitored by it.
 
  Obviously, I have notifications for those hosts turned off. This,
  however, leads to non-zero numbers in the critical, warning and
  unknown fields in the CGI, which gives a wrong impression of my health
  status since it is normal and expected that those hosts/services are
  down.
 
  Is there any solution for this dilemma? Can I have Nagios monitor
  hosts without reporting them as down when they are down?
 
  I know this may sound strange, but I would like to have statistics
  about how long the machines have been up and when.
 
 If you want to know how long the machines have been up and when, don't 
 you also need to know when they're not up?  I'm not sure how you'd get 
 any idea of your uptimes if you completely ignore downtimes -- Nagios 
 would think they'd always been up, and you'd have no usable statistics.

You're right, but this is only my play installation, so it delivers
not useable statistics anyway. Otoh, the case host up, but no ssh
server would be a reportable offense, for example.

Greetings
Marc

-- 
-
Marc Haber | I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany  |  lose things.Winona Ryder | Fon: *49 621 31958061
Nordisch by Nature |  How to make an American Quilt | Fax: *49 621 31958062

--
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] How to deal with hosts that are not always on

2012-08-30 Thread Marc Haber
On Thu, Aug 30, 2012 at 01:11:45PM +0200, Werner Flamme wrote:
 we use action handler scripts to schedule downtime in this case.

very dirty hack, but neat. Thanks.

Greetings
Marc

-- 
-
Marc Haber | I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany  |  lose things.Winona Ryder | Fon: *49 621 31958061
Nordisch by Nature |  How to make an American Quilt | Fax: *49 621 31958062

--
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] Custom Remote Commands

2012-08-30 Thread Net Warrior
Hi There
Just was wondering if there is a way to customize the list of host
commands list that are shown on the right column when you click on a
host.
There you can see, show the host in the map, send custom host notification.

I'd like to add something like, reboot the server for example, that
would be very usefull, maybe someone manage to do this this way or
another.
The problem is when the server is not accessible over ssh but
pingable, so I guess that with can use ipmi, or fired reboot command
by other means.


Any thought on this are appreciated.
Thanks

--
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] Heads up for config changes in Nagios 4

2012-08-30 Thread Andreas Ericsson
Currently, with Nagios 3, it's possible to have cyclic group includes,
like this:
define hostgroup{
hostgroup_name HG1
alias  Hostgroup 1
hostgroup_members  HG3
}
define hostgroup{
hostgroup_name HG2
alias  Hostgroup 2
hostgroup_members  HG1
}
define hostgroup{
hostgroup_name HG3
alias  Hostgroup 3
hostgroup_members  HG2
}

With Nagios 4, that will generate an error. Currently the behaviour
is that the first hostgroup, as determined by alphabetical sorting,
will get the members of its included groups, but the later ones in
the sorting will not get the members of the previous ones, which is
surprising to say the least.

This will work the same for all grouptypes.

-- 
Andreas Ericsson   andreas.erics...@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.

--
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] Include extra information on service alert

2012-08-30 Thread Tim AtLee
Hello

Mdadm on one specific host has been reporting failed disks, and falling over to 
the spare.  I get an event notification when this happens (Nagios no longer 
sees 2 devices in the U state), but I would like to include the output of cat 
/proc/mdstat with the email notification.

I am thinking that the best approach is to write a custom notification command 
to include this data, but I'm not sure if there are already hooks for this 
already.

I am using Nagios within OMD and CheckMK.

Thanks in advance,

Tim

--
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] Notification did not execute

2012-08-30 Thread Patrick Morris
On 8/29/2012 3:54 AM, Net Warrior wrote:
 Cannot do that cuz it-s a production server, I have a testing server
 where I test the alarms with the same configuration and it works
 If I find something I will let you know.

 Thanks


 2012/8/28 Travis Runyard travisruny...@gmail.com:
 That is really strange. Have you tried changing its ip to an invalid one and
 see if you can recreate the problem?

 On Aug 28, 2012 5:29 PM, Net Warrior netwarrior...@gmail.com wrote:
 Thanks for your advice, I know what you mean, but this is not the case
 unfortunately, In the logs I can see the 3 time check was reached and
 the alarm did not fired, now the server is up and I did not get the
 notification the server is back on line either.

 Is critical and not SOFT for the host and the service
 [1346193488] HOST ALERT: hostname;DOWN;HARD;3;(Host Check Timed Out)
 [1346193328] SERVICE ALERT: hostname;SSH;CRITICAL;HARD;3;CRITICAL -
 Socket timeout after 30 seconds

 [1346198377] HOST ALERT: hostname;UP;SOFT;3;PING OK - Packet loss =
 0%, RTA = 4.84 ms

 This is weird.

 Thanks for your time and support
 Regards


 2012/8/28 Travis Runyard travisruny...@gmail.com:
 Your should look at the log before the service notification was
 suppressed
 because the host was down. I'm 90% sure the reason why your host down
 notification was not sent was because the host was in a soft state type
 and
 came back online before it was determined to be in a hard state. And you
 didn't post your linux-server template config so you will have to check
 your
 and retry_interval definition.

 For my host objects I set a retry_interval of 1 and max_check_attemps of
 2
 in the template so I get notified a little quicker when a host goes
 down.

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

 -Travis Runyard


I would also check to make sure host or global notifications were not 
disabled at that point in time, and that flap detection had not kicked 
in.  Those are the most likely reasons I can think of for no 
notification to happen even though the host was in a hard critical state.

--
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] Heads up for config changes in Nagios 4

2012-08-30 Thread Yu Watanabe
First time hearing about Nagios 4.

Is it coming out soon?

Thanks,
Yu

Andreas Ericsson さんは書きました:
Currently, with Nagios 3, it's possible to have cyclic group includes,
like this:
define hostgroup{
hostgroup_name HG1
alias  Hostgroup 1
hostgroup_members  HG3
}
define hostgroup{
hostgroup_name HG2
alias  Hostgroup 2
hostgroup_members  HG1
}
define hostgroup{
hostgroup_name HG3
alias  Hostgroup 3
hostgroup_members  HG2
}

With Nagios 4, that will generate an error. Currently the behaviour
is that the first hostgroup, as determined by alphabetical sorting,
will get the members of its included groups, but the later ones in
the sorting will not get the members of the previous ones, which is
surprising to say the least.

This will work the same for all grouptypes.

-- 
Andreas Ericsson   andreas.erics...@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.

--
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] Peter Shankland is out of the office.

2012-08-30 Thread Peter . Shankland

I will be out of the office starting  31/08/2012 and will not return until
03/09/2012.

Please contact Tom Barnes if the request is urgent:

Tom Barnes
tom.bar...@ricoh-rpl.com
01952 205362

Regards.
_
Peter Shankland
TECHNICAL NETWORK SPECIALIST
IT DEPARTMENT

Ricoh UK Products Limited
Priorslee
Telford, TF2 9NS
UK
Tel: +44 (0) 1952 290090
DD:+44 (0) 1952 205160
F:+44 (0) 1952 213100
M:+44 (0) 7919 444077
peter.shankl...@ricoh-rpl.com

(Embedded image moved to file: pic12111.gif)

(Embedded image moved to file: pic19232.jpg)
Please do not print this email unless absolutely necessary in order to save
paper and energy, and you will contribute to resource conservation and CO2
reduction. This email including attachments is intended for the
addressee(s) only. It may be labelled confidential/ private and contain
confidential/private information. Please respect the wishes of the sender
in the way you treat this email and the information contained within. If in
doubt clarify the wishes of the sender before acting. If you have received
this email in error, you may not review, copy or forward this message in
whole or in part. Ricoh UK Products employees should delete from their
system and notify us of the error via the ISMS Security Incident Reporting
database. External recipients should delete from their system and alert us
via email, advising the name of the sender and the time and date of
receipt. Any views expressed in this email may not necessarily reflect
those of Ricoh UK Products Ltd. You should ensure that the onward
transmission, opening or use of this message or attachments will not
adversely affect your system or data and carry out anti-virus checks before
downloading. Internet communications are not secure and therefore Ricoh UK
Products Ltd accepts no responsibility for any direct, indirect or
consequential damage resulting from the transmission of this message.

Registered in England No. 1763860
Registered Office: Ricoh UK Products Limited, Priorslee, Telford,
Shropshire, TF2 9NSattachment: pic12111.gifattachment: pic19232.jpg--
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