Home Directory Utilities test_check.ps1

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

test_check.ps1

Rating
0 votes
Favoured:
0
Current Version
1.0
Last Release Date
2019-11-25
Compatible With
  • Nagios 4.x
  • Nagios XI
License
GPL
Hits
4832
Nagios CSP

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!
A simple test.
This is a simple test to make sure monitoring is working as you would expect. Could you use ping? Sure, but then does the remote machine allow pings out? Does the machine you want to ping reply to pings? What are the command line options for check_ping? How would you make it go critical if you wanted to test notifications?

test_check.ps1 makes this simple. It's a Powershell script that will run on Windows or Linux (assuming you installed Powershell on Linux). If you run the script with no options, it returns critical after 2 seconds. Or you can run "test_check.ps1 -returncode $INT1 -timetowait $INT2" where $INT1 is the return code you want it to return (use 5 to have it return a random return code), and $INT2 is the amount of time you want the script to "run" for.

Call this Powershell script from an agent, like NCPA, and you can test:
* HTML processing in return messages
* Notifications
* How your Nagios system reacts to long running checks
* What it's like to have a check that jumps randomly between OK, WARNING, CRIT, and UNKNOWN

All of this without having to remember a bunch of command line switches, or include other networked servers or devices in the equation.

Enjoy!