Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Multithreaded multi ping targets through NRPE
0.1
2013-05-09
- Nagios 3.x
GPL
39189
File | Description |
---|---|
lotp_check_multiping.ps1.txt | lotp_check_multiping.ps1.txt |
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
For example, if you have a remote site with one server, you can then use it to ping different targets (local switch, google...).
Return number of online/offline targets.
the multithreaded allow a quick execution even with high number of targets, even if they are offline.
typical execution time: 1.75 seconds per target, in average
Provide performance data to get the ratio offline/online.
Can specify number of target that must be offline before triggering warning and critical state.
###############################################
Tested Setup:
Monitoring Box:
-Centos 6.4 x64
-Nagios 3.4.4
-check_nrpe 2.13
-Centreon 2.4.2
-nsclient++ 0.4.1 x64 & x86
-Windows Server 2008 R2 / 2012
-tested on both Core & GUI Servers
###############################################
Scripts arguments
The script accept 3 arguments:
-targets (separated by commas, MANDATORY)
-maxWarn (Warning if offline number above, 1 by default)
-maxCrit (Critical if offline number above, 5 by default)
###############################################
Local execution example (backslash are removed by this site, i try with 2...):
PS C:Program FilesNSClient++scripts>. .lotp_check_multiping.ps1 www.google.com,www.lotp.fr 1 2
OK:2 online - 0 offline - |online=2;1;2; offline=0;1;2;
PS C:Program FilesNSClient++scripts>
NRPE execution:
[root~]# /usr/lib64/nagios/plugins/check_nrpe -H prd-dom-dc01 -n -c check_multiping -a www.google.com,www.lotp.fr 1 2
OK:2 online - 0 offline - |'online'=2;1;2 'offline'=0;1;2
[root~]#
###############################################
Installation:
On Windows Servers:
-copy script in folder C:Program FilesNSClient++scripts
-enable powershell script execution without signed : Set-ExecutionPolicy RemoteSigned
-Add to nsclient.ini:
[/settings/external scripts/wrapped scripts]
check_multiping=lotp_check_multiping.ps1 -targets $ARG1$ -maxWarn $ARG2$ -maxError $ARG3$
###############################################
Configuration:
For example, on Centreon:
-Add a new command:
$USER1$/check_nrpe -H $HOSTADDRESS$ -n -t 60 -c check_multiping -a $ARG1$ $ARG2$ $ARG3$
Tested Setup:
Monitoring Box:
-Centos 6.4 x64
-Nagios 3.4.4
-check_nrpe 2.13
-Centreon 2.4.2
-nsclient++ 0.4.1 x64 & x86
-Windows Server 2008 R2 / 2012
-tested on both Core & GUI Servers
###############################################
Scripts arguments
The script accept 3 arguments:
-targets (separated by commas, MANDATORY)
-maxWarn (Warning if offline number above, 1 by default)
-maxCrit (Critical if offline number above, 5 by default)
###############################################
Local execution example (backslash are removed by this site, i try with 2...):
PS C:Program FilesNSClient++scripts>. .lotp_check_multiping.ps1 www.google.com,www.lotp.fr 1 2
OK:2 online - 0 offline - |online=2;1;2; offline=0;1;2;
PS C:Program FilesNSClient++scripts>
NRPE execution:
[root~]# /usr/lib64/nagios/plugins/check_nrpe -H prd-dom-dc01 -n -c check_multiping -a www.google.com,www.lotp.fr 1 2
OK:2 online - 0 offline - |'online'=2;1;2 'offline'=0;1;2
[root~]#
###############################################
Installation:
On Windows Servers:
-copy script in folder C:Program FilesNSClient++scripts
-enable powershell script execution without signed : Set-ExecutionPolicy RemoteSigned
-Add to nsclient.ini:
[/settings/external scripts/wrapped scripts]
check_multiping=lotp_check_multiping.ps1 -targets $ARG1$ -maxWarn $ARG2$ -maxError $ARG3$
###############################################
Configuration:
For example, on Centreon:
-Add a new command:
$USER1$/check_nrpe -H $HOSTADDRESS$ -n -t 60 -c check_multiping -a $ARG1$ $ARG2$ $ARG3$
Reviews (0)
Be the first to review this listing!