Docker-stats.sh: Permission denied

I recently deploy docker-stats.sh on a CentOS 7 host following the instructions

# ll /etc/snmp/config.d/docker-stats.sh
-rwxr-xr-x. 1 root root 793 Jul 20 07:51 /etc/snmp/config.d/docker-stats.sh
# ps aux |grep -i snmp
root     22833  0.3  0.6 241908 23624 ?        Ss   08:00   0:01 /usr/sbin/snmpd 192.167.30.25 -f

If I run the script manually as root, no issues. Please note that snmpd does runs as root

The LibreNMS debug console says:

.1.3.6.1.4.1.8072.1.3.2.3.1.1.6.100.111.99.107.101.114 = STRING: /etc/snmp/config.d/docker-stats.sh: Permission denied
.1.3.6.1.4.1.8072.1.3.2.3.1.2.6.100.111.99.107.101.114 = STRING: /etc/snmp/config.d/docker-stats.sh: Permission denied
.1.3.6.1.4.1.8072.1.3.2.3.1.3.6.100.111.99.107.101.114 = INTEGER: 1
.1.3.6.1.4.1.8072.1.3.2.3.1.4.6.100.111.99.107.101.114 = INTEGER: 1
.1.3.6.1.4.1.8072.1.3.2.4.1.2.6.100.111.99.107.101.114.1 = STRING: /etc/snmp/config.d/docker-stats.sh: Permission denied

Any idea what to check?

I would guess selinux permissions

Bingo, thank you @Jellyfrog !

The script runs now but there are no graphs generated, I tried turning the app off/on, even tried deleting the server and re-adding to LibreNMS.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.