使用到的命令:

[root@lgswork ~]# docker search prometheus NAME DESCRIPTION STARS OFFICIAL AUTOMATED prom/prometheus 851 [OK] functions/prometheus prometheus 9 [OK] basi/prometheus-swarm A sample image that can be used as a base fo… 8 [OK] bitnami/prometheus Bitnami Docker Image for Prometheus 8 [OK] infinityworks/prometheus-rancher-exporter Exposes Service/Stack/Host status from the R… 7 [OK] linuxtips/prometheus_alpine Image to run Prometheus on Alpine Linux. #VA… 7 [OK] rycus86/prometheus Prometheus monitoring - prometheus.io 3 [OK] lloesche/prometheus-dcos Prometheus on DC/OS 2 [OK] openshift/prometheus Prometheus images for OpenShift 2 vampouille/prometheus_rancher_metadata Expose rancher metadata 'create_index' field… 1 [OK] alxrem/prometheus-logstash-exporter Prometheus exporter for metrics provided by … 1 [OK] wehkamp/prometheus-cloudflare-exporter Prometheus Cloudflare exporter 1 ibmcom/prometheus Docker Image for IBM Cloud Private-CE (Commu… 1 ansibleplaybookbundle/prometheus-apb An APB that deploys Prometheus 1 [OK] itwye/prometheus_client prometheus client for application create met… 0 [OK] indicatorprotocol/prometheus-indicator-controller Prometheus indicator controller for Kubernet… 0 camptocamp/prometheus-server-rules-conf Docker image for Prometheus recording rules 0 [OK] camptocamp/prometheus-server-conf Image for prometheus-server-conf 0 [OK] mthenw/prometheus-ecs-discovery https://github.com/teralytics/prometheus-ecs… 0 [OK] bzon/prometheus-msteams Prometheus Alerts for Microsoft Teams 0 carlosedp/prometheus Prometheus images for ARM/ARM64 0 solsson/prometheus-exporter-apache https://github.com/prometheus/prometheus/wik… 0 [OK] camptocamp/prometheus-config-merger Merge multiple yaml snippets into one, and r… 0 [OK] camptocamp/prometheus-rancher-metadata-conf rancher-metadata confd prometheus template 0 [OK] braedon/prometheus-es-exporter Elasticsearch query Prometheus exporter 0 [OK] [root@lgswork ~]# docker pull prometheus Using default tag: latest Error response from daemon: pull access denied for prometheus, repository does not exist or may require 'docker login' [root@lgswork ~]# docker pull quay.io/prometheus/prometheus Using default tag: latest latest: Pulling from prometheus/prometheus 8e674ad76dce: Pull complete e77d2419d1c2: Pull complete 404121236cc3: Pull complete 9177a3dd2b55: Pull complete 322a0ba168eb: Pull complete a6d55ecbc9e1: Pull complete bd9aab1d6b43: Pull complete afbd972630e5: Pull complete 1196a163e012: Pull complete Digest: sha256:2ff2d910742194d5e57e555e4b2314620bb8d444ab4a7711a2bfe2b1840092d7 Status: Downloaded newer image for quay.io/prometheus/prometheus:latest [root@lgswork ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE quay.io/prometheus/prometheus latest a3d30ee5b98b 5 days ago 128MB 192.168.21.76:5000/jiang-erauke 0.0.1-SNAPSHOT e99705190391 2 months ago 659MB jdk1.8 latest a09b9868214b 2 months ago 598MB 192.168.21.76:5000/jdk1.8 latest a09b9868214b 2 months ago 598MB zookeeper 3.5 13681ca86f62 2 months ago 225MB gogs/gogs latest 544dcfc7bef8 3 months ago 100MB mysql 5.7 a1aa4f76fab9 4 months ago 373MB mongo latest 5976dac61f4f 4 months ago 411MB docker latest af42f41a7d73 5 months ago 171MB rancher/server latest d4fb2bbe38af 5 months ago 1.09GB centos/mysql-57-centos7 latest e35b3f7a4ea0 6 months ago 452MB foxiswho/rocketmq server-4.3.2 6741b897d310 6 months ago 383MB centos 7 9f38484d220f 6 months ago 202MB
执行命令安装
[root@lgswork ~]# docker run --name prometheus -d -p 9098:9090 quay.io/prometheus/prometheus 4c15a14b686be30fd765693143834b55ab07980a09fb625c335c54258d348b0b [root@lgswork ~]#
Docker 管理 prometheus

[root@lgswork ~]# docker ps | grep prometheus 1cc32417503f quay.io/prometheus/prometheus "/bin/prometheus --c…" About a minute ago Up About a minute 127.0.0.1:9098->9090/tcp prometheus [root@lgswork ~]#
运行 docker start prometheus
启动服务
运行 docker stats prometheus
查看 prometheus 状态
运行 docker stop prometheus
停止服务