Free Australian Peering connec…

Free Australian Peering connectivity & “Transit Only” billing from Sydney & Canberra. Now available on our VPS Plans! http://t.co/mdV08D8

Posted in Tweets | Comments Off on Free Australian Peering connec…

Our VPN Plans are perfect for …

Our VPN Plans are perfect for use on public wifi to avoid any Firesheep & for privacy! http://t.co/U1yGjbX & http://t.co/PxJsWWy #NetPres

Posted in Tweets | Comments Off on Our VPN Plans are perfect for …

Tweets for 2011-06-24

  • Very interesting write-up on Scaling with MongoDB, including durability, performance (RAM, SSDs) & a move to Postgres! http://t.co/dh3fIRs #

Powered by Twitter Tools

Posted in Tweets | Comments Off on Tweets for 2011-06-24

I like this idea from @scoblei…

I like this idea from @scobleizer http://t.co/Qe7HItA about taking books to read on your holidays! #NetPres

Posted in Tweets | Comments Off on I like this idea from @scoblei…

Tweets for 2011-06-23

Powered by Twitter Tools

Posted in Tweets | Comments Off on Tweets for 2011-06-23

Nagios Acknowledge shell script

Nagios is often used in an environment where using or accessing its CGI-based web interface to ‘acknowledge’ alerts may be difficult or impossible.

I was in such a situation recently, where a Nagios was going to SMS me about an alert every 2 hours and I had no easy means to ‘acknowledge’ that event to the alerting Nagios.

So after some searching, I found this script which you can run on the Nagios host to acknowledge an alert or event on a Host configured to that Nagios:
Note: Change ACKNOWLEDGE_HOST_PROBLEM to ACKNOWLEDGE_SVC_PROBLEM if the acknowledgement is for a Nagios Service not a Host.
The the ack is for a Service, then the printf needs to include the Host;Service-description then the “;1;1;1;…..” text.
ie: you’ve got to add the Service Name that’s to be acknowledged in its own field separated by semi-colons after the Hostname is listed for a ACKNOWLEDGE_SVC_PROBLEM Nagios Ack.

#!/bin/sh
# This is a sample shell script showing how you can submit the ACKNOWLEDGE_HOST_PROBLEM command
# to Nagios. Adjust variables to fit your environment as necessary.

hosttoack=$1
now=`date +%s`
commandfile="/var/nagios/rw/nagios.cmd"

if [ "a$hosttoack" = "a" ]; then
echo ERROR: Need Nagios Host name to use in Ack
exit 1
fi

/usr/bin/printf "[%lu] ACKNOWLEDGE_HOST_PROBLEM;$hosttoack;1;1;1;nagiosadmin;Down I know\n" $now > $commandfile

This script is for Nagios as installed from a Package for CentOS, so modify the printf and commandfile paths are needed if your Nagios is installed to different directory paths or on different Unix systems.

Please note that the “1;1;1” is specific to Nagios and means “;;” which are:
If the “sticky” option is set to 1, the acknowledgement will remain until the service returns to an OK state. Otherwise the acknowledgement will automatically be removed when the service or host changes state.
If the “notify” option is set to 1, a notification will be sent out to contacts indicating that the current problem has been acknowledged.
If the “persistent” option is set to 1, the comment given with the acknowledgement will persist across restarts of Nagios. If not, the comment will be deleted the next time Nagios restarts.

Finally, the “nagiosadmin” is an ‘‘ or username relevant to Nagios and commonly is nagiosadmin and the text “Down I know” is variable and can also be changed to suit.

Posted in Network Presence | Tagged , , | Comments Off on Nagios Acknowledge shell script

Very interesting write-up on S…

Very interesting write-up on Scaling with MongoDB, including durability, performance (RAM, SSDs) & a move to Postgres! http://t.co/dh3fIRs

Posted in Tweets | Comments Off on Very interesting write-up on S…

Tweets for 2011-06-22

Powered by Twitter Tools

Posted in Tweets | Comments Off on Tweets for 2011-06-22

I’ve bought this book! http://…

I’ve bought this book! http://t.co/yng2GTX

Posted in Tweets | Comments Off on I’ve bought this book! http://…

Why Shard etc, when you can ju…

Why Shard etc, when you can just put SSDs into your Server? http://t.co/4nMKMLy [nsfw] #NetPres

Posted in Tweets | Comments Off on Why Shard etc, when you can ju…