Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
Great templates you've created there Dmitry! Runs like a charm with only a bit configuration effort.
Inspired from that, I added an additional report for connection usage. It displays:
- Total Connections
- Connections in use/idle
I patched your pgsql_stats.php file to add the new get data_idx operation in the manner you've created the ones before.
What I didn't figure out, how you embedded the reports into one single .xml file. I had to create an external one - outside of your package. Maybe you could create the whole package again with this new report? Would be great for other users.
One last problem though: Getting active connections requires that the user used to login (here: monitor) must be the same doing the queries against the db - or has superuser privileges. If that's not the case active == total connections. But that's ok I think.
I figureed out and completed: 5. Edit your Host Template or Device and add PostgreSQL Database Stats in Data Queries.
I am still trying on: cacti_data_query_postgresql_database_stats.xml - Data Query + Graphs - import into Cacti, please give me instruction if you could.
hi, Dmitry!I had a problem ,when import your template.Please help me.
I used Version 0.8.7g. And I import your templates.And I click (Verbose Query) for debug.And return
+ Running data query [10].
+ Found type = '4 '[script query].
+ Found data query XML file at '/var/www/html/cacti/resource/script_queries/postgres_dbstat.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/bin/php /var/www/html/cacti/scripts/pgsql_stats.php 192.168.0.244 index'
+ Executing script query '/usr/bin/php /var/www/html/cacti/scripts/pgsql_stats.php 192.168.0.244 query dbname'
+ Found data query XML file at '/var/www/html/cacti/resource/script_queries/postgres_dbstat.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/script_queries/postgres_dbstat.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/script_queries/postgres_dbstat.xml'
when I click the "Create Graphs for this Host" to create the graph. There is no graph for select.Please see the Screenshot.
Just got this installed and I'm not able to create any graphs. When I click Create Graphs for this Host what you see in the attached screenshot. Debugging the query returns
+ Running data query [20].
+ Found type = '4 '[script query].
+ Found data query XML file at '/usr/local/share/cacti/resource/script_queries/postgres_dbstat.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/bin/php /usr/share/cacti/site/scripts/pgsql_stats.php sradmin index'
+ Executing script query '/usr/bin/php /usr/share/cacti/site/scripts/pgsql_stats.php sradmin query dbname'
+ Found data query XML file at '/usr/local/share/cacti/resource/script_queries/postgres_dbstat.xml'
+ Found data query XML file at '/usr/local/share/cacti/resource/script_queries/postgres_dbstat.xml'
+ Found data query XML file at '/usr/local/share/cacti/resource/script_queries/postgres_dbstat.xml'
And doing the select statement you said to returns results like expected.