node-exporter 2/2 6s ago docker.io/prom/node-exporter:latest e5a616e4b9cf present
prometheus 1/1 6s ago docker.io/prom/prometheus:latest e935122ab143 present
+Using custom images
+~~~~~~~~~~~~~~~~~~~
+
+It is possible to install or upgrade monitoring components based on other
+images. To do so, the name of the image to be used needs to be stored in the
+configuration first. The following configuration options are available.
+
+- ``container_image_prometheus``
+- ``container_image_grafana``
+- ``container_image_alertmanager``
+- ``container_image_node_exporter``
+
+Custom images can be set with the ``ceph config`` command::
+
+ ceph config set mgr mgr/cephadm/<option_name> <value>
+
+For example::
+
+ ceph config set mgr mgr/cephadm/container_image_prometheus prom/prometheus:v1.4.1
+
+.. note::
+
+ By setting a custom image, the default value will be overridden (but not
+ overwritten). The default value changes when updates become available.
+ By setting a custom image, you will not be able to update the component
+ you have set the custom image for automatically. You will need to
+ manually update the configuration (image name and tag) to be able to
+ install updates.
+
+ If you choose to go with the recommendations instead, you can reset the
+ custom image you have set before. After that, the default value will be
+ used again. Use ``ceph config rm`` to reset the configuration option::
+
+ ceph config rm mgr mgr/cephadm/<option_name>
+
+ For example::
+
+ ceph config rm mgr mgr/cephadm/container_image_prometheus
+
Disabling monitoring
--------------------
'desc': 'Container image name, without the tag',
'runtime': True,
},
+ {
+ 'name': 'container_image_prometheus',
+ 'default': 'prom/prometheus:v2.18.1',
+ 'desc': 'Prometheus container image',
+ },
+ {
+ 'name': 'container_image_grafana',
+ 'default': 'ceph/ceph-grafana:latest',
+ 'desc': 'Prometheus container image',
+ },
+ {
+ 'name': 'container_image_alertmanager',
+ 'default': 'prom/alertmanager:v0.20.0',
+ 'desc': 'Prometheus container image',
+ },
+ {
+ 'name': 'container_image_node_exporter',
+ 'default': 'prom/node-exporter:v0.18.1',
+ 'desc': 'Prometheus container image',
+ },
{
'name': 'warn_on_stray_hosts',
'type': 'bool',
self.host_check_interval = 0
self.mode = ''
self.container_image_base = ''
+ self.container_image_prometheus = ''
+ self.container_image_grafana = ''
+ self.container_image_alertmanager = ''
+ self.container_image_node_exporter = ''
self.warn_on_stray_hosts = True
self.warn_on_stray_daemons = True
self.warn_on_failed_host_check = True
'key': 'container_image',
})
image = image.strip() # type: ignore
+ elif daemon_type == 'prometheus':
+ image = self.container_image_prometheus
+ elif daemon_type == 'grafana':
+ image = self.container_image_grafana
+ elif daemon_type == 'alertmanager':
+ image = self.container_image_alertmanager
+ elif daemon_type == 'node-exporter':
+ image = self.container_image_node_exporter
+
self.log.debug('%s container image %s' % (entity, image))
final_args = []