Ad Widget

Collapse

Add Zabbix Agent as Service in HPUX

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gold_21
    Junior Member
    • May 2007
    • 7

    #1

    Add Zabbix Agent as Service in HPUX

    Hi Everyone,

    Here is a sample to but Zabbix agent in startup/shutdown Scritps for HPUX, so when ever you reboot your system, it will startup Automatically.

    Here is the Steps:


    1- Extract zabbix_agents_1.1.1_HP-UX11.11_PA-RISC.tar Files to /etc/zabbix ( You can download the file from Zabbix Website)
    2- Copy zabbixd to /etc/rc.config.d
    3- Copy zabbixd_script file to /sbin/init.d
    4- rename /sbin/init.d/zabbixd_script to /sbin/init.d/zabbixd
    5- Copy zabbixd to /etc/rc.config.d
    6- ln -s /sbin/init.d/zabbixd /sbin/rc3.d/S900zabbixd
    7- ln -s /sbin/init.d/zabbixd /sbin/rc2.d/K100zabbixd



    If anyone can improve it, it will be appreciated.

    This is teasted on HPUX 11.11 PA-RISC platform.

    Regards,

    gold_21
    Attached Files
    Last edited by gold_21; 08-08-2007, 07:47.
  • den_crane
    Senior Member
    • Feb 2006
    • 272

    #2
    After abnormal agent termination file agentd.pid may exists:
    # su oracle -c "/opt/zabbix/zabbix_agentd -c /opt/zabbix/zabbix_agentd.conf"
    # File [/opt/zabbix/zabbix_agentd.pid] exists. Is this process already running ?
    And agent not starting.

    if .pid file exists 'start') section need checking by kill -0 `cat zabbix_agentd.pid` and rm -f zabbix_agentd.pid


    Code:
            if [ -f $PIDFILE ] ; then
    	    kill -0 `cat $PIDFILE` 2>/dev/null
    	    if [ "$?" -ne 0 ]; then
    	        rm -f $PIDFILE
    	    else
    	        echo "Zabbix agent already started"
    	        exit 1
    	    fi
    	fi
    
    	# Execute the commands to start your subsystem
    	/etc/zabbix/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf
    Last edited by den_crane; 13-08-2007, 15:41.

    Comment

    • tokind
      Member
      • May 2007
      • 47

      #3
      HP-UX zabbix-agentd installation?

      The latest agent installer for PA-RISK does not include instructions or sample config file. zabbix_agents_1.4.4.hpux_11_11.pa_risc.tar.gz contains only the following files:
      • zabbix_agent
      • zabbix_agentd
      • zabbix_get
      • zabbix_sender


      I'm not too confident that I know how to properly install and configure the agent to start as daemon at boot time. Can anyone give me a few pointers please?

      Comment

      • rahul.gupta
        Junior Member
        • Jan 2012
        • 1

        #4
        Hello Gold_21,

        I have executed all the steps sucessfully as you have mentioned but i am wondering is it really done. As i am not able to start/stop service using
        Code:
        service zabbix_agentd start/stop
        Is there any way i can check whether there is any problem involved?

        Thanks.

        Comment

        Working...