Fake nagios check plugin

Wanted to demo something or just test Nagios? Here is a plugin written in php (so you need the package php5-cli) that ‘checks’ the values written in an ini file. View the source for more information  and functionality ;)

New Version! New Function! Oelala!


New function: random values!

How it works:

in the ini file, set the val to something like this:

val = "30~50"
 

The script wil generate a random number between the two given numbers, to make the output of the script less static.

Try it out! (it works :D )

And now it also checks if the ini file exists..

UPDATE2: forgot the $critical value in the preformance data .. fixed.

UPDATE: I was stupid but have an update ;)

I Forgot to add the exits to the end of the script.. Fixed now! Sorry guy’s! Download v0.2 . (yeah, I’m a guy who keeps all his versions :D )

Tags: , ,

2 Responses to “Fake nagios check plugin”

  1. StephSD3 says:

    I'll try it tomorrow.. :-D

  2. [...] This post was mentioned on Twitter by Su Butux. Su Butux said: Blog.subutux: Fake nagios check plugin: Wanted to demo something or just test Nagios? Here is a plugin written in … http://bit.ly/duQ09p [...]

Leave a Reply

Note: Commenter is allowed to use '@User+blank' to automatically notify your reply to other commenter. e.g, if ABC is one of commenter of this post, then write '@ABC '(exclude ') will automatically send your comment to ABC. Using '@all ' to notify all previous commenters. Be sure that the value of User should exactly match with commenter's name (case sensitive).