SOLVE | Force On-demand RRD Updating | Weathermap issue
Moderators: Developers, Moderators
SOLVE | Force On-demand RRD Updating | Weathermap issue
Hello,
I would like to know if it's possible to force On-demand RRD Update for some specific graphic using CLI, I'm using cacti 1.2.7 with 3 remote pollers. I would like to put Weathermap working on this version, I got it working but sometimes I get the links in gray because the data is still on poller_output_boost.
I noticed that when I open a graphic using the browser the data is uploaded to the rrd, I already tried to curl, wget.. but doesn't work.
When I open all the graphics on the browser and then run "./weathermap --config x.conf --output x.png --htmloutput x.html" I got all the map's working perfectly
So I would like to do a script to simulate the "On-demand RRD Update" before run the Weathermap script.
ps: I'm a new cacti user
I would like to know if it's possible to force On-demand RRD Update for some specific graphic using CLI, I'm using cacti 1.2.7 with 3 remote pollers. I would like to put Weathermap working on this version, I got it working but sometimes I get the links in gray because the data is still on poller_output_boost.
I noticed that when I open a graphic using the browser the data is uploaded to the rrd, I already tried to curl, wget.. but doesn't work.
When I open all the graphics on the browser and then run "./weathermap --config x.conf --output x.png --htmloutput x.html" I got all the map's working perfectly
So I would like to do a script to simulate the "On-demand RRD Update" before run the Weathermap script.
ps: I'm a new cacti user
Last edited by irocosta on Mon Jan 27, 2020 9:57 am, edited 1 time in total.
Re: Force On-demand RRD Updating | Weathermap issue
That' seems odd, it's as if the web user does not have write access to the RRDfiles. So long as weathermap uses the standard graphing API, the RRDfiles will be updated by Apache.
You may have either SELinux enabled, or you have mod_secure installed on your server, or finally, you may have the wrong permissions on the RRDfile. Generally I do the following:
For mod secure:
You may have either SELinux enabled, or you have mod_secure installed on your server, or finally, you may have the wrong permissions on the RRDfile. Generally I do the following:
For mod secure:
For SELinux:rpm -qa | grep mod_secure (and if it's installed)
rpm -e `rpm -qa | grep "mod_secure"`
systemctl restart httpd
For ownership:cat /etc/selinux/config (if you find SELINUX=ENFORCING change to DISABLED and reboot)
ps -ef | grep httpd (find the account and then...)
chown -R apache:apache /var/www/html/cacti
Before history, there was a paradise, now dust.
Re: Force On-demand RRD Updating | Weathermap issue
Hi,
I checked all the steps but I don't have any of the steps activate and the ownership I got cacti.apache, I don't know if the API works using the Weathermap script, every time I run "./weathermap --config x.conf --output x.png --htmloutput x.html" and is still data in "poller_output_boost" I got this error
./weathermap --config x.conf --output x.png --htmloutput x.html ERROR:
WARNING: x.conf: RRD ReadData: poller_output - Cacti environment is not right [WMRRD12]
WARNING: x.conf: ReadData: LINK xxx, target: /common/cacti/rra/1847/852330.rrd on config line 222 of BBNG.conf had no valid data, according to WeatherMapDataSource_rrd
WARNING: x.conf: RRD ReadData: poller_output - Cacti environment is not right [WMRRD12]
WARNING: x.conf: ReadData: LINK xxx, target: /common/cacti/rra/1848/852337.rrd on config line 230 of BBNG.conf had no valid data, according to WeatherMapDataSource_rrd
WARNING: x.conf: RRD ReadData: poller_output - Cacti environment is not right [WMRRD12]
WARNING: x.conf: ReadData: LINK xxx, target: /common/cacti/rra/1848/852338.rrd on config line 238 of BBNG.conf had no valid data, according to WeatherMapDataSource_rrd
Equipe info:
root@:/var/www/html# rpm -qa | grep mod_secure
root@:/var/www/html# cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
root@:/common# ls -lah
total 533M
drwxr-xr-x 6 root root 94 Dec 5 19:16 .
dr-xr-xr-x. 19 root root 251 Sep 23 15:43 ..
drwxrwxrwx 23 cacti apache 4.0K Dec 5 18:23 cacti
root@:/common# cat /etc/group | grep cacti
cacti1004:apache,root
note: I got chmod 777 for now to troubleshot
That is the reason I want to force the data to be written from poller_output_boost until I run ./weathermap --config x.conf --output x.png --htmloutput x.html
I checked all the steps but I don't have any of the steps activate and the ownership I got cacti.apache, I don't know if the API works using the Weathermap script, every time I run "./weathermap --config x.conf --output x.png --htmloutput x.html" and is still data in "poller_output_boost" I got this error
./weathermap --config x.conf --output x.png --htmloutput x.html ERROR:
WARNING: x.conf: RRD ReadData: poller_output - Cacti environment is not right [WMRRD12]
WARNING: x.conf: ReadData: LINK xxx, target: /common/cacti/rra/1847/852330.rrd on config line 222 of BBNG.conf had no valid data, according to WeatherMapDataSource_rrd
WARNING: x.conf: RRD ReadData: poller_output - Cacti environment is not right [WMRRD12]
WARNING: x.conf: ReadData: LINK xxx, target: /common/cacti/rra/1848/852337.rrd on config line 230 of BBNG.conf had no valid data, according to WeatherMapDataSource_rrd
WARNING: x.conf: RRD ReadData: poller_output - Cacti environment is not right [WMRRD12]
WARNING: x.conf: ReadData: LINK xxx, target: /common/cacti/rra/1848/852338.rrd on config line 238 of BBNG.conf had no valid data, according to WeatherMapDataSource_rrd
Equipe info:
root@:/var/www/html# rpm -qa | grep mod_secure
root@:/var/www/html# cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
root@:/common# ls -lah
total 533M
drwxr-xr-x 6 root root 94 Dec 5 19:16 .
dr-xr-xr-x. 19 root root 251 Sep 23 15:43 ..
drwxrwxrwx 23 cacti apache 4.0K Dec 5 18:23 cacti
root@:/common# cat /etc/group | grep cacti
cacti1004:apache,root
note: I got chmod 777 for now to troubleshot
That is the reason I want to force the data to be written from poller_output_boost until I run ./weathermap --config x.conf --output x.png --htmloutput x.html
Re: Force On-demand RRD Updating | Weathermap issue
It would make me surprised in Howies plugin did not know about the on-demand updating and take action before parsing the RRDfiles. I would consider that a bug.
Before history, there was a paradise, now dust.
Re: Force On-demand RRD Updating | Weathermap issue
Is there any way to call this "standard graphing API" manually? For a workaround
Re: Force On-demand RRD Updating | Weathermap issue
You should grep weathermap for graph_image.php. if you find that, it's using the standard API's.
Before history, there was a paradise, now dust.
Re: Force On-demand RRD Updating | Weathermap issue
root@x:/common/cacti/weathermap# cat weathermap | grep graph_image.php | wc -l
0
Doesn't call it, I solved the problem using selenium + phyton
Now I got my weathermap working again, with this workaround
0
Doesn't call it, I solved the problem using selenium + phyton
Now I got my weathermap working again, with this workaround
Re: Force On-demand RRD Updating | Weathermap issue
That command looks wrong. just do grep "graph_image.php" * -R instead when you in the weathermaps folder.
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Who is online
Users browsing this forum: No registered users and 1 guest