PDA

View Full Version : Zabbix-Agent restart no pid file...


MrRobbert
21-11-2006, 13:57
Hi All,

I run a Zabbix server, i have several host running, they are shown "available" in mij "host list". But then some hosts give me the next message instead of available:

Availability: "Not available"
Error: "Cannot connect to [host10] [Connection refused]"

Now when i logon to that machine and i try to restart the zabbix agent i get the following message:

root@VMWARESERVER01:/# /etc/init.d/zabbix-agent restart
Stopping Zabbix agent: zabbix_agentd
No process in pidfile `/var/run/zabbix/agentd.pid' found running; none killed.
Starting Zabbix agent: zabbix_agentd



My zabbix-agent.conf file contains the following:

##-Configured
# This is config file for zabbix_agentd
# To get more information about ZABBIX, go http://www.zabbix.com

############ GENERAL PARAMETERS #################

# List of comma delimited IP addresses (or hostnames) of ZABBIX servers.
# No spaces allowed. First entry is used for sending active checks.
# Note that hostnames must resolve hostname->IP address and
# IP address->hostname.

Server=172.17.6.217
#172.17.6.217
#172.17.6.217

# Server port for sending active checks

# ServerPort=10050

# Unique hostname. Required for active checks.

Hostname=host217

# Listen port. Default is 10050

# ListenPort=10050

# IP address to bind agent
# If missing, bind to all available IPs

# ListenIP=172.17.6.217

# Number of pre-forked instances of zabbix_agentd.
# Default value is 5
# This parameter must be between 1 and 16

StartAgents=5

# How often refresh list of active checks. 2 minutes by default.

RefreshActiveChecks=10

# Disable active checks. The agent will work in passive mode listening server.

#DisableActive=1

#EnableRemoteCommands=1

# Specifies debug level
# 0 - debug is not created
# 1 - critical information
# 2 - error information
# 3 - warnings (default)
# 4 - for debugging (produces lots of information)

DebugLevel=3

# Name of PID file

PidFile=/var/run/zabbix/agentd.pid
#/var/run/zabbix/agentd.pid
#/var/run/zabbix/agentd.pid
#PidFile=/var/run/zabbix/agentd.pid
#/var/run/zabbix/agentd.pid
#/var/tmp/zabbix_agentd.pid

# Name of log file.
# If not set, syslog will be used

LogFile=/var/log/zabbix/agentd.log
#/var/log/zabbix/agentd.log
#/var/log/zabbix/agentd.log
#/tmp/zabbix_agentd.log

# Spend no more than Timeout seconds on processing
# Must be between 1 and 30

Timeout=30

####### USER-DEFINED MONITORED PARAMETERS #######
# Format: UserParameter=<key>,<shell command>
# Note that shell command must not return empty string or EOL only
#UserParameter=system.test,who|wc -l
### Set of parameter for monitoring MySQL server (v3.23.42 and later)
### Change -u<username> and add -p<password> if required
#UserParameter=mysql.ping,mysqladmin -uroot ping|grep alive|wc -l
#UserParameter=mysql.uptime,mysqladmin -uroot status|cut -f2 -d":"|cut -f1 -d"T"
#UserParameter=mysql.threads,mysqladmin -uroot status|cut -f3 -d":"|cut -f1 -d"$
#UserParameter=mysql.questions,mysqladmin -uroot status|cut -f4 -d":"|cut -f1 -$
#UserParameter=mysql.slowqueries,mysqladmin -uroot status|cut -f5 -d":"|cut -f1$
#UserParameter=mysql.qps,mysqladmin -uroot status|cut -f9 -d":"
#UserParameter=mysql.version,mysql -V

#UserParameter=iptb_out ,iptc_getrule filter from_us "$1" b
#UserParameter=iptp_out ,iptc_getrule filter from_us "$1" p
#UserParameter=iptb_in ,iptc_getrule filter to_us "$1" b
#UserParameter=iptp_in ,iptc_getrule filter to_us "$1" p









If you need more information please let me know?

My OS is debian...

Grz Robbert

amcorreia
21-11-2006, 14:10
Hi,

check if you have the directory '/var/run/zabbix/' and '/var/log/zabbix'
check the permissions of both directories.
I guess, the owner must be user 'zabbix' and group 'root' with 750 permissions.


I hope this help.

MrRobbert
21-11-2006, 14:49
Hey...

this are my settings...


root@VMWARESERVER01:/var/run/zabbix# ls -l
total 4
-rwxrwxrwx 1 root root 5 2006-11-21 14:52 zabbix_agentd.pid


root@VMWARESERVER01:/var/log/zabbix# ls -l
total 0
-rwxrwxrwx 1 root root 0 2006-11-20 09:51 agentd.log
-rwxrwxrwx 1 root root 0 2006-11-21 12:19 agent.log


root@VMWARESERVER01:/var/run/zabbix# /etc/init.d/zabbix-agent restart
Stopping Zabbix agent: zabbix_agentd
No process in pidfile `/var/run/zabbix/agentd.pid' found running; none killed.
Starting Zabbix agent: zabbix_agentd


grz Robbert

amcorreia
21-11-2006, 16:36
Hey...

root@VMWARESERVER01:/var/run/zabbix# ls -l
total 4
-rwxrwxrwx 1 root root 5 2006-11-21 14:52 zabbix_agentd.pid

send 'ls -la' this include information of current directory.
if the user zabbix don't have permission to entry into /var/run/zabbix
777 in zabbix_agentd.pid, don't have effect.


root@VMWARESERVER01:/var/run/zabbix# /etc/init.d/zabbix-agent restart
Stopping Zabbix agent: zabbix_agentd
No process in pidfile `/var/run/zabbix/agentd.pid' found running; none killed.
Starting Zabbix agent: zabbix_agentd
grz Robbert

owww, you tring to 'restart' a process with maybe not running at moment.
try
# /etc/init.d/zabbix-agent start
# ps fax | grep zabbix

if have process don't have troble.

if do not.
# tail /var/log/zabbix/agentd.log

and see the error.

MrRobbert
22-11-2006, 10:12
Hey, oke i tried it, but didnt work...

root@VMWARESERVER01:~# /etc/init.d/zabbix-agent start
Starting Zabbix agent: zabbix_agentd
root@VMWARESERVER01:~# ps fax | grep zabbix
5482 pts/1 S+ 0:00 \_ grep zabbix
root@VMWARESERVER01:~# tail /var/log/zabbix/agentd.log
root@VMWARESERVER01:~# /etc/init.d/zabbix-agent stop
Stopping Zabbix agent: zabbix_agentd
No process in pidfile `/var/run/zabbix/agentd.pid' found running; none killed.


my server still wont connect to monitor this host...

Grz Robbert

amcorreia
22-11-2006, 12:00
....
I guess you are tring to run zabbix version 1.1.4, ok?

and if you run, just:
# ./zabbix_agentd -c <config_file>

MrRobbert
22-11-2006, 14:38
i dont know what i did, but i just restarted the server and suddenly it started to monitor that perticular server... i did everything here in this topic... i'll hope its stays monitored now...

anyway everyone tnx for youre help...

MrRobbert
24-11-2006, 11:07
Oke now its very strange, but now again i get the same message and my zabbix server doesnt reconnect again... Anybody knows what i can do about this?

cadbury
24-11-2006, 11:41
can you post a ls -al of the directories /var/run/zabbix and /var/log/zabbix ?

on your first post, in the config file, you have
PidFile=/var/run/zabbix/agentd.pid

but in your ls, it shows
/var/run/zabbix/zabbix_agentd.pid

not quite the same ...

MrRobbert
27-11-2006, 09:32
Hi it is...


root@VMWARESERVER01:/var/log/zabbix# ls -l
total 0
-rwxrwxrwx 1 root root 0 2006-11-20 09:51 agentd.log
-rwxrwxrwx 1 root root 0 2006-11-21 12:19 agent.log


--- and

root@VMWARESERVER01:/var/run/zabbix# ls -l
total 0
-rwxrwxrwx 1 root root 0 2006-11-27 09:41 agentd.pid


--- and

root@VMWARESERVER01:/var/run/zabbix# /etc/init.d/zabbix-agent restart
Stopping Zabbix agent: zabbix_agentd
No process in pidfile `/var/run/zabbix/agentd.pid' found running; none killed.
Starting Zabbix agent: zabbix_agentd



--- Log files are empty...

Grz Robbert

cadbury
27-11-2006, 09:39
ok i saw that, but ps -l is not ps -al

MrRobbert
27-11-2006, 09:45
ow yeah srry

root@VMWARESERVER01:/var/log/zabbix# ps -al
F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD
4 S 0 7203 3827 0 76 0 - 1009 - tty1 00:00:00 bash
0 R 0 22883 22588 0 76 0 - 550 - pts/1 00:00:00 ps


root@VMWARESERVER01:/var/run/zabbix# ps -al
F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD
4 S 0 7203 3827 0 76 0 - 1009 - tty1 00:00:00 bash
0 R 0 22893 22588 0 75 0 - 550 - pts/1 00:00:00 ps


Grz Robbert

cadbury
27-11-2006, 09:50
my bad :) it's ls -al not ps :D

MrRobbert
27-11-2006, 09:55
lol :)

root@VMWARESERVER01:/var/run/zabbix# ls -al
total 0
drwxr-xr-x 2 root root 60 2006-11-27 09:41 .
drwxr-xr-x 8 root root 540 2006-11-27 09:40 ..
-rwxrwxrwx 1 root root 0 2006-11-27 09:41 agentd.pid
root@VMWARESERVER01:/var/run/zabbix# ls -al /var/log/zabbix/
total 8
drwxrwx--- 2 zabbix adm 4096 2006-11-21 12:19 .
drwxr-xr-x 7 root root 4096 2006-11-27 06:25 ..
-rwxrwxrwx 1 root root 0 2006-11-20 09:51 agentd.log
-rwxrwxrwx 1 root root 0 2006-11-21 12:19 agent.log

cadbury
27-11-2006, 10:09
ok :)

the owner of the /var/run/zabbix dir is root, and write acces is only set for root,
what i do is set zabbix as owner and don't change the rights, they are good.

assuming a user zabbix exists,
just make a
chown zabbix /var/run/zabbix/
and
chown zabbix /var/run/zabbix/*

to be fully correct, also run :
chmod 664 /var/run/zabbix/*

and for the log dir :
chmod 755 /var/log/zabbix/
chown zabbix /var/log/zabbix/*
chmod 664 /var/log/zabbix/*

I think that will make it
repost ls -al after modifications, just to be sure

MrRobbert
27-11-2006, 10:40
root@VMWARESERVER01:/var/run/zabbix# chown zabbix /var/run/zabbix/
root@VMWARESERVER01:/var/run/zabbix# chown zabbix /var/run/zabbix/*
root@VMWARESERVER01:/var/run/zabbix# chmod 664 /var/run/zabbix/*
root@VMWARESERVER01:/var/run/zabbix# chmod 755 /var/log/zabbix/
root@VMWARESERVER01:/var/run/zabbix# chown zabbix /var/log/zabbix/*
root@VMWARESERVER01:/var/run/zabbix# chmod 664 /var/log/zabbix/*
root@VMWARESERVER01:/var/run/zabbix# ls -al
total 0
drwxr-xr-x 2 zabbix root 60 2006-11-27 10:50 .
drwxr-xr-x 8 root root 400 2006-11-27 10:50 ..
-rw-rw-r-- 1 zabbix root 0 2006-11-27 10:50 agentd.pid

root@VMWARESERVER01:~# /etc/init.d/zabbix-agent restart
Stopping Zabbix agent: zabbix_agentd
No process in pidfile `/var/run/zabbix/agentd.pid' found running; none killed.
Starting Zabbix agent: zabbix_agentd
/var/run/zabbix/agentd.pid seems to be stolen. Removing..


root@VMWARESERVER01:~# cd /var/run/zabbix/
root@VMWARESERVER01:/var/run/zabbix# ls -al
total 0
drwxr-xr-x 2 zabbix root 40 2006-11-27 10:54 .
drwxr-xr-x 8 root root 400 2006-11-27 10:50 ..
root@VMWARESERVER01:/var/run/zabbix#

cadbury
27-11-2006, 11:07
and now if you start it?

/etc/init.d/zabbix-agentd start

MrRobbert
27-11-2006, 11:23
i cant start zabbix-agentd.pid but i can start zabbix-agent.pid...



root@VMWARESERVER01:/var/run/zabbix# /etc/init.d/zabbix-agentd start
-bash: /etc/init.d/zabbix-agentd: No such file or directory
root@VMWARESERVER01:/var/run/zabbix# /etc/init.d/zabbix-agent start
Starting Zabbix agent: zabbix_agentd
root@VMWARESERVER01:/var/run/zabbix#

cadbury
27-11-2006, 17:24
ok, it seems to have no init.d script for agentd.
but running zabbix-agent is no good choice, because it's made to be run by a wrapper like xinetd.
zabbix-agentd is much more simple.

put the init.d script in /etc/init.d/ for agentd

cadbury
27-11-2006, 17:27
wait, when you run /etc/init.d/zabbix-agent start, it starts agentd.
make a "ps -ax | grep zabbix" (yes it's a ps this time :) ),
if there are some zabbix_agentd processes, it should be all right

MrRobbert
28-11-2006, 09:19
oke this is what it does...

root@VMWARESERVER01://# /etc/init.d/zabbix-agent restart

root@VMWARESERVER01://# ps -ax | grep zabbix
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
5314 pts/0 S+ 0:00 grep zabbix


it actually doesnt do anything anymore when i start it or restart it...

cadbury
28-11-2006, 10:40
ok so it's not running
too bad

first of all, put the init.d script for agentd,
then retry starting

to see if it runs, make a "ps ax", you should see zabbix_agentd

if not, see the logs

MrRobbert
28-11-2006, 10:57
So i have to create a new file:

/etc/init.d/zabbix-agentd

the content of this file will be:

#! /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

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


so i nano zabbix-agentd

put the script text in en i'll save it as zabbix-agentd


is this right or...?

amcorreia
28-11-2006, 16:59
Hi,

this init.d script is pierced! (I tried use this script in debian and don't worked)

tri anything like this.


########################################
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/home/zabbix/bin
DAEMON=/usr/local/sbin/zabbix_server
NAME=zabbix_server
DESC="Zabbix Server"
PID=/var/run/zabbix/$NAME.pid # definido no arq de conf do server

test -x $DAEMON || exit 0
set -e
del_pid () {
if [ -f $PID ]; then
echo -n "Deleting pid... "
rm $PID
echo "OK"
fi
}

case "$1" in
start)
del_pid
echo "Starting $DESC: $NAME"
$DAEMON
;;
stop)
del_pid
echo "Stopping $DESC: $NAME"
killall -9 $NAME
;;
check_banco)
echo -n "Checando banco de dados: "
/usr/bin/mysqlcheck -u zabbix -p --silent --repair zabbix
echo "Completa"
;;
restart|force-reload)
$0 stop
$0 start
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|check_banco|force-reload}"
#>&2
exit 1
;;
esac

exit 0

cadbury
28-11-2006, 17:34
you can use both scripts.

give it the same rights than the other /etc/ini.d scripts
(I don't have a linux right now so i can't give you the exact rights)

amcorreia
28-11-2006, 18:48
you can use both scripts.

give it the same rights than the other /etc/ini.d scripts
(I don't have a linux right now so i can't give you the exact rights)

permissions inside /etc/init.d are 755 and owner is root.root

MrRobbert
29-11-2006, 10:51
oke i inserted the script, do i need to save the file with a specific extension i just saved it like 'zabbix-agent'

when i type /etc/init.d/zabbix-agent restart my host doesnt execute the script, at least that is how it seems to be...

???????????





sTH=/bin:/usr/bin:/sbin:/usr/sbin:/home/zabbix/bin
DAEMON=/usr/sbin/zabbix_agentd
NAME=zabbix_agentd
DESC="Zabbix Server"
PID=/var/run/zabbix-agent/$NAME.pid # definido no arq de conf do server

test -x $DAEMON || exit 0
set -e
del_pid () {
if [ -f $PID ]; then
echo -n "Deleting pid... "
rm $PID
echo "OK"
fi
}

case "$1" in
start)
del_pid
echo "Starting $DESC: $NAME"
$DAEMON
;;
stop)
del_pid
echo "Stopping $DESC: $NAME"
killall -9 $NAME
;;
check_banco)
echo -n "Checando banco de dados: "
/usr/bin/mysqlcheck -u zabbix -p --silent --repair zabbix
echo "Completa"
;;
restart|force-reload)
$0 stop
$0 start
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|check_banco|force-reload}"
#>&2
exit 1
;;
esac

exit 0






root@VMWARESERVER01:/etc/init.d# ls -all
total 308
drwxr-xr-x 2 root root 4096 2006-11-29 10:59 .
drwxr-xr-x 62 root root 4096 2006-11-29 09:38 ..
-rwxr-xr-x 1 root root 9282 2006-05-29 14:03 alsa-utils
-rwxr-xr-x 1 root root 1387 2006-05-08 23:44 atd
-rw-r--r-- 1 root root 2553 2006-05-23 12:39 bootclean.sh
-rwxr-xr-x 1 root root 1788 2006-05-23 12:39 bootlogd
-rwxr-xr-x 1 root root 2030 2006-05-23 12:39 bootmisc.sh
-rwxr-xr-x 1 root root 1984 2006-05-23 12:39 checkfs.sh
-rwxr-xr-x 1 root root 8831 2006-05-23 12:39 checkroot.sh
-rwxr-xr-x 1 root root 5979 2006-01-23 17:50 console-screen.sh
-rwxr-xr-x 1 root root 1739 2005-11-15 13:42 cron
-rwxr-xr-x 1 root root 795 2006-02-23 17:37 dns-clean
-rwxr-xr-x 1 root root 923 2006-05-16 10:41 evms
-rwxr-xr-x 1 root root 6175 2006-05-21 20:46 glibc.sh
-rwxr-xr-x 1 root root 1404 2006-05-23 12:39 halt
-rwxr-xr-x 1 root root 5137 2005-04-21 12:10 hdparm
-rwxr-xr-x 1 root root 992 2006-05-23 12:39 hostname.sh
-rwxr-xr-x 1 root root 7072 2006-11-27 14:00 httpd.vmware
-rw-r--r-- 1 root root 7072 2006-11-27 10:33 httpd.vmware.old.0
-rwxr-xr-x 1 root root 6947 2006-11-27 13:52 httpd.vmware.orig
-rwxr-xr-x 1 root root 3634 2006-05-16 03:43 hwclock.sh
-rwxr-xr-x 1 root root 222 2006-10-31 14:35 inetd
-rwxr-xr-x 1 root root 3170 2005-11-25 21:30 keymap.sh
-rwxr-xr-x 1 root root 1840 2006-04-24 20:36 klogd
-rwxr-xr-x 1 root root 748 2006-01-23 19:47 loopback
-rwxr-xr-x 1 root root 2867 2005-11-08 09:30 lvm
-rwxr-xr-x 1 root root 822 2005-11-25 16:16 makedev
-rwxr-xr-x 1 root root 1124 2006-05-16 14:41 mdadm
-rwxr-xr-x 1 root root 1059 2006-05-16 14:41 mdadm-raid
-rwxr-xr-x 1 root root 921 2006-05-05 17:47 module-init-tools
-rwxr-xr-x 1 root root 2069 2006-05-23 12:39 mountall.sh
-rwxr-xr-x 1 root root 1256 2006-05-23 12:39 mountdevsubfs
-rwxr-xr-x 1 root root 1384 2006-05-23 12:39 mountvirtfs
-rwxr-xr-x 1 root root 2290 2006-05-23 12:39 mtab
-rwxr-xr-x 1 root root 1685 2006-05-11 08:54 networking
-rwxr-xr-x 1 root root 3386 2006-03-23 21:40 pcmciautils
-rwxr-xr-x 1 root root 1061 2006-07-05 15:00 ppp
-rwxr-xr-x 1 root root 281 2006-07-05 15:00 pppd-dns
-rwxr-xr-x 1 root root 1234 2006-01-23 17:10 procps.sh
-rwxr-xr-x 1 root root 6897 2006-05-23 12:39 rc
-rwxr-xr-x 1 root root 522 2006-05-23 12:39 rc.local
-rwxr-xr-x 1 root root 188 2006-05-23 12:39 rcS
-rw-r--r-- 1 root root 866 2006-05-23 12:39 README
-rwxr-xr-x 1 root root 732 2006-05-23 12:39 reboot
-rwxr-xr-x 1 root root 1226 2006-05-23 12:39 rmnologin
-rwxr-xr-x 1 root root 2924 2006-05-05 16:41 rsync
-rwxr-xr-x 1 root root 1081 2006-05-23 12:39 sendsigs
-rwxr-xr-x 1 root root 1126 2006-05-23 12:39 single
-rwxr-xr-x 1 root root 2679 2006-05-23 12:39 skeleton
-rwxr-xr-x 1 root root 1943 2006-04-04 14:42 snmpd
-rwxr-xr-x 1 root root 2016 2006-10-02 13:26 ssh
lrwxrwxrwx 1 root root 8 2006-10-31 15:53 stop-bootlogd -> bootlogd
-rwxr-xr-x 1 root root 1669 2006-04-24 20:36 sysklogd
-rwxr-xr-x 1 root root 2539 2006-05-22 16:24 udev
-rwxr-xr-x 1 root root 1588 2006-05-23 12:39 umountfs
-rwxr-xr-x 1 root root 1989 2006-05-23 12:39 umountnfs.sh
-rwxr-xr-x 1 root root 912 2006-05-23 12:39 umountroot
-rwxr-xr-x 1 root root 1965 2006-05-23 12:39 urandom
-r-xr-xr-x 1 root root 20319 2006-10-31 14:51 vmware
-rwxr-xr-x 1 root root 1967 2006-05-23 12:39 waitnfs.sh
-rwxr-xr-x 1 root root 1091 2006-04-24 19:53 x11-common
-rwxr-xr-x 1 root root 1481 2006-01-19 17:16 xinetd
-rwxr-xr-x 1 root root 766 2006-11-29 10:59 zabbix-agent
root@VMWARESERVER01:/etc/init.d# /etc/init.d/zabbix-agent restart
root@VMWARESERVER01:/etc/init.d#

cadbury
29-11-2006, 16:00
name it zabbix_agentd, because zabbix_agent and zabbix_agentd are different things :) it can confuse

i'm no specialist in init.d scripts so i can't help you here

is the pidfile the same than in the file zabbix-agentd.conf :
PID=/var/run/zabbix-agent/zabbix_agentd.pid

does the file /usr/sbin/zabbix_agentd really exists, and have correct rights?
mine is like this :
240 -rwxr-xr-x 1 root root 241565 Nov 17 16:07 zabbix_agentd

amcorreia
29-11-2006, 19:09
....
more questions;

- You have compiled zabbix_agentd with shared library or static?
- where you installed zabbix_agentd ?
- where you installed zabbix_agentd.conf ?

MrRobbert
11-12-2006, 12:40
....
more questions;

- You have compiled zabbix_agentd with shared library or static?
I installed it with apt-get install zabbix-agent
i dont know if i had to choose something like library or static?


- where you installed zabbix_agentd ?

root@VMWARESERVER01:/etc/init.d# locate zabbix_agentd
/etc/zabbix/zabbix_agentd.conf
/etc/zabbix/zabbix_agentd.conf.dpkg-old
/usr/bin/zabbix_agentd
/usr/share/man/man1/zabbix_agentd.1.gz




- where you installed zabbix_agentd.conf ?
/etc/zabbix/zabbix_agentd.conf

MrRobbert
11-12-2006, 12:45
oke... in my script there was this...

/etc/init.d/zabbix-agent

DAEMON=/usr/sbin/zabbix_agentd

i changed it to
DAEMON=/usr/bin/zabbix_agentd

now i get the following...


if i start the service:

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:

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

MrRobbert
11-12-2006, 13:29
after some changes in my script i get the following:

#! /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#

MrRobbert
11-12-2006, 14:01
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:

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????