Ad Widget

Collapse

power failure and zabbix_server.pid

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • par
    Junior Member
    Zabbix Certified Specialist
    • Nov 2006
    • 21

    #1

    power failure and zabbix_server.pid

    Recently i've got a power failure and my zabbix server went down. When power came up, my server booted, but could not start zabbix_server because of zabbix_server.pid file, so i was not informed about any of the problems in the network via sms.


    How do you deal with that?
  • akox
    Junior Member
    • Sep 2006
    • 7

    #2
    solution

    Originally posted by par
    Recently i've got a power failure and my zabbix server went down. When power came up, my server booted, but could not start zabbix_server because of zabbix_server.pid file, so i was not informed about any of the problems in the network via sms.


    How do you deal with that?
    Change the zabbix_server startup script in /etc/init.d to remove the pid file in case you start the zabbix server but the process described in the pid file doesn't exist.
    Check the : if /sbin/pidof ....... line.

    start() {
    if /sbin/pidof $prog > /dev/null ; then : ; else rm -f $pidfile >/dev/null; fi
    echo -n "Starting $prog: "
    daemon $zabbix_server
    RETVAL=$?
    echo
    [ $RETVAL = 0 ]
    return $RETVAL
    }

    Comment

    Working...