Apache application not working

Hello,

I installed the snmp extend for apache as per instructions and here is the output of validate:

$ ./validate.php
====================================
Component | Version
--------- | -------
LibreNMS  | 1.63-158-g90e95f160
DB Schema | 2020_04_06_001048_the_great_index_rename (165)
PHP       | 7.2.24-0ubuntu0.18.04.6
Python    | 3.6.9
MySQL     | 10.1.44-MariaDB-0ubuntu0.18.04.1
RRDTool   | 1.7.0
SNMP      | NET-SNMP 5.7.3
====================================

[OK]    Composer Version: 1.10.6
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[OK]    Database schema correct

Output of ./apache-stats.py when run as root from the server console:

root@Asimed-ubuntu-2gb-nyc3-01:/etc/snmp# ./apache-stats.py
1555
26287104
.113555
1955
.795396
13446.1
16904.9
2
8
8
0
0
1
1
0
0
0
0
0
140

I see this in the status page:
image

This is a preview:
image

But when I drill into the Scoreboard statistics I get data:
image

No idea what is going on…

https://docs.librenms.org/Extensions/Applications/#apache

cache dir exists and rights are set so snmp user can work with it?

Hello,

I am getting the following:

root@Asimed-ubuntu-2gb-nyc3-01:/var/cache/librenms# sudo -u snmp /etc/snmp/apache-stats.py
Traceback (most recent call last):
  File "/etc/snmp/apache-stats.py", line 40, in <module>
    f = open ( CACHEFILE+'.TMP.'+`os.getpid()`, 'w' )
IOError: [Errno 13] Permission denied: '/var/cache/librenms/apache-snmp.TMP.24993'

I have this line added to the sudoers file:

snmp ALL = NOPASSWD: /etc/snmp/apache-stats.py

And this is my extend line:

extend apache /usr/bin/sudo /etc/snmp/apache-stats.py

I had to chance the directory ownership to snmp to get it to work. Thank you.

how to integrate apache app on librenms

how did you change the directory ownership???