Ad Widget

Collapse

Zabbix-Agent restart no pid file...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MrRobbert
    Member
    • Nov 2006
    • 50

    #31
    oke... in my script there was this...

    /etc/init.d/zabbix-agent

    Code:
    DAEMON=/usr/sbin/zabbix_agentd
    i changed it to
    Code:
    DAEMON=/usr/bin/zabbix_agentd
    now i get the following...


    if i start the service:

    Code:
    root@VMWARESERVER01:/usr/bin# /etc/init.d/zabbix-agent start
    Starting Zabbix Server: zabbix_agentd
    Wrong value of [RefreshActiveChecks] in line 47. Should be between 60 and 3600.

    if i stop the service:

    Code:
    root@VMWARESERVER01:/usr/bin# /etc/init.d/zabbix-agent stop
    Stopping Zabbix Server: zabbix_agentd
    zabbix_agentd: no process killed

    Comment

    • MrRobbert
      Member
      • Nov 2006
      • 50

      #32
      after some changes in my script i get the following:

      Code:
      #! /bin/sh
      ### BEGIN INIT INFO
      # Provides:          zabbix-agent
      # Required-Start:    $local_fs $network
      # Required-Stop:     $local_fs
      # Default-Start:     S
      # Default-Stop:      0 6
      # Short-Description: Start zabbix-agent daemon
      ### END INIT INFO
      DAEMON=/usr/sbin/zabbix_agentd
      NAME=zabbix_agent
      DESC="Zabbix agent"
      PID=/var/run/zabbix-agent/$NAME.pid
      
      test -f $DAEMON || exit 0
      
      set -e
      
      case "$1" in
        start)
              rm -f $PID
              echo "Starting $DESC: $NAME"
              start-stop-daemon --oknodo --start --pidfile $PID \
                      --exec $DAEMON  < /dev/null &> /dev/null
              ;;
        stop)
              echo "Stopping $DESC: $NAME"
              start-stop-daemon --oknodo --stop --exec $DAEMON
              ;;
        restart|force-reload)
              $0 stop
              $0 start
              ;;
        *)
              N=/etc/init.d/$NAME
              echo "Usage: $N {start|stop|restart|force-reload}" >&2
              exit 1
              ;;
      esac
      
      exit 0
      root@VMWARESERVER01:/etc/init.d# /etc/init.d/zabbix-agent restart
      Stopping Zabbix agent: zabbix_agent
      No /usr/sbin/zabbix_agentd found running; none killed.
      Starting Zabbix agent: zabbix_agent
      root@VMWARESERVER01:/etc/init.d# /etc/init.d/zabbix-agent restart
      Stopping Zabbix agent: zabbix_agent
      No /usr/sbin/zabbix_agentd found running; none killed.
      Starting Zabbix agent: zabbix_agent
      root@VMWARESERVER01:/etc/init.d#

      Comment

      • MrRobbert
        Member
        • Nov 2006
        • 50

        #33
        Oke...

        i did the following:

        apt-get --purge remove zabbix-agent
        apt-get install zabbix-agent


        a few seconds later i received an email with the subject that my server is online...

        lol, my zabbix agent suddely starts monitoring that perticular server again...

        after a reboot of the server i says again:

        Code:
        Unix_t/Server_VMWare_Rik 	172.###.###.###	10050	Monitored 	Not available 	Timeout while connecting to [Server_VMWare_Rik]
        so then i again do:

        apt-get --purge remove zabbix-agent
        apt-get install zabbix-agent

        Et voila; it starts monitoring again...


        anyboady has an answer why this only works like this????
        Last edited by MrRobbert; 11-12-2006, 15:50.

        Comment

        Working...