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

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
318

Help Support Ethan Galstad's New Project:

Help Support Ethan

A Message From The Founder...

As the founder of Nagios, I'm asking for your help in a cause that's dear to my heart.

I'm launching a new project to help better the world by providing the information, ideas, and inspiration that I believe can improve the lives of people everywhere.

I know you're busy managing networks, but I would appreciate it if you would consider liking my Facebook page and showing your support for the content and messages I produce by sharing them with your friends and family.

You can learn more about my project by visiting ethangalstad.me/nagios. Thank you for your time. I wish you all the best in your endeavors, whatever they may be.

- Ethan

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!