How can add and run a custom script in zabbix server

XMLWordPrintable

    • Type: Change Request
    • Resolution: Won't fix
    • Priority: High
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      I was written a bash script such as follow :

      #!/bin/bash

      cd /home/oracle ; . db-env; sqlplus / as sysdba << EOF >/dev/null
      @/home/oracle/backupscript/startup.sql
      spool /home/oracle/backupscript/result.txt
      @/home/oracle/backupscript/select.sql
      EOF
      sleep 40
      if [ `grep -i OPEN /home/oracle/backupscript/result.txt` == "OPEN" ]
      then
      sleep 40
      exit 0
      else
      exit 1
      fi

       

       

      Actually want if in result.txt file find open show ok , otherwise show critical . now want to know how can use this for my host ?

            Assignee:
            Unassigned
            Reporter:
            Babak
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: