Comments (4)
@jglapa Interesting idea!
I wonder if you could check the modified time of the state file (typically at /var/lib/pganalyze-collector/state) and alert if its older than e.g. 15 minutes?
from collector.
From what I see the file /var/lib/pganalyze-collector/state
is getting modified every run although the data is not submitted to pganalyze.
I'm currently troubleshooting the following problem:
- I have a postgresql 9.6 installation on AWS RDS
- I've configured everything as described in the manual
- I'm using the newest collector
- but when I run the collector with
--dry-run
I'm getting the following:
2017/04/21 15:07:25 V [xxx] Detected PostgreSQL Version 90601 (PostgreSQL 9.6.1 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.2 20140120 (Red Hat 4.8.2-16), 64-bit)
2017/04/21 15:07:25 V [xxx] Found pganalyze.get_stat_statements() stats helper
2017/04/21 15:07:25 E [xxx] Error collecting pg_stat_statements
2017/04/21 15:07:25 E [xxx] Could not process database: pq: pg_stat_statements must be loaded via shared_preload_libraries
This must be an RDS issue since I've configured the shared_preload_libraries=pg_state_statements
correctly in parameter group but psql shows rdsutils
... ?,
([email protected]:5432) [test] [] > \dx
List of installed extensions
Name | Version | Schema | Description
--------------------+---------+------------+-----------------------------------------------------------
pg_stat_statements | 1.4 | public | track execution statistics of all SQL statements executed
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
(2 rows)
([email protected]:5432) [test] [] > show shared_preload_libraries;
shared_preload_libraries
--------------------------
rdsutils
(1 row)
([email protected]:5432) [test] [] > select * from pg_stat_statements ;
ERROR: pg_stat_statements must be loaded via shared_preload_libraries
Time: 165.208 ms
Anyhow with this issue in place the /var/lib/pganalyze-collector/state
mtime is still getting changed although an error is raised.
from collector.
@jglapa Fair point - for the specific issue you are seeing, first check that you have restarted your RDS server (otherwise changes to shared_preload_libraries don't take effect). We've also sometimes seen problems where RDS has an internal problem, and typically updating to the next minor PostgreSQL release fixed that.
On the success callback - I'm currently thinking we just make it --success-callback=/path/to/shell/script.sh
, which gets triggered once for each server, with the first and only argument being the name of the server (as per the collector config file). That sound reasonable?
from collector.
--success-callback=/path/to/shell/script.sh
And how would we configure that?
This would require changing collector startup scripts (upstart right now)?
I was more thinking about a new property in the pganalyze-collector.conf
file.
Passing the db config name when calling the script sound like a very good idea!
In my case I could either have 2 separate shell script( I have 2 db's) and simply ignore the passed parameter or have one script and make the distinction based on the parameter passed.
from collector.
Related Issues (20)
- Documentation/support for Google Cloud SQL Auth Proxy or Connector HOT 2
- Update collector README to reference pg_monitor role for setup instructions HOT 3
- Handle read-only filesystem gracefully HOT 1
- Make IdentifierMap cache TTL configurable HOT 3
- Could not collect activity for server HOT 8
- Unable to DB_USE_IAM_AUTH with aws RDS instance HOT 4
- Error calling pg_stat_statements_reset() as requested intermittently HOT 2
- Regular collector oom-kill at midnight UTC on Sundays HOT 1
- Publish Docker image to ECR public registry HOT 1
- Error to send snapshots HOT 2
- Upgrade go.uuid module HOT 3
- Missing image for v0.50.1 HOT 2
- Additional security settings for pganalyze collector HOT 3
- Add rudimentary test suite for Helm chart
- Debian build uses EOL version HOT 1
- Error: Failed to reload collector HOT 1
- OTEL connector - can it support Datadog APM traces for PostgreSQL HOT 2
- OTEL connector - can it support Datadog?
- Feature request: Add DB_PASSWORD_FILE or similar HOT 1
- Regarding SSO login HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from collector.