Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Add postgresql metrics collection #30

Merged
merged 3 commits into from
Feb 13, 2019
Merged

Add postgresql metrics collection #30

merged 3 commits into from
Feb 13, 2019

Conversation

suckatrash
Copy link
Contributor

This will add the ability to monitor the PE postgres database and setup an example dashboard.

@suckatrash suckatrash changed the title Postgresv3 Add postgresql metrics collection Jan 5, 2019
@suckatrash suckatrash added the WIP Work in progress label Jan 5, 2019
@suckatrash suckatrash removed the WIP Work in progress label Jan 5, 2019
<% if $postgres_host {-%>

[[inputs.postgresql_extensible]]
address = "postgres://telegraf@<%= $postgres_host %>/pe-puppetdb?sslmode=require&sslkey=/etc/telegraf/<%= $fqdn %>.private_key.pem&sslcert=/etc/telegraf/<%= $fqdn %>.public_key.pem&sslrootcert=/etc/telegraf/ca.pem"
Copy link
Contributor

Choose a reason for hiding this comment

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

The two $fqdn entries here do not correspond to any parameters being passed into this template per the section at the top of the file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah this is doing the legacy fact thing again. Can we use $facts['networking']['fqdn'] or does the parameter have to be passed in?


[[inputs.postgresql_extensible]]
address = "postgres://telegraf@<%= $postgres_host %>/pe-puppetdb?sslmode=require&sslkey=/etc/telegraf/<%= $fqdn %>.private_key.pem&sslcert=/etc/telegraf/<%= $fqdn %>.public_key.pem&sslrootcert=/etc/telegraf/ca.pem"
databases = ["pe-puppetdb","pe-rbac","pe-activity","pe-classifier"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this be adjusted to work with FOSS puppet too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Possibly, we'd also need a different profile class to setup access on the master side, since the PR as-is leverages PE modules.

manifests/profile/postgres.pp Outdated Show resolved Hide resolved
manifests/init.pp Outdated Show resolved Hide resolved
@suckatrash suckatrash merged commit 711885b into puppetlabs:master Feb 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants