What is your configuration for os-updates in snmpd.conf? I had the issues where I didn’t name it write because of a script I wrote. Make sure it’s extend osupdate <path to os-updates.sh>
if you have anything other than that, it will not work (I had extend os-updates instead, and it was broke)
Hi FTBZ… the output displayed above is the output when run from the server itself, the script detects the number of packages correctly, the problem seems to be that the LibreNMS server doesn’t.
Hi Kevin. Yes absolutely. Note that “OS Updates” isn’t the only app installed and working on these hosts, I also have things like Apache, “NTP Server”, “NTP Client” etc apps working and graphing.
It’s just the “OS Updates” that shows nan’s, the rest are fine.
I’ve looked and review logs, can’t see anything amiss.
I’ve done further (more in-depth) analysis and have determined that SELinux is the problem.
I see things like:
Oct 3 05:55:15 host setroubleshoot: SELinux is preventing /usr/bin/python2.7 from open access on the file /var/log/yum.log. For complete SELinux messages. run sealert -l blah
I’ve tried to put in manual policies as per the instructions they provide in the logs, however the directories created for the osupdates script to query yum generate random directories like:
5KOT_oPLUM
so putting in a rule using:
ausearch -c 'bash' --raw | audit2allow -M my-bash
and then:
semodule -i my-bash.pp
does not fix anything, since on the next run another random directory is created and still denied access.
It’s not an option to remove SELinux unfortunately.
Any ideas how we can tell SELinux to allow python2.7, /bin/bash and other items to have access to yum properly?
Hi Kevin. Yeah I checked the wrong server at the time (was adding at the time about 4 servers and the one I checked didn’t have SELinux). So the ones that weren’t working had SELInux.