zoukankan      html  css  js  c++  java
  • prometheus

    一、安装包下载

    方式一:prometheus官网下载

    方式二:使用wget下载(本文采用方式二)

    $wget https://github.com/prometheus/prometheus/releases/download/v2.18.1/prometheus-2.18.1.linux-amd64.tar.gz

    二、创建运行用户

     $groupadd -r prometheus
     $useradd -r -g prometheus -d / -s /sbin/nologin -c "prometheus user" prometheus

    三、二进制安装

    $tar -xf prometheus-2.10.0.linux-amd64.tar.gz
    $mkdir /etc/prometheus
    $mkdir /var/lib/prometheus
    $cp prometheus-2.10.0.linux-amd64/prometheus /usr/local/bin/
    $cp prometheus-2.10.0.linux-amd64/prometheus.yml /etc/prometheus/
    $chown -R prometheus:prometheus /etc/prometheus
    $chown -R prometheus:prometheus /var/lib/prometheus/

     四、配置服务

    $ vim /etc/systemd/system/prometheus.service
    [Unit]
    Description=prometheus
    After=network.target
    [Service]
    Type=simple
    User=prometheus
    ExecStart=/usr/local/bin/prometheus --config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path=/var/lib/prometheus/data
    Restart=on-failure
    [Install]
    WantedBy=multi-user.target

    启动prometheus服务

    $ systemctl start prometheus

    关闭防火墙

    systemctl stop firewalld
    
    systemctl status firewalld

    五、浏览器访问

    浏览器访问ip+端口  http://localhost:9090 ,如下图所示

  • 相关阅读:
    linux的usr目录的全称是什么
    python多线程与多进程及其区别
    redis禁用危险命令
    测试文档
    mysql5.7.23windows安装
    Nginx如何处理手机端和PC端跳转不同页面
    nginx if多条件判断
    centos7单用户模式修改密码
    Django其四
    Django简单搭建编辑页面
  • 原文地址:https://www.cnblogs.com/lizhewei/p/12980886.html
Copyright © 2011-2022 走看看