Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabling remote write for postgresql metrics #1577

Merged
merged 5 commits into from Apr 19, 2021

Conversation

himanshu219
Copy link
Contributor

Description

Fill in your description here.

This PR enables metrics for PostgreSQL


Testing performed
  • Redeploy fluentd and fluentd-events pods
  • Confirm events, logs, and metrics are coming in

remoteTimeout: 5s
writeRelabelConfigs:
- action: keep
regex: (?:postgresql_(blks_hit.*|blks_read.*|buffers_backend.*|buffers_checkpoint.*|buffers_clean.*|checkpoints_req.*|checkpoints_timed.*|db_size.*|deadlocks.*|flush_lag.*|heap_blks_hit.*|heap_blks_read.*|idx_blks_hit.*|idx_blks_read.*|idx_scan.*|idx_tup_fetch.*|idx_tup_read.*|index_size.*|n_dead_tup.*|n_live_tup.*|n_tup_del.*|n_tup_hot_upd.*|n_tup_ins.*|n_tup_upd.*|num_locks.*|numbackends.*|replay_lag.*|replication_delay.*|replication_lag.*|seq_scan.*|seq_tup_read.*|stat_ssl_compression_count.*|table_size.*|tup_deleted.*|tup_fetched.*|tup_inserted.*|tup_returned.*|tup_updated.*|write_lag.*|xact_commit.*|xact_rollback.*)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • This regex is invalid: it doesn't have an matching closing parenthesis.
  • Do we need to add a wildcard to every single pattern here? I'd try to avoid that. If we can't then please update the comment above to reflect the asterisks in regexes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strange it didn't failed when I redeployed with this command
helm3 upgrade --install sumo-release sumologic/sumologic --namespace=sumo-collector --create-namespace -f sumologic-values.yaml --set telegraf-operator.enabled=true ...

Am I testing it correctly ? do I have to kill the postgresql pods?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should have as minimal regex (in terms of matches) as possible. We should avoid wildcard as @pmalek-sumo said.

Copy link
Contributor

@pmalek-sumo pmalek-sumo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 @sumo-drosiek any comments? I believe this is alright now

Copy link
Contributor

@sumo-drosiek sumo-drosiek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything is fine. Regex matches for 45 strings and all of the strings from list (45) are matched.
Thanks 🚀

@sumo-drosiek sumo-drosiek merged commit dc58f14 into main Apr 19, 2021
@sumo-drosiek sumo-drosiek deleted the hpal_postgresql_enable_remotewrite branch April 19, 2021 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants