Help with Prog Service

chirag.parikh at thomsonreuters.com chirag.parikh at thomsonreuters.com
Fri Feb 25 14:55:22 EST 2011


Jeremy,
Thanks for the update. Though there are 2 points to note here...

1) In our environment, we could not and did not want to use argus-agent
on target system which is being monitored.
2) In this particular case, alarm would only trigger if a particular
zpool is not in 'ONLINE' state. Rather we wanted alarm to be triggered
even if pool contains any data errors and still ONLINE.

To solve these, I used below approach with Prog service which seems to
work nicely since now I get alarms if my pool contains any data errors
despite it being ONLINE and in turn I can run 'zpool clear <poolname>'
on target system to clear any data errors and alarm would reset (turn
back to green). Do note that ssh keys need to be set so that ssh command
in below service works without any password prompts. In this case argus
host's public ssh-key need to be appended in client/target host's
~/.ssh/authorized_keys2 file so ssh to the host works without any
prompts.

...just another way of handling this...

Service Prog {
	command:	ssh <host> zpool status -xv iscsipool
	drawgrid:	yes
	expect:	healthy
	graph:	yes
	label:	iscsipool Status
	messagedn:	pool 'iscsipool' contains errors
	messageup:	pool 'iscsipool' has been cleared of errors and
now healthy
	title:	iscsipool Health Status
	uname:	iscsipool Status
}


Thanks for your help though. Much appreciated. Its nice to know
different options to handle this type of situation. :) Thanks again.

-Chirag.


-----Original Message-----
From: arguslist-bounces at tcp4me.com [mailto:arguslist-bounces at tcp4me.com]
On Behalf Of Jeremy Kister
Sent: Thursday, February 24, 2011 11:13 PM
To: Discussion about Argus
Subject: Re: Help with Prog Service

On 2/24/2011 12:13 PM, chirag.parikh at thomsonreuters.com wrote:
> I need to monitor a ZPOOL status on a Solaris system using Prog
Service
> where I can issue a ssh command such as:

I solved this by installing the included argus-agent on the machine with

the zfs.

# copy the argus-agent from the argus host
scp <argus_host>:/usr/local/sbin/argus-agent /usr/local/sbin

# set up the argus-agent in /etc/services
echo -e "argus-agent\t164/tcp" >> /etc/services

# set up the argus-agent in inetd.conf
echo -e 
"argus-agent\tstream\ttcp\tnowait\troot\t/usr/local/sbin/argus-agent\tar
gus-agent" 
 >> /etc/inetd.conf
pkill -HUP inetd

# if the host is solaris 10, run:
inetconv


# verify it's accepting sockets on port 164 (you telnet and type "zpool 
<poolname>)
telnet localhost 164
Trying localhost...
Connected to localhost.
Escape character is '^]'.
zpool rpool
ONLINE
Connection to localhost closed by foreign host.


once you get this far, you just go to your argus config, and something
like:

Group "machine" {
      Service Ping
      Service Agent/zpool {
          arg: pool_name
          expect: ONLINE
      }
}

make sure any packet filters you might have set up between the two hosts

allow port 164/tcp.

that should get you all set.

-- 

Jeremy Kister
http://jeremy.kister.net./


_______________________________________________
http://argus.tcp4me.com/
Arguslist at tcp4me.com
http://www.tcp4me.com/mailman/listinfo/arguslist


More information about the Arguslist mailing list