to store and visualize detailed metrics on cluster utilization and
performance. Ceph users have three options:
-#. Have cephadm deploy and configure these services.
+#. Have cephadm deploy and configure these services. This is the default
+ when bootstrapping a new cluster unless the ``--skip-monitoring-stack``
+ option is used.
#. Deploy and configure these services manually. This is recommended for users
with existing prometheus services in their environment (and in cases where
Ceph is running in Kubernetes with Rook).
Deploying monitoring with cephadm
---------------------------------
-To deploy a basic monitoring stack:
+By default, bootstrap will deploy a basic monitoring stack. If you
+did not do this (by passing ``--skip-monitoring-stack``, or if you
+converted an existing cluster to cephadm management, you can set up
+monitoring by following the steps below.
#. Enable the prometheus module in the ceph-mgr daemon. This exposes the internal Ceph metrics so that prometheus can scrape them.::
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
+Disabling monitoring
+--------------------
+
+If you have deployed monitoring and would like to remove it, you can do
+so with::
+
+ ceph orch rm grafana
+ ceph orch rm prometheus --force # this will delete metrics data collected so far
+ ceph orch rm node-exporter
+ ceph orch rm alertmanager
+ ceph mgr module disable prometheus
+
Deploying monitoring manually
-----------------------------
tasks:
- cephadm:
- image: quay.io/ceph-ci/ceph:wip-sage3-testing-2020-03-14-0747
- cephadm_branch: wip-sage3-testing-2020-03-14-0747
+ image: quay.io/ceph-ci/ceph:wip-sage4-testing-2020-03-14-1141
+ cephadm_branch: wip-sage4-testing-2020-03-14-1141
'--mon-id', first_mon,
'--mgr-id', first_mgr,
'--orphan-initial-daemons', # we will do it explicitly!
+ '--skip-monitoring-stack', # we'll provision these explicitly
'--config', '{}/seed.{}.conf'.format(testdir, cluster_name),
'--output-config', '/etc/ceph/{}.conf'.format(cluster_name),
'--output-keyring',
logger.info('Deploying %s service with default placement...' % t)
cli(['orch', 'apply', t])
+ if not args.skip_monitoring_stack:
+ logger.info('Enabling mgr prometheus module...')
+ cli(['mgr', 'module', 'enable', 'prometheus'])
+ for t in ['prometheus', 'grafana', 'node-exporter', 'alertmanager']:
+ logger.info('Deploying %s service with default placement...' % t)
+ cli(['orch', 'apply', t])
+
if not args.skip_dashboard:
logger.info('Enabling the dashboard module...')
cli(['mgr', 'module', 'enable', 'dashboard'])
'--orphan-initial-daemons',
action='store_true',
help='Do not create initial mon, mgr, and crash service specs')
+ parser_bootstrap.add_argument(
+ '--skip-monitoring-stack',
+ action='store_true',
+ help='Do not automatically provision monitoring stack (prometheus, grafana, alertmanager, node-exporter)')
parser_deploy = subparsers.add_parser(
'deploy', help='deploy a daemon')