prometheus #5
Description
Prometheus is a systems and service monitoring system. It collects metrics from configured targets at given intervals, evaluates rule expressions, displays the results, and can trigger alerts if some condition is observed to be true.
- Tags:
- monitoring ›
Juju prometheus charm
This charm provides the Prometheus monitoring system from http://prometheus.io/.
How to deploy the charm
Development
Explicitly set JUJU_REPOSITORY
:
export JUJU_REPOSITORY=/path/to/charms
mkdir -p $JUJU_REPOSITORY/layers
Branch code to:
$JUJU_REPOSITORY/layers/prometheus/
Modify
Assemble the charm:
charm build
How to deploy with storge (requires juju 1.25)
juju deploy local:trusty/prometheus --storage metrics-filesystem=rootfs prometheus
Configuration
- custom-rules
- (string) base64 encoded rules to be loaded by prometheus.yml (custom.rules file)
- evaluation-interval
- (string) Default evaluation interval
- 15s
- external_url
- (string) The URL under which Prometheus is externally reachable (for example, if Prometheus is served via a reverse proxy). Used for generating relative and absolute links back to Prometheus itself. If the URL has a path portion, it will be used to prefix all HTTP endpoints served by Prometheus. If omitted, relevant URL components will be derived automatically. It's templatized to accept the following vars: {private_address}, {public_address}, {port}, thus you can use e.g.: juju set prometheus external_url="http://{private_address}:{port}/"
- install_keys
- (string) YAML list of GPG keys for installation sources, as a string. For apt repository URLs, use the public key ID used to verify package signatures. For other sources such as PPA, use empty string. This list must have the same number of elements as install_sources, even if the key items are all empty string. An example to go with the above for install_sources: install_keys: | - "ABC" - ""
- install_sources
- (string) YAML list of additional installation sources, as a string. The number of install_sources must match the number of install_keys. For example: install_sources: | - ppa:project1/ppa - ppa:project2/ppa
- [ "ppa:canonical-bootstack/prometheus" ]
- monitor-name
- (string) Prometheus monitor name, will default <service_name>-monitor if not set
- nagios_context
- (string) A string that will be prepended to instance name to set the host name in nagios. So for instance the hostname would be something like: juju-myservice-0 If you're running multiple environments with the same services in them this allows you to differentiate between them.
- juju
- nagios_servicegroups
- (string) Comma separated list of nagios servicegroups for the graphite check
- juju
- scrape-interval
- (string) Interval at which to scrape targets
- 15s
- static-targets
- (string) Where to gather metrics from. Examples: host1.maas:9090 host1.maas:9090, host2.maas:9090