MogiePete / zabbix-systemd-service-monitoring

Simple Zabbix Template to discover, monitor, and alert on systemd services.
GNU General Public License v2.0
91 stars 41 forks source link

Problem retrieving zabbix-agent PID on Ubuntu Xenial 16.04 #3

Closed bibi21000 closed 5 years ago

bibi21000 commented 5 years ago

Hi, I've got error messages on my zabbix-server when it try to retrieve PID of zabbix-agent :

714:20190103:135531.133 error reason for "mercure:systemd.service.PID[zabbix-agent]" changed: Value "| ├─13632" of type "string" is not suitable for value type "Numeric (unsigned)"

The result of systemctl status on a client

systemctl status zabbix-agent.service ● zabbix-agent.service - Zabbix Agent Loaded: loaded (/lib/systemd/system/zabbix-agent.service; enabled; vendor preset: enabled) Active: active (running) since jeu. 2019-01-03 11:15:09 CET; 2h 37min ago Docs: man:zabbix_agentd Process: 5916 ExecStart=/usr/sbin/zabbix_agentd (code=exited, status=0/SUCCESS) CGroup: /system.slice/zabbix-agent.service ├─5918 /usr/sbin/zabbix_agentd ├─5919 /usr/sbin/zabbix_agentd: collector [idle 1 sec ├─5920 /usr/sbin/zabbix_agentd: listener #1 [waiting for connection ├─5921 /usr/sbin/zabbix_agentd: listener #2 [waiting for connection ├─5922 /usr/sbin/zabbix_agentd: listener #3 [waiting for connection ├─5923 /usr/sbin/zabbix_agentd: listener #4 [waiting for connection ├─5924 /usr/sbin/zabbix_agentd: listener #5 [waiting for connection └─5925 /usr/sbin/zabbix_agentd: active checks #1 [idle 1 sec

janv. 03 11:15:09 maisonblanche3 systemd[1]: Starting Zabbix Agent... janv. 03 11:15:09 maisonblanche3 systemd[1]: Started Zabbix Agent.

my agent runs ubuntu xenial with default zabbix-agent :

apt-show-versions |grep zabbix zabbix-agent:amd64/xenial-updates 1:2.4.7+dfsg-2ubuntu2.1 uptodate

My server is 3.4 from zabbix repository

apt-show-versions |grep zabbix zabbix-frontend-php:all/xenial 1:3.4.15-1+xenial uptodate zabbix-release:all 3.4-1+xenial installed: No available version in archive zabbix-server-mysql:amd64/xenial 1:3.4.15-1+xenial uptodate

MogiePete commented 5 years ago

@bibi21000

The code is looking for "Main PID" which is not present in your output. That is the reason it is not being detected.

● zabbix-agent.service - Zabbix Agent
   Loaded: loaded (/lib/systemd/system/zabbix-agent.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2018-12-28 14:27:10 EST; 1 weeks 4 days ago
  Process: 1052 ExecStart=/usr/sbin/zabbix_agentd -c $CONFFILE (code=exited, status=0/SUCCESS)
 Main PID: 1146 (zabbix_agentd)
   CGroup: /system.slice/zabbix-agent.service
           ├─1146 /usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf
           ├─1147 /usr/sbin/zabbix_agentd: collector [idle 1 sec]
           ├─1148 /usr/sbin/zabbix_agentd: listener #1 [waiting for connection
           ├─1149 /usr/sbin/zabbix_agentd: listener #2 [waiting for connection
           ├─1150 /usr/sbin/zabbix_agentd: listener #3 [waiting for connection
           └─1151 /usr/sbin/zabbix_agentd: active checks #1 [idle 1 sec]
MogiePete commented 5 years ago

@bibi21000

Do you have an update?

MogiePete commented 5 years ago

Closing for now due to lack of feedback. Please reopen if you continue to have the issue.