Measure latency with various handlers and expose Prometheus histograms to measure Service Level Objectives (SLO).
openssl req -x509 -newkey ec -pkeyopt ec_paramgen_curve:secp384r1 -days 3650 -nodes -keyout docker/tls/db.key -out docker/tls/db.crt
listen_addr
(string): host address to listen for the HTTP serviceroute
(string): name of the HTTP route to expose metricsjobs
(list): see Jobs belowjob_label_name
(string): name of the Prometheus label registering the job namebuckets
([]float64): list of thresholds in seconds to define Prometheus bucketsduration_metric
(string): name of the metric registering the duration histogramfailures_metric
(string): name of the metric registering the failures counterjobs_metric
(string): name of the metric registering the job execution counterqueries_metric
(string): name of the metric registering the queries counterquery_labels
:name
(string): name of the label registering the query nameconnect_value
(string): name of the connect queryread_value
(string): name of the read querywrite_value
(string): name of the write querydisconnect_value
(string): name of the disconnect query
log_level
(string): level of logging (debug
,info
,warn
(default),error
)log_format
(string): format of log messages (text
(default),json
)
name
(string): name of the jobtype
(string): name of the driver to use to perform queries (clickhouse
,mongodb
,mysql
,postgresql
,valkey
)query_type
(string): type of queries to measure (read
,write
,read_write
)hosts_discovery
: see "Host discovery" sectiontimeout
(int): number of second(s) before returning an errorinterval
(int): number of second(s) to wait before next executionjob_per_host
(bool): create a job for each discovered hostprefix_name_with_host
(bool): add host to the job name (when using host discovery for example)name_separator
(string): character to use to separate host and job name (used whenprefix_name_with_host
is enabled)cache_hostnames
(bool): resolve hostnames at startup to exclude DNS resolution time from measurements (ignored formongodb+srv
scheme, disabled by default)
dsn
(string): connection string (ex:clickhouse://***:***@127.0.0.1:9440/canary_clickhouse?secure=true&skip_verify=true
)hosts
([]string): list of hostsusername
(string): user name used for authenticationpassword
(string): password used for authenticationsecure
(bool): use TLS for the connectionskip_verify
(bool): skip verification of the TLS certificatedatabase
(string): name of the databasetable
(string): name of the tablecreate
(bool): create table if it doesn't exist (used byread
queries)
dsn
(string): connection string (ex:mongodb://127.0.0.1:27017/canary_mongodb?tls=true&tlsInsecure=true
)scheme
(string): scheme for the connection (mongodb
,mongodb+srv
)hosts
([]string): list of hostsusername
(string): user name used for authenticationpassword
(string): password used for authenticationtls
(bool): use TLS for the connectiontls_insecure
(bool): skip verification of the TLS certificatedatabase
(string): name of the databasecollection
(string): name of collectioncreate
(bool): create collection if it doesn't exist (used byread
queries)
dsn
(string): connection string (ex:***:***@tcp(127.0.0.1:3306)/canary_mysql?tls=skip-verify
)host
(string): host addressusername
(string): user name used for authenticationpassword
(string): password used for authenticationport
(int): connect to this porttls_config
(string): use TLS for the connection (false
,true
,skip-verify
,preferred
)allow_native_passwords
(bool): allow to connect using the mysql_native_password authentication plugindatabase
(string): name of the databasetable
(string): name of the tablecreate
(bool): create table if it doesn't exist (used byread
queries)
dsn
(string): connection string (ex:postgres://***:***@127.0.0.1:5432/canary_postgresql?sslmode=require
)hosts
([]string): list of hostsport
(int): connect to this portusername
(string): user name used for authenticationpassword
(string): password used for authenticationsslmode
(string): use TLS for the connection (see available modes)database
(string): name of the databasetable
(string): name of the tablecreate
(bool): create table if it doesn't exist (used byread
queries)
dsn
(ex:rediss://127.0.0.1:6380/0
)hosts
([]string): list of hostsport
(int): connect to this port. If not defined, use ports from thehosts
list or 6379.master_set
(string): enable Sentinel mode and connect to this master set nameusername
(string): user name used for authenticationpassword
(string): password used for authenticationtls
(bool): use TLS for the connectionskip_verify
(bool): skip verification of the TLS certificatedatabase
(int): database numberkey
(string): name of the keycreate
(bool): write to key if it doesn't exist (used byread
queries)
Canary NG is able to discover a list of hosts instead of defining host
or hosts
in each job configuration.
Example:
jobs:
host_discovery:
type: consul
token: ***
node_meta:
dbms_type: postgresql
return_meta: vip
addresses
([]string): list of Consul servers addressesscheme
(string): URI scheme of Consul servers (http
,https
)skip_verify
(bool): skip verification of the TLS certificatedatacenter
(string): name of the Consul datacentertoken
(string): token used for authenticationnode_meta
(map[string][string]): return list of nodes matching these node metareturn_meta
(string): instead of returning the node IP address (by default), return the value of the node meta available on the nodereturn_metas
([]string): same asreturn_meta
but with multiple values (return_meta
is ignored ifreturn_metas
is configured)