Ad Widget

Collapse

korn shell script on solaris5.9

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sl@cker
    Junior Member
    • Jan 2006
    • 3

    #1

    korn shell script on solaris5.9

    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
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    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.
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • elkor
      Senior Member
      • Jul 2005
      • 299

      #3
      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.

      Comment

      Working...