Ad Widget

Collapse

Hard coded path in Pre-compiled Zabbix 2.0.0 agent

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Netbulae
    Junior Member
    • Jul 2009
    • 27

    #1

    Hard coded path in Pre-compiled Zabbix 2.0.0 agent

    Downloading, installing and running the pre-compiled Zabbix 2.0.0. agent; I get the following error:

    cannot open config file [/home/build/zabbix-2.0.0/etc/zabbix_agentd.conf]: [2] No such file or directory
  • richlv
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #2
    where exactly did you download it from ?
    Zabbix 3.0 Network Monitoring book

    Comment

    • beliashou
      Junior Member
      • May 2012
      • 2

      #3
      The same problem

      http://www.zabbix.com/download.php

      http://www.zabbix.com/downloads/2.0....23.i386.tar.gz

      Comment

      • Netbulae
        Junior Member
        • Jul 2009
        • 27

        #4
        From the download page on zabbix.com

        Comment

        • richlv
          Senior Member
          Zabbix Certified Trainer
          Zabbix Certified SpecialistZabbix Certified Professional
          • Oct 2005
          • 3112

          #5
          thanks for reporting. created a new issue for this : https://support.zabbix.com/browse/ZBX-5118

          (note that you should be able to run agents anyway with -c flag)
          Zabbix 3.0 Network Monitoring book

          Comment

          • natewlew
            Junior Member
            • Apr 2012
            • 4

            #6
            I ran into the same problem on an Ubuntu 8.04 server. Netbulae is right, I modified the existing startup script to look like this:

            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_agentd
            DESC="Zabbix agent"
            PID=/var/run/zabbix-agent/$NAME.pid
            CONF="--config /etc/zabbix/zabbix_agentd.conf"
            
            test -f $DAEMON || exit 0
            
            set -e
            
            if ! [ -d `dirname $PID` ]; then
                    mkdir -p `dirname $PID`
                    chown zabbix:zabbix `dirname $PID`
            fi
            
            export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
            
            case "$1" in
              start)
                    rm -f $PID
                    echo "Starting $DESC: $NAME" >&2
                    start-stop-daemon --oknodo --start --pidfile $PID \
                     --exec $DAEMON -- $CONF < /dev/null &> /dev/null
                    ;;
              stop)
                    echo "Stopping $DESC: $NAME"
                    start-stop-daemon --oknodo --stop --exec $DAEMON
                    ;;
              restart|force-reload)
                    $0 stop
                    sleep 2
                    $0 start
                    ;;
              *)
                    N=/etc/init.d/$NAME
                    echo "Usage: $N {start|stop|restart|force-reload}" >&2
                    exit 1
                    ;;
            esac
            
            exit 0

            Comment

            • beliashou
              Junior Member
              • May 2012
              • 2

              #7
              Thank you. It's good idea.

              Comment

              Working...