![]() ![]() The Prometheus Node Exporter is a single static binary that you can install via tarball. In this example it will scrape all databases except for the one named 'secrets'.NOTE: While the Prometheus Node Exporter is for *nix systems, there is the Windows exporter for Windows that serves an analogous purpose. meaning that all databases *except* these will be scraped. This example uses a component to collect custom metrics from all databases exceptĭata_source_names = The database_denylist field will filter out those databases from the list of databases to scrape, The database_allowlist field means that only the 'frontend_app' and 'backend_app'ĭatabase_allowlist = Ĭustom_queries_config_path = "/etc/agent/custom-postgres-metrics.yaml"Ĭollect metrics from all databases except for a denylisted database Specific databases, replacing default metrics with custom metrics derived from queries in /etc/agent/custom-postgres-metrics.yaml:ĭata_source_names = This block configures autodiscovery to check for databases outside of the 'database_name' db This example uses a component to collect custom metrics from a set of PASSWORD: The password to use for authentication to the remote_write API.Ĭollect custom metrics from an allowlisted set of databases. ![]() USERNAME: The username to use for authentication to the remote_write API.PROMETHEUS_REMOTE_WRITE_URL: The URL of the Prometheus remote_write-compatible server to send metrics to.Because no autodiscovery is defined, this will only scrape the 'database_name' database, as defined Server running locally with all default settings: This example uses a component to collect metrics from a Postgres Examples Collect metrics from a PostgreSQL server does not expose any component-specificĭebug metrics. is only reported as unhealthy if givenĪn invalid configuration. The exported targets use the configured in-memory traffic address specified by the run command. The targets that can be used to collect exporter metrics.įor example, the targets can either be passed to a discovery.relabel component to rewrite the targets’ label sets or to a prometheus.scrape component that collects the exposed metrics. The following fields are exported and can be referenced by other components. If autodiscovery is disabled, neither database_allowlist nor database_denylist will have any effect. If enabled is set to true and no allowlist or denylist is specified, the exporter will scrape from all databases. List of databases to filter out, meaning all other databases will be scraped. List of databases to filter for, meaning only these databases will be scraped. The autodiscovery block configures discovery of databases, outside of any specified in data_source_names. The following blocks are supported: Hierarchy A full list can be found in the postgres_exporter repository. NOTE: There are a number of environment variables that are not recommended for use, as they will affect all components. See examples for the custom_queries_config_path file in the postgres_exporter repository. The format for connection strings in data_source_names can be found in the official postgresql documentation. Path to YAML file containing custom queries to expose as metrics. When true, only exposes metrics supplied from custom_queries_config_path. Specifies the Postgres server(s) to connect to.ĭisables collection of metrics from pg_settings. The following arguments are supported: Name Data_source_names = DATA_SOURCE_NAMES_LIST
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |