dusharu / ZBX_Disk_Stat

Send statistic from /proc/diskstats to Zabbix
GNU General Public License v3.0
7 stars 5 forks source link

awk Debian 10 #5

Closed itkroplis closed 1 month ago

itkroplis commented 3 years ago

Yo! It is compatible with Debian 10 ?

dusharu commented 3 years ago

Hi! I dont test with debian-10, but it's use standart bash utils and must works.

If you find some problem - just copy to this issue. I create Fix asap.

itkroplis commented 3 years ago

I get AWK error! too long blabla..

dusharu commented 3 years ago

Hi, Monitoring works on Debian-10 with "Disk_stat.conf for old System". I fixed information in readme.

Try to use "Disk_stat.conf for old System":

cd /etc/zabbix-agent.d/
curl -o Disk_Stat.conf 'https://raw.githubusercontent.com/dusharu/ZBX_Disk_Stat/master/config_zabbix-agent/Disk_Stat_awk.conf'
systemctl restart zabbix-agent

Disk_stat_deb-10

# cat /etc/debian_version 
10.6

# awk -W version
mawk 1.3.3 Nov 1996, Copyright (C) Michael D. Brennan
compiled limits:
max NF             32767
sprintf buffer      2040
itkroplis commented 3 years ago

Is not work. I use zabbix_agent2 5.2.3 If I write in zabbix_agent2.conf line Include=/etc/zabbix/zabbix-agent2.d/*.conf In /etc/zabbix/zabbix-agent2.d/ I copy latest file Disk_Stat.conf Start trying ended with an error.

dusharu commented 3 years ago

Can you run debug commands and paste output here? https://github.com/dusharu/ZBX_Disk_Stat#debug-command

I can't understand what a problem: discovery or get statistics from disk? Also I need error text or screenshot with error.

itkroplis commented 3 years ago

-- The job identifier is 7077. Jan 31 22:47:44 a-test zabbix_agentd[10249]: zabbix_agentd [10249]: ERROR: cannot add user parameter "custom.blkdev.discovery,awk ' BEGIN { printf("{\n\t Jan 31 22:47:44 a-test systemd[1]: zabbix-agent.service: Control process exited, code=exited, status=1/FAILURE -- Subject: Unit process exited -- Defined-By: systemd -- Support: https://www.debian.org/support

-- An ExecStart= process belonging to unit zabbix-agent.service has exited.

-- The process' exit code is 'exited' and its exit status is 1. Jan 31 22:47:44 a-test systemd[1]: zabbix-agent.service: Failed with result 'exit-code'. -- Subject: Unit failed -- Defined-By: systemd -- Support: https://www.debian.org/support

-- The unit zabbix-agent.service has entered the 'failed' state with result 'exit-code'. Jan 31 22:47:44 a-test audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=zabbix-agent comm="systemd" exe="/li Jan 31 22:47:44 a-test systemd[1]: Failed to start Zabbix Agent. -- Subject: A start job for unit zabbix-agent.service has failed -- Defined-By: systemd -- Support: https://www.debian.org/support

-- A start job for unit zabbix-agent.service has finished with a failure.

-- The job identifier is 7077 and the job result is failed.

root@a-test:/etc/zabbix-agent.d# /etc/init.d/zabbix-agent start [....] Starting zabbix-agent (via systemctl): zabbix-agent.serviceJob for zabbix-agent.service failed because the control process exited with error code. See "systemctl status zabbix-agent.service" and "journalctl -xe" for details. failed! root@a-test:/etc/zabbix-agent.d# systemctl status zabbix-agent.service ● zabbix-agent.service - Zabbix Agent Loaded: loaded (/lib/systemd/system/zabbix-agent.service; enabled; vendor preset: enabled) Active: activating (auto-restart) (Result: exit-code) since Sun 2021-01-31 22:51:50 EET; 9s ago Process: 10336 ExecStart=/usr/sbin/zabbix_agentd -c $CONFFILE (code=exited, status=1/FAILURE)

Jan 31 22:51:50 a-test systemd[1]: Failed to start Zabbix Agent.

dusharu commented 3 years ago

Hi, I found the problem - zabbix-agent2 not support UserParameter. Source

I can't rewrite this script on GoLang in near future. May be I will do it later.

Can you use classic zabbix_agent?

PS Add this information to README.md

duven87 commented 11 months ago

only compatible from zabbix version 5.4 right? I have zabbix 5.0. any alternative?

dusharu commented 11 months ago

Hi @duven87 I set zabbix-5.4 in the description because it was installed at my home. You can try to use this plugin with Zabbix 5.0. If some problems occur, then open a new issue for Zabbix 5.0.