PDA

View Full Version : korn shell script on solaris5.9


sl@cker
13-02-2006, 15:05
I am trying to track the number of interfaces on OpenView. I wish to run a command in cron every X minutes:

#ovtopodump -l |grep -i "number of interfaces"|awk '{print $4}'

I want to bring that number to Zabbix and graph the data. I have zabbix_agent running on the OpenView server. What more do I need to do to pass the results to Zabbix?

TIA

Alexei
13-02-2006, 22:23
In zabbix_agent.conf (or zabbix_agentd.conf):

UserParameter=ovifnum,ovtopodump -l |grep -i "number of interfaces"|awk '{print $ 4}'

Note space between $ and 4.

Then define an item with key="ovifnum" to make it work.

elkor
13-02-2006, 22:36
you might want to have cron run this slacker and just dump the output to a file, the command line in the zabbix_agentd.conf file would then just cat the file out.