You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

postgresql.toml 2.0 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # Read metrics from one or many postgresql servers
  2. # # collect interval
  3. # interval = 15
  4. [[instances]]
  5. ## specify address via a url matching:
  6. ## postgres://[pqgotest[:password]]@localhost[/dbname]?sslmode=[disable|verify-ca|verify-full]
  7. ## or a simple string:
  8. ## host=localhost user=pqgotest password=... sslmode=... dbname=app_production
  9. ##
  10. ## All connection parameters are optional.
  11. ##
  12. ## Without the dbname parameter, the driver will default to a database
  13. ## with the same name as the user. This dbname is just for instantiating a
  14. ## connection with the server and doesn't restrict the databases we are trying
  15. ## to grab metrics for.
  16. ##
  17. # address = "host=localhost user=postgres sslmode=disable"
  18. ## A custom name for the database that will be used as the "server" tag in the
  19. ## measurement output. If not specified, a default one generated from
  20. ## the connection address is used.
  21. # outputaddress = "db01"
  22. ## connection configuration.
  23. ## maxlifetime - specify the maximum lifetime of a connection.
  24. ## default is forever (0s)
  25. # max_lifetime = "0s"
  26. ## A list of databases to explicitly ignore. If not specified, metrics for all
  27. ## databases are gathered. Do NOT use with the 'databases' option.
  28. # ignored_databases = ["postgres", "template0", "template1"]
  29. ## A list of databases to pull metrics about. If not specified, metrics for all
  30. ## databases are gathered. Do NOT use with the 'ignored_databases' option.
  31. # databases = ["app_production", "testing"]
  32. ## Whether to use prepared statements when connecting to the database.
  33. ## This should be set to false when connecting through a PgBouncer instance
  34. ## with pool_mode set to transaction.
  35. #prepared_statements = true
  36. # [[instances.metrics]]
  37. # mesurement = "sessions"
  38. # label_fields = [ "status", "type" ]
  39. # metric_fields = [ "value" ]
  40. # timeout = "3s"
  41. # request = '''
  42. # SELECT status, type, COUNT(*) as value FROM v$session GROUP BY status, type
  43. # '''