Check for existance of keys in dict
This commit adds a check for the 'error' key in the json object and skips the file if so. It also checks for a couple of keys that may or may not be present depending on the configuration.
Merge pull request #27 from puppetlabs/readme-token-update
Document the evaluation order of the Telegraf token
Merge pull request #26 from puppetlabs/starlark-validation
Check for existance of keys in dict
Fix handling of 'error' entry in dict
Prior to this commit, the error checking was too aggressive and resulted in emitting no metrics from PDB json files. This is because the 'error' object is always in the result and we need to check the length of its values.
Merge pull request #28 from puppetlabs/fix-pdb-error-handling
Fix handling of 'error' entry in dict
(SUP-3201) Make Grafana datasource idempotent
Prior to this commit, using the grafana_datasource resource with "secure json" parameters was not idempotent. This is because the api obfuscates these values, so we can't check the state of the datasource using this resource. This commit uses the "provisioning" directory to set the datasource at service startup. It uses a template to create the file so the token can be a Sensitive type and be redacted from logs and reports. It also adds an exec to make sure Grafana is ready to accept connections.
(SUP-3209) Grant pg_monitor role to telegraf
Prior to this commit, we did not create a postgres role for telegraf or grant it any permissions. This add two pe_postgresql_psql resources to accomplish this.
Allow telegraf to connect to pe-puppetdb
This is required due to this from the posgres docs: To connect to a particular database, a user must not only pass the pg_hba.conf checks, but must have the CONNECT privilege for the database
Merge pull request #30 from puppetlabs/SUP-3201-idempotent-datasource
(SUP-3201) Make Grafana datasource idempotent
(SUP-3201) Accept any Sensitive value in template
Prior to this commit, $token was declared as a Sensitive[String], but we may recieve an Undef value if the token was created in the current catalog application. This commit accepts any Sensitive value to account for this.
Merge pull request #32 from puppetlabs/SUP-3201-idempotent-datasource
(SUP-3201) Accept any Sensitive value in template
Merge pull request #31 from puppetlabs/SUP-3209-telegraf-grant
(SUP-3209) Grant pg_monitor role to telegraf
Add pe-puppetserver and toml-rb before acceptance tests
Prior to this commit, the acceptance test setup was failing to apply the influxdb::profile::toml class as it requires the pe-puppetserver service. It also needed the toml-rb to be installed in the puppet gem space. This commit adds the pe-puppetserver service resource to the puppet apply and includes the toml-rb gem for puppet_gem.
Allow changes in the acceptance test runs
Prior to this commit, the puppet apply statements in the acceptance tests expected a failure. This commit changes it to allow for changes or no changes on the applies.
Merge pull request #25 from MartyEwings/fixtures
Enable Acceptance Testing
(SUP-3201) Check port availability with systemd
Prior to this commit, we used an exec resource to check if the grafana service were ready to receive connections. However, this didn't account for initial provisioning, and it's a bit of a hack. This commit uses an ExecStartPost directive instead, which is better because it allows us to use metaparameters like 'require' directly on the service.
Merge pull request #33 from puppetlabs/SUP-3201-idempotent-datasource
(SUP-3201) Check port availability with systemd
Merge pull request #35 from MartyEwings/ubuntu-fix
(SUP-3228) Fix Ubuntu compatibility issue
Merge pull request #37 from MartyEwings/ordering
make resource ordering specific to install class
Merge pull request #36 from MartyEwings/SUP-3061
(SUP-3061) Install class for ent infrastructure agents
(SUP-3235) Use latest telegraf package on Ubuntu
Prior to this commit, Ubuntu provisioning would fail if the latest telegraf package were newer than the $version parameter. This looks to be because only the latest package is available in the Ubuntu repo. This commit changes the ensure property to be 'latest' on Ubuntu, and changes the archive url to use the $version parameter.
Move selector to $version class parameter
Also, re-add the no-lookup_in_parameter check to disabled lint checks.
Merge pull request #41 from puppetlabs/update-bucket-example
Update example to read token from disk
Merge pull request #38 from puppetlabs/SUP-3235-ubuntu-version
(SUP-3235) Use latest telegraf package on Ubuntu
(SUP-3243) Add index stats for pe-puppetdb tables
This commit adds an additional query to the postgres plugin to select index statistics for tables in the pe-puppetdb database. It also adds the datname of the current database, which fixes a bug where we were emitting metrics with a tag of 'postgres', because that is the default database.
Get table, index, and toast sizes in one query
This commit uses an example query from the postgres docs to get sizes for all relation types in one query. It also updates the dashboard to display this data.
Merge pull request #40 from puppetlabs/SUP-3243-index-stats
(SUP-3243) Add index stats for pe-puppetdb tables
Add panels for PDB read and write pools
This commit also fixes an issue with the queue_depth metrics, which comes from the /v1/status endpoint.
Merge pull request #42 from puppetlabs/connection-pool-panels
Add panels for PDB read and write pools
Display all http client and function metrics
This commit changes these two panels to group by the name of the function and http-client metric, thereby displaying all of them. The function counts now also use non_negative_difference over the time interval, since this is a cumulative total.
Merge pull request #43 from puppetlabs/update-http-function-panels
Display all http client and function metrics
Merge pull request #39 from MartyEwings/Docs
(SUP-3241) Add in Dashboard documentation
Merge pull request #44 from puppetlabs/bump-influx-dep
Bump influxdb dependency to 1.0
Merge pull request #45 from puppetlabs/release-prep
Release prep v1.0.0