zabbix_agent won't start if /var/log/zabbix-agent doesn't exist

Bug #558963 reported by MarkG
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zabbix (Ubuntu)
New
Undecided
Unassigned

Bug Description

As per the subject, if /var/log/zabbix-agent doesn't exist, then the zabbix-agent won't start. The init.d script currently creates /var/run/zabbix-agent if it doesn't exist, and should also create /var/log/zabbix-agent.

Normally this isn't a problem when you have a persistent /var/log directory, but I'm mounting /var/log as tmpfs since I'm running on an SSD, so the /var/log/* directories vanish after a reboot.

Here''s the relevant chunk of my hacked init.d script:

DIR=/var/run/zabbix-agent
LOGDIR=/var/log/zabbix-agent
PID=$DIR/$NAME.pid

if test ! -d "$DIR"; then
        mkdir "$DIR"
        chown -R zabbix:zabbix "$DIR"
fi

if test ! -d "$LOGDIR"; then
        mkdir "$LOGDIR"
        chown -R zabbix:zabbix "$LOGDIR"
fi

Ideally that would probably be a directory-creating proc rather than duplicated code. I'm guessing that the zabbix-server has the same problem.

Description: Ubuntu 9.10
Release: 9.10

  Installed: 1:1.6.4-2build1
  Candidate: 1:1.6.4-2build1
  Version table:
 *** 1:1.6.4-2build1 0
        500 http://ca.archive.ubuntu.com karmic/universe Packages
        100 /var/lib/dpkg/status

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.