Showing posts with label nagios. Show all posts
Showing posts with label nagios. Show all posts

Tuesday, January 10, 2006

making php interface to webinject

I`m useing webinject to check our application simple web page screated to provide interface to connect the tool to our support web site. web form executes php script and php executes perl of webinject and returnes the result file.

relevant php code:



the sw script content:
/xtr/scripts/webinject/swa/webinject.pl -c naga_config_server_id.xml >> /var/log/og_in.log

The configuration xml of webinject is set to normal output wich is redirected to log file i rotate daily. that both prevents output being returned to php code and gives me operation log on the use of the system.

Thats it,
Feodor ( Naor ) Weissmann

Sunday, October 16, 2005

nagios plugin script for checking status of mirrored drives via nrpe.

Following script need to be defined in both nagios comamnds and nrpe agent on the client side

#!/bin/bash
# Copyright (c) 2005 Opengaming Israel, Naor Weissmann
# operations: check if all metastat unitx are operational.
#
RETSTR="initial"
RETVAL=0
youtput=`metastat |grep -i stat |grep 'State:' |grep -v 'Okay' |wc -l`

if [ $youtput -eq 0 ]; then
RETVAL=0
RETSTR="OK - All metadevices are stable"
else
RETVAL=2
RETSTR="ERROR - Metadevices need Maintainence"
fi

echo $RETSTR
exit $RETVAL

2026. What I Actually Do Now

It’s been over 20 years of on-and-off dumping into this blog. 27 and going years in tech, more than 10 years around AI, going back to Heili ...