Closed dsclassen closed 7 years ago
What happens when you test using the script server? What does the rrdtool info say?
Could it be a permission problem?
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)
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
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'
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.
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?
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"
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?
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.
The rrd files are not being made. Please se the following 3 screen shots. Thanks.
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.