Cacti / cacti

Cacti ™
http://www.cacti.net
GNU General Public License v2.0
1.61k stars 399 forks source link

Host MIB - Get Mounted Partitions rrd file not being made. #336

Closed dsclassen closed 7 years ago

dsclassen commented 7 years ago

I've created a number of new graphs using the" Data Query [Host MIB - Get Mounted Partitions]" option. The entries are getting made in the database and the Poller Cache is updated, but the rrd files are not being created.

Script Server: /cacti/scripts/ss_host_disk.php ss_host_disk 192.168.0.1 99 2:161:500:3:99:public:::::: get total '36'
RRD: /cacti/rra/99/4306.rrd
cigamit commented 7 years ago

What happens when you test using the script server? What does the rrdtool info say?

cigamit commented 7 years ago

Could it be a permission problem?

CapitalF commented 7 years ago

The RRD files are created by the poller, not when you create them with the site/DB. Check owner/perms on that process and compare to your rrd directory to make sure it can create new files. If that's not it, follow the poller because it's the part responsible. (probably)

dsclassen commented 7 years ago

Without digging into further this is the result of running the script from the command line.

$ php -f ss_host_disk.php ss_host_disk 192.168.0.1 99 2:161:500:3:99:public:::::: get total '36'
PHP Notice:  Undefined offset: 1 in /cacti/scripts/ss_host_disk.php on line 29
PHP Notice:  Undefined offset: 2 in /cacti/scripts/ss_host_disk.php on line 30
PHP Notice:  Undefined offset: 3 in /cacti/scripts/ss_host_disk.php on line 31
PHP Notice:  Undefined offset: 4 in /cacti/scripts/ss_host_disk.php on line 32
PHP Notice:  Undefined offset: 5 in /cacti/scripts/ss_host_disk.php on line 50
cigamit commented 7 years ago

That's not how you test the script. Here is the same using the correct process:

php -q script_server.php

Then, you will get a prompt, from there, you paste in the following:

/path/to/cacti/scripts/ss_host_disk.php ss_host_disk 192.168.0.1 99 2:161:500:3:99:public:::::: get total '36'

You should get output, no warnings. Then type 'quit' to leave the script server. If you want to test outside the script server, remove the function name. So, for your example it would be:

php -f ss_host_disk.php 192.168.0.1 99 2:161:500:3:99:public:::::: get total '36'
dsclassen commented 7 years ago

OK. So running the script server as you suggest does work. I am able to retrieve the requested value. I don't see anything wrong with permissions. Any other ideas about why the rrd file is not being made? I tried turning off selinux, deleting all graphs, and recreating them. Still no dice.... or rrd files.

cigamit commented 7 years ago

Look into the poller_item table and let me know the rrd_step and rrd_next_step values. Also, what is the collection rate for the data sources, and what is the poller_interval for the poller. Are they different?

dsclassen commented 7 years ago

poller_item --> rrd_step = 300 poller_item --> rrd_next_step = 0 collection rate for "Host MIB - Get Mounted Partitions" data source is 1 minute. Poller is spine running at 1 minute intervals.

I do have a few data sources that are updated every 5 minutes, and come to think of it most of those are datasources that monitor disk usage. Perhaps I should try changing the interval to 5 minutes for "Host MIB - Get Mounted Partitions"

cigamit commented 7 years ago

I have confirmed the logic that I thought might be causing a problem. Did you say that the RRDfiles were not being created or updated?

cigamit commented 7 years ago

Please try again when 1.0.5 is released and see if you can reproduce. I'm going to mark this as unable to reproduce.

dsclassen commented 7 years ago

The rrd files are not being made. Please se the following 3 screen shots. Thanks. norrd_1 norrd_2 norrd_3