Llama Charmers Juju Controller

  • By Llama (LMA) Charmers
Channel Version Revision Published Runs on
latest/stable e7f7c73 9 28 Apr 2022
Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04
latest/candidate e7f7c73 9 28 Apr 2022
Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04
latest/edge e7f7c73 9 28 Apr 2022
Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04
juju deploy llama-charmers-juju-controller
Show information

Platform:

Ubuntu
20.04 18.04 16.04

Overview

This charm provides a principal Juju unit so that we relate things like nrpe, landscape-client, etc., to service the Juju controllers in a controller model. Typically we want to do this when we have Nagios in a separate model and wish to use cross model relations to allow monitoring and updates of the controller machines.

Usage

In order to monitor a controller on machine 0 in a model named 'controller':

juju switch controller
juju deploy cs:~llama-charmers/juju-controller --to 0 juju-controller
juju deploy cs:nrpe nrpe-controller
juju add-relation nrpe-controller juju-controller
juju config nrpe-controller nagios_host_context=mysitename
juju offer nrpe-controller:monitors

Note the output of the "offer" command will look like the following example. You will need the output's "available at" value for the next add-relation command:

Application "nrpe" endpoints [monitors] available at "admin/controller.nrpe-controller"

You can then follow-up within the model with the nagios application with the following (substituting admin/controller.nrpe-controller for the output from your offer command above:

juju switch $model_with_nagios
juju add-relation nagios:monitors admin/controller.nrpe-controller

You can alternately use this as a bundle, for example:

applications:
  juju-controller:
    charm: cs:~llama-charmers/juju-controller
    num_units: 1
    to:
      - 0
  nrpe-controller:
    charm: cs:nrpe
    options:
      nagios_host_context: my_sitename
  ntp:
    charm: cs:ntp
  landscape-client-controller:
    charm: cs:landscape-client-30
    options:
      account-name: standalone
      disable-unattended-upgrades: true
      origin: ppa:landscape/17.03
  telegraf-controller:
    charm: cs:telegraf
  filebeat-controller:
    charm: cs:filebeat

machines:
  '0':
    series: xenial

relations:
- - nrpe-controller:nrpe-external-master
  - juju-controller:nrpe-external-master
- - juju-controller:juju-info
  - ntp:juju-info
- - juju-controller:juju-info
  - filebeat-controller:beats-host
- - juju-controller:juju-info
  - landscape-client-controller:container
- - juju-controller:juju-info
  - telegraf-controller:juju-info

To query the offers for other apps, try:

$ juju offer filebeat-controller:logstash
Application "filebeat-controller" endpoints [logstash] available at "admin/controller.filebeat-controller"
$ juju offer telegraf-controller:prometheus-client
Application "telegraf-controller" endpoints [prometheus-client] available at "admin/controller.telegraf-controller"

To consume those offers, switch to the model with the consuming application such as prometheus or graylog with:

juju switch $model
juju add-relation prometheus:target admin/controller.telegraf-controller
juju add-relation graylog admin/controller.filebeat-controller

Bugs

https://bugs.launchpad.net/charm-juju-controller