Install prometheus on centos7/rhel7

  1. Download prometheus monitoring tool. Latest downloads can be found at https://prometheus.io/download/

    curl -LO “https://github.com/prometheus/prometheus/releases/download/v1.7.1/prometheus-1.7.1.linux-amd64.tar.gz”

  2.  Untar the  file and move it to installation folder

    tar -xzvf prometheus-1.7.1.linux-amd64.tar.gz

  3. Move it to installation folder , here I am moving it to /var/lib

    mv prometheus-1.7.1.linux-amd64 /var/lib/prometheus

  4.  Edit the prometheus.yml file and update the scrape config– job_name: ‘server_monitoring’   scrape_interval: 15s   metrics_path: “/metrics”   static_configs:

        – targets:

            – server1:9100

            – server2:9100

            – server3:9100

          labels:

            service: servers_usage

       relabel_configs:

       – source_labels: [__address__]

         regex: ‘(.*)\:9108’

         target_label:  ‘instance’

         replacement:   ‘$1’

  5.  Add the start script in /etc/systemd/system/prometheus.service
    # echo “[Unit]
    Description=Prometheus Server
    Documentation=https://prometheus.io/docs/introduction/overview/
    After=network-online.target[Service]
    User=root
    Restart=on-failure
    ExecStart=/var/lib/prometheus/prometheus -config.file=/var/lib/prometheus/prometheus.yml -storage.local.path=/var/lib/prometheus/data[Install]
    WantedBy=multi-user.target”
  6. Start the prometheus service

    systemctl start prometheus

  7. Prometheus can now be accessible from http://<ip-address:9090

 

14 thoughts on “Install prometheus on centos7/rhel7”

  1. Howdy are using WordPress for your site platform?

    I’m new to the blog world but I’m trying to get started and create my
    own. Do you need any coding knowledge to make your own blog?
    Any help would be really appreciated!

  2. Hi there, just became aware of your blog through Google, and found that
    it is truly informative. I am gonna watch out for brussels.
    I’ll appreciate if you continue this in future. A lot of
    people will be benefited from your writing.
    Cheers!

  3. With havin so much content do you ever run into any
    problems of plagorism or copyright infringement? My site
    has a lot of completely unique content I’ve either authored
    myself or outsourced but it appears a lot of it
    is popping it up all over the web without my agreement.

    Do you know any techniques to help protect against content from
    being ripped off? I’d really appreciate it.

  4. Hello! I know this is kinda off topic however , I’d figured I’d ask.
    Would you be interested in trading links or maybe guest
    writing a blog post or vice-versa? My website discusses a lot of the same
    topics as yours and I feel we could greatly benefit from each other.
    If you happen to be interested feel free to send me an email.

    I look forward to hearing from you! Wonderful blog by the way!

  5. ZFN Liker, Photo Auto Liker, Auto Liker, auto liker, auto like, Status Auto Liker, Auto Like, Autolike, Autolike International, Increase Likes, Autoliker, autoliker, Status Liker, autolike, Working Auto Liker, Photo Liker, Autoliker

  6. hey there and thank you for your information – I’ve
    certainly picked up something new from right here. I did however expertise a few technical issues using this website, since I experienced to reload
    the web site a lot of times previous to I could get it to
    load correctly. I had been wondering if your web hosting is OK?
    Not that I am complaining, but slow loading instances times will very frequently affect your placement in google and can damage your quality
    score if advertising and marketing with Adwords. Anyway I am adding this RSS to my email and can look
    out for a lot more of your respective interesting content.
    Make sure you update this again very soon.

Leave a Reply to 5000 원 꽁 머니 Cancel reply

Your email address will not be published. Required fields are marked *