Ajuda - Event Handler

Augusto Ferronato <[email protected]>
Newsgroups gmane.network.nagios.user.brazil
Message-ID <[email protected]>
Pessoal,
 Comecei a trabalhar com event handler, nunca mexi, e não sou o cara
em desenvolvimento de scripts, no entanto, peguei o exemplo do site do
nagios (onde ele restarta o apache), e criei um script, heheh, para um
software que utilizamos




# What state is the command_server service in?
case "$1" in
OK)
		;;
WARNING)
	
	;;
UNKNOWN)
	
	;;
CRITICAL)
	case "$2" in
	SOFT)
		case "$3" in
		3)
			echo -n "Restarting Command Server service (3rd soft critical state)..."
			# Call the init script to restart the Command server
			http://<<server>>:9999/ADMServer?SERVICE=command_server&OPERATION=start&Submit=Envoyer
			;;
			esac
		;;
				
	HARD)
		echo -n "Restarting Command Server service..."
		# Call the init script to restart the Command Server server
		http://<<server>>:9999/ADMServer?SERVICE=command_server&OPERATION=start&Submit=Envoyer
		;;
	esac
	;;
esac
exit 0


Eu consigo saber o status do serviço via URL (GET), ele me dá o resultado

SUCCESS MESSAGE="1" (Rodando)
SUCCESS MESSAGE="0" (Parado)

Até onde eu sei, o nagios pega dele próprio o resultado da do check do
serviço, no caso eu estou usando um check para checar services no AIX.
Nunca testei, mas aquele script no site do Nagios, funciona quando o
apache cai?
Alguém pode me mandar um script de exemplo??? A configuração no nagios
eu sei como faz, o meu problema é trabalhar com os scripts...hehehe!!!
Muito obrigado pela ajuda.
Abs[]
-- 
------------------------------
http://www.augustoferronato.net/blog

FreeBSD: The Freedom to Perform!
http://www.spreadbsd.org/aff/40/1

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
-- 
[email protected] mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users-br
Wiki: http://nagios-br.sf.net/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.