Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info
  • https://github.com/prometheus/alertmanager
    Code Block
    sansae@sansaeubuntu:~$ docker run --name alertmanager -d -p 9093:9093 quay.io/prometheus/alertmanager
    Unable to find image 'quay.io/prometheus/alertmanager:latest' locally
    latest: Pulling from prometheus/alertmanager
    0f8c40e1270f: Pull complete
    626a2a3fee8c: Pull complete
    74ad1ee664e6: Pull complete
    addd0e4e1dc5: Pull complete
    012b22e92c79: Pull complete
    518f5393dbbc: Pull complete
    Digest: sha256:24a5204b418e8fa0214cfb628486749003b039c279c56b5bddb5b10cd100d926
    Status: Downloaded newer image for quay.io/prometheus/alertmanager:latest
    8177cb714ac6256558917a0c3b165f526baf591f7e295cc12f295e2ab4ef6598
    sansae@sansaeubuntu:~$
    sansae@sansaeubuntu:~$
    sansae@sansaeubuntu:~$ docker exec -it alertmanager sh
    /alertmanager $ vi /etc/alertmanager/alertmanager.yml
    /alertmanager $ cp /etc/alertmanager/alertmanager.yml /etc/alertmanager/alertmanager.yml.orig
    /alertmanager $
    /alertmanager $ vi /etc/alertmanager/alertmanager.yml
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    global:
      smtp_smarthost: 'localhost:25'
      smtp_from: 'sooabia@gmail.com'
      smtp_auth_username: ''
      smtp_auth_password: ''
    
    templates:
    - '/etc/alertmanager/temlate/*.tmpl'
    
    route:
      repeat_interval: 1h
      receiver: operations-team
    
    receivers:
    - name: 'operations-team'
      email_configs:
      - to: 'sooabia@gmail.com'
      slack_configs:
      - api_url: https://hooks.slack.com/services/XXXXXX/B020ED9QYUD/RvFVPTzArYTXXXXXXXX
        channel: '#alertmanager-demo'
        send_resolved: true
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /alertmanager $ exit
    sansae@sansaeubuntu:~$ docker stop alertmanager
    alertmanager
    sansae@sansaeubuntu:~$ docker start alertmanager
    alertmanager
    sansae@sansaeubuntu:~$
    sansae@sansaeubuntu:~$
    sansae@sansaeubuntu:~$ docker ps
    CONTAINER ID   IMAGE                             COMMAND                  CREATED          STATUS         PORTS
                                  NAMES
    8177cb714ac6   quay.io/prometheus/alertmanager   "/bin/alertmanager -…"   17 minutes ago   Up 3 seconds   0.0.0.0:9093->9093/tcp, :::9093->9093/tcp   alertmanager
    sansae@sansaeubuntu:~$
    sansae@sansaeubuntu:~$ curl ifconfig.me
    20.41.96.191

   

...