
zabbix server is not running the information displayed may not be current
Uno de los problemas que nos hemos encontrado al instalar ZABBIX es que el servidor da el mensaje » zabbix server is not running the information displayed may not be current » y no arranca, mirando manuales por internet y demás hemos encontrado por fin una solución a este problema.
Para ello básicamente lo que hacemos es crear un script de inicio del server zabbix, con lo que creamos en archivo en /etc/init.d/zabbix-server
con el siguiente contenido :
#!/bin/sh
#
# Zabbix daemon start/stop script.
#
NAME=zabbix_server
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/home/zabbix/bin
DAEMON=/usr/local/sbin/${NAME}
DESC=»Zabbix server daemon»
PID=/tmp/$NAME.pid
test -f $DAEMON || exit 0
set -e
case «$1» in
start)
echo «Starting $DESC: $NAME»
start-stop-daemon –oknodo –start –pidfile $PID \
–exec $DAEMON
;;
stop)
echo «Stopping $DESC: $NAME»
start-stop-daemon –oknodo –stop –pidfile $PID \
–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
Y un script de inicio para el Agent, para ello creamos el archivo /etc/init.d/zabbix-agentd Con el siguiente contenido:
#!/bin/sh
#
# Zabbix agent start/stop script.
#
NAME=zabbix_agentd
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/home/zabbix/bin
DAEMON=/usr/local/sbin/${NAME}
DESC=»Zabbix agent daemon»
PID=/tmp/$NAME.pid
test -f $DAEMON || exit 0
set -e
case «$1» in
start)
echo «Starting $DESC: $NAME»
start-stop-daemon –oknodo –start –pidfile $PID \
–exec $DAEMON
;;
stop)
echo «Stopping $DESC: $NAME»
start-stop-daemon –oknodo –stop –pidfile $PID \
–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
Una vez hecho esto damos permisos de ejecución a los scripts
chmod +x /etc/init.d/zabbix-server /etc/init.d/zabbix-agentd
Y terminando , arrancamos los scripts para que se ejecute el server
/etc/init.d/zabbix-server start
/etc/init.d/zabbix-agentd start
Para que cada vez que iniciemos el equipo se inicie el server ejecutamos el siguiente comando
update-rc.d -f zabbix-server defaults
update-rc.d -f zabbix-agentd defaults