Force rrd Boost every 5 minutes for specific rrd | Cli

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
User avatar
zuka1337
Posts: 21
Joined: Thu Jan 28, 2021 9:08 am

Force rrd Boost every 5 minutes for specific rrd | Cli

Post by zuka1337 »

Hello,

General :
  • As I have Multiple pollers, so data is not always available every 5 minutes pooll on rrd, so thats a problem.
  • I have Weathermap Standalone, we all know that for this implementation is not ideal cause we don't have real time graph data on weathermap, cuz boost somethimes
    has to deal with his own bussiness, before storing data
Idea:
  • If I call an json/export graph we can force the update for that specific rrd for every and each minute you want.
  • I can make an script where is going to call the json export every 5 minutes and have weathermap fresh and clean data

Now how can I call this via Curl?

I know if we open an outdated graph (not yet updated from boost system) we can force the boost to update that specific rrd.
curl --header 'Authorization: Basic PASSHERE' http://cacti.com/cacti/graph_json.php?r ... _width=500
curl: (6) Could not resolve host: Basic; Name or service not known
curl: (6) Could not resolve host: PASSHERE; Name or service not known
{"status":"500","statusText":"Not Logged In","responseText":"You must be logged in to access this area of Cacti."}
Or
curl --user user:?user --request GET http://cacti.com/cacti/graph_json.php?r ... _width=500
[1] 496
[2] 497
[3] 498
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0[4] 499
[5] 500
[2] Done local_graph_id=609582
[3] Done graph_start=1569069730
[4] Done graph_end=1569156130
[5]+ Done graph_height=120

$ ~/curl
100 114 100 114 0 0 765 0 --:--:-- --:--:-- --:--:-- 760{"status":"500","statusText":"Not Logged In","responseText":"You must be logged in to access this area of Cacti."}
^C
[1]+ Done curl --user user:?user --request GET http://cacti.com/cacti/graph_json.php?rra_id=0
I'm realy sorry if this is a noob question to post here.
Github https://github.com/zuka1337
Killspikealt https://github.com/zuka1337/killspikealt "Graphical Interface to Remove Spikes"
Spikepyrrd https://github.com/zuka1337/Spikepyrrd "Python Script to remove spikes from graph"
User avatar
TheWitness
Developer
Posts: 17061
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Force rrd Boost every 5 minutes for specific rrd | Cli

Post by TheWitness »

You need to enable the guest account to do unauthenticated requests. Otherwise, you will have to login via your script. Check out the "check_all_pages.sh" script in the GitHub for how to achieve that.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
zuka1337
Posts: 21
Joined: Thu Jan 28, 2021 9:08 am

Re: Force rrd Boost every 5 minutes for specific rrd | Cli

Post by zuka1337 »

Well, I don't think this is the way to go as curl or wget does not load javascript pr ajax on the webpage, I'll think in something else
Github https://github.com/zuka1337
Killspikealt https://github.com/zuka1337/killspikealt "Graphical Interface to Remove Spikes"
Spikepyrrd https://github.com/zuka1337/Spikepyrrd "Python Script to remove spikes from graph"
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests