Closed killmasta93 closed 4 years ago
No zabbix
file in sudoers.d
or commented out Defaults:zabbix !requiretty
on older systems.
Thanks for the reply, this is the file inside the /etc root@prometheus4:/etc/sudoers.d# ls -l -h total 14K -r--r----- 1 root root 958 Oct 12 09:20 README -rw-r--r-- 1 root root 187 Dec 10 23:02 zabbix -r--r----- 1 root root 666 Apr 30 2018 zfs
and inside file zabbix is this Defaults:zabbix !requiretty Cmnd_Alias ZABBIX_CMD = /etc/zabbix/scripts/mini_ipmi_smartctl.py zabbix ALL = (other_user) NOPASSWD: ALL zabbix ALL = (root) NOPASSWD: ZABBIX_CMD
Thank you
# chmod 400 /etc/sudoers.d/zabbix
?
Is it included in /etc/sudoers
?
# cat /etc/zabbix/zabbix_agentd.d/userparameter_mini-ipmi2.conf
?
And use the newer one.
Thanks for the reply what i did is first
cd /etc
then
chmod 400 sudoers.d/zabbix
chown root sudoers.d/zabbix
root@promtheus4:/etc# ls -l -h /etc/sudoers -r--r----- 1 root root 669 Oct 12 09:20 /etc/sudoers
and this is the location of the mini ipmi2
root@promtheus4:/etc# cat /etc/zabbix/zabbix_agentd.conf.d/userparameter_mini-ipmi2.conf
UserParameter=mini.disktemp.discovery[*], sudo "/etc/zabbix/scripts/mini_ipmi_smartctl.py" "$1" "$2"
UserParameter=mini.cputemp.discovery[*], "/etc/zabbix/scripts/mini_ipmi_lmsensors.py" "$1" "$2"
And use the newer one.
im not sure what you mean the new file of the zabbix inside of your repo /Linux/sudoers.d/zabbix
Oh, wrong repo, sorry. I need:
cat /etc/zabbix/zabbix_agentd.d/userparameter_smartctl.conf
and
cat /etc/sudoers.d/zabbix
sure thing this is the config
root@prometheus4:~# cat /etc/zabbix/zabbix_agentd.conf.d/userparameter_smartctl.conf
UserParameter=smartctl.discovery[*], sudo "/etc/zabbix/scripts/smartctl-lld.py" "$1" "$2"
root@prometheus4:~# cat /etc/sudoers.d/zabbix
Defaults:zabbix !requiretty
Cmnd_Alias ZABBIX_CMD = /etc/zabbix/scripts/mini_ipmi_smartctl.py
zabbix ALL = (other_user) NOPASSWD: ALL
zabbix ALL = (root) NOPASSWD: ZABBIX_CMD
This configuration should work. Is error still persists? Recheck or start from scratch if not.
Thanks for the reply, as i removed the agent reinstalled everything but i still get this error on the discovery rule
Invalid discovery rule value: cannot parse as a valid JSON object: invalid object format, expected opening character '{' or '[' at: 'We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the pri
It's a sudoers issue. Make sure /etc/sudoers.d/zabbix
is included in /etc/sudoers
.
Thanks for the reply, what i just realized something as soon i install the mini Temp repo it damages the smart info i was looking at the sudoers from both repo and their different i removed the temp tool and reinstalled again the smart info and started to work, then i installed on top the mini temp info and the smart info stopped working
this is the smart info
#Defaults:zabbix !requiretty # Uncomment in case of sudo errors
zabbix ALL=NOPASSWD: /etc/zabbix/scripts/smartctl-lld.py
this is the mini temp info
Defaults:zabbix !requiretty
Cmnd_Alias ZABBIX_CMD = /etc/zabbix/scripts/mini_ipmi_smartctl.py
zabbix ALL = (other_user) NOPASSWD: ALL
zabbix ALL = (root) NOPASSWD: ZABBIX_CMD
zabbix ALL=NOPASSWD: /etc/zabbix/scripts/smartctl-lld.py, /etc/zabbix/scripts/mini_ipmi_smartctl.py
Thanks for the reply that was it, what happened is that when i install the mini temp tool it replaces that file of the smartinfo tool for anyone else having the problem install first the mini temp tool then the smart tool because the zabbix file inside of the sudoers is wrong on the mini temp tool
Hi, So recently was looking at the data coming in and saw that there is none, then i went to discovery rule and saw this error, See picture
Thank you