Ad Widget

Collapse

Running External Script in Zabbix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sjbalaji
    Member
    • Aug 2008
    • 33

    #1

    Running External Script in Zabbix

    Hi All,
    i need to run external script in zabbix monitoring
    There is any document to run the external script through zabbix ?
    Any suggestion ?
    Thanks in Advance.
  • alixen
    Senior Member
    • Apr 2006
    • 474

    #2
    Hi,

    Originally posted by sjbalaji
    Hi All,
    i need to run external script in zabbix monitoring
    There is any document to run the external script through zabbix ?
    Any suggestion ?
    Thanks in Advance.
    Documentation for external checks (external script on the server):
    http://www.zabbix.com/documentation/...xternal_checks

    Documentation for user parameters (external script on the client):
    http://www.zabbix.com/documentation/...ser_parameters

    Hope this helps
    Alixen
    http://www.alixen.fr/zabbix.html

    Comment

    • sjbalaji
      Member
      • Aug 2008
      • 33

      #3
      Hi All,
      I read the doc given by alixen,but its little confusing.
      Is there any other docs for running external oracle sql plus script through zabbix ?

      Thanks in Advance.

      Comment

      • sjbalaji
        Member
        • Aug 2008
        • 33

        #4
        Hi MrKen,
        can you please help me to sort out the issue ?

        Comment

        • trikke
          Senior Member
          • Aug 2007
          • 140

          #5
          How about this:

          create a shell script like this :

          Code:
          #!/bin/sh
          if [ $# -lt 1 ]
          then
          echo "Please provide ORACLE SID "
          echo "e.g. $0 DBxy"
          exit
          fi
          
          ORAID=$1
          
          PATH=/u00/app/oracle/product/10.2.0.4/bin:$PATH
          export PATH
          ORACLE_HOME=/u00/app/oracle/product/10.2.0.4
          export ORACLE_HOME
          
          conn=`sqlplus -S user/pwd@$ORAID <<INPUT_DATA
          set serveroutput on FORMAT WRAPPED;
          set feedback off;
          set verify off;
          
          <put sql code here>
          
          
          /
          quit;
          INPUT_DATA
          `
          echo "${conn:=panic}"
          
          exit

          and run this as external script!

          Comment

          • sjbalaji
            Member
            • Aug 2008
            • 33

            #6
            Hi Everybody,
            Please anyone can guide me to set User Parameter value need to set for execute the above script?
            Also the value for item and trigger ?

            Comment

            Working...