Topbeat is an open source shipper for per-process CPU, memory, and disk usage metrics
A lightweight way to gather CPU, memory, and other per-process and system wide
data, then ship it to Elasticsearch to analyze the results.
Topbeat can be added to any principal charm thanks to the wonders of being
a subordinate charm. The following usage example will deploy an ubuntu
metric source along with the elk stack so we can visualize our data.
juju deploy ~containers/bundle/elk-stack juju deploy ~containers/topbeat juju deploy ubuntu juju add-relation topbeat:beats-host ubuntu juju add-relation topbeat logstash
Deploying the minimal Beats formation
If you do not need log buffering and alternate transforms on data that is
being shipped to ElasticSearch, you can simply deploy the 'beats-core' bundle
which stands up Elasticsearch, Kibana, and the known working Beats
juju deploy ~containers/bundle/beats-core juju deploy ubuntu juju add-relation filebeat:beats-host ubuntu juju add-relation topbeat:beats-host ubuntu
Changing what is shipped
By default, the Topbeat charm is setup to ship everything:
This is a regular expression to match the processes that are monitored
juju config topbeat procs="^$"
would tell topbeat not to send any process data and only collect the machine
statistics such as load, ram, and disk usage.
Testing the deployment
The applications provide extended status reporting to indicate when they are
This is particularly useful when combined with watch to track the on-going
progress of the deployment:
watch juju status
The message for each unit will provide information about that unit's state.
Once they all indicate that they are ready, you can navigate to the kibana
url and view the streamed data from the Ubuntu host.
juju status kibana --format=yaml | grep public-address
Navigate to http://<kibana-ip>/ in a browser and begin creating your
Scale Out Usage with different configuration
Perhaps you want to monitor things slightly differently on only a few charms
in your model:
juju deploy ~containers/topbeat custom-topbeat juju add-relation custom-topbeat:elasticsearch elasticsearch
You are then free to configure and relate custom-topbeat to your host(s) to be
monitored using the existing beats-core infrastructure you stood up in the
- Charles Butler Chuck@dasroot.net
- Matthew Bruzek firstname.lastname@example.org
- Tim Van Steenburgh email@example.com
- George Kraft firstname.lastname@example.org
- Rye Terrell email@example.com
- Konstantinos Tsakalozos firstname.lastname@example.org
- (string) Topic name. Format strings are allowed.
- (string) A comma separated list of kafka output hosts in addition to those from relations.
- (int) how often in seconds to read system-wide and per-process statistics
- (boolean) Send topbeat logs to syslog (https://www.elastic.co/guide/en/beats/topbeat/current/configuration-logging.html)
- (string) The status of service-affecting packages will be set to this value in the dpkg database. Valid values are "install" and "hold".
- (string) Space separated list of extra deb packages to install.
- (string) Private SSL key data (base64 encoded) for connecting security to logstash.
- (string) Public SSL certificate data (base64 encoded) for connecting securely to logstash.
- (string) repository key
- (string) apt repository to fetch beats from
- deb http://packages.elastic.co/beats/apt stable main
- (string) Process regex to pass to the monitor. To disable process filtering, set ^$
- (string) A comma separated list of logstash output hosts in addition to those from relations.