User Tools

Site Tools


сервис_prometheus

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
сервис_prometheus [2022/02/23 15:43]
val [prometheus-alertmanager]
сервис_prometheus [2023/06/24 16:10]
val [prometheus-snmp-exporter]
Line 4: Line 4:
   * [[https://​habr.com/​ru/​company/​southbridge/​blog/​455290/​|Полное руководство по Prometheus в 2019 году]]   * [[https://​habr.com/​ru/​company/​southbridge/​blog/​455290/​|Полное руководство по Prometheus в 2019 году]]
   * [[https://​www.shellhacks.com/​ru/​prometheus-delete-time-series-metrics/​|Prometheus:​ Удаление Метрик Временных Рядов]]   * [[https://​www.shellhacks.com/​ru/​prometheus-delete-time-series-metrics/​|Prometheus:​ Удаление Метрик Временных Рядов]]
 +  * [[https://​habr.com/​ru/​companies/​tochka/​articles/​683608/​|Человеческим языком про метрики]]
  
 ===== Установка в Debian/​Ubuntu ===== ===== Установка в Debian/​Ubuntu =====
- 
-  * [[Сервис MTA#​Установка и настройка MTA на обработку почты домена hostname]] 
  
 <​code>​ <​code>​
Line 31: Line 30:
  
   * [[http://​server.corpX.un:​9090/​targets]]   * [[http://​server.corpX.un:​9090/​targets]]
 +  * [[http://​server:​9090/​classic/​targets]]
   * [[http://​192.168.X.10:​9090/​metrics]]   * [[http://​192.168.X.10:​9090/​metrics]]
   * [[http://​10.5.N.100+X:​9090/​graph]]   * [[http://​10.5.N.100+X:​9090/​graph]]
Line 128: Line 128:
 </​code>​ </​code>​
  
-  * [[http://server.corpX.un:​9090/​alerts]]+  * [[http://192.168.X.10:​9090/​alerts]]
 ===== Exporters ===== ===== Exporters =====
  
 ==== prometheus-node-exporter ==== ==== prometheus-node-exporter ====
  
-  * В Debian ставится как зависимость к пакету prometheus и добавлен в конфигурацию+  * В Debian/​Ubuntu ​ставится как зависимость к пакету prometheus и добавлен в конфигурацию
   * [[http://​server.corpX.un:​9100/​metrics]]   * [[http://​server.corpX.un:​9100/​metrics]]
  
Line 150: Line 150:
 == node_network_receive_bytes_total == == node_network_receive_bytes_total ==
 <​code>​ <​code>​
-$ cat /​sys/​class/​net/​eth1/​statistics/​rx_bytes+$ cat /​sys/​class/​net/​eth0/​statistics/​rx_bytes 
 +  или 
 +$ cat /​sys/​class/​net/​bond0/​statistics/​rx_bytes
  
 # TYPE node_network_receive_bytes_total counter # TYPE node_network_receive_bytes_total counter
-node_network_receive_bytes_total{device="​eth1"}+node_network_receive_bytes_total{device="​bond0"}
 </​code>​ </​code>​
  
Line 172: Line 174:
 8*rate(node_network_receive_bytes_total[1m]) 8*rate(node_network_receive_bytes_total[1m])
  
-8*rate(node_network_receive_bytes_total{device="​eth1"​}[1m])+8*rate(node_network_receive_bytes_total{device="​bond0"​}[1m])
  
-8*rate(node_network_receive_bytes_total{device="​eth1",​instance="​localhost:​9100",​job="​node"​}[1m])+8*rate(node_network_receive_bytes_total{device="​eth0",​instance="​localhost:​9100",​job="​node"​}[1m])
 </​code>​ </​code>​
  
Line 308: Line 310:
   - 1.3.6.1.2.1.2.2.1.2   - 1.3.6.1.2.1.2.2.1.2
   metrics:   metrics:
-  - name: if_in_octets+  - name: ifInOctets
     oid: 1.3.6.1.2.1.2.2.1.10     oid: 1.3.6.1.2.1.2.2.1.10
     type: counter     type: counter
Line 320: Line 322:
       oid: 1.3.6.1.2.1.2.2.1.2       oid: 1.3.6.1.2.1.2.2.1.2
       type: DisplayString       type: DisplayString
-  - name: if_out_octets+  - name: ifOutOctets
     oid: 1.3.6.1.2.1.2.2.1.16     oid: 1.3.6.1.2.1.2.2.1.16
     type: counter     type: counter
Line 363: Line 365:
  
 <​code>​ <​code>​
-rate(if_in_octets{ifDescr="​FastEthernet1/​1",​ifIndex="​3",​instance="​router",​job="​snmp"​}[1m])+rate(ifInOctets{ifDescr="​FastEthernet1/​1",​ifIndex="​3",​instance="​router",​job="​snmp"​}[1m]) 
 +  или 
 +rate(ifOutOctets{ifIndex="​5",​instance="​router",​job="​snmp"​}[1m])
  
-8*rate(if_in_octets{ifDescr="​FastEthernet1/​1",​instance="​router"​}[1m])+8*rate(ifInOctets{ifDescr="​FastEthernet1/​1",​instance="​router"​}[1m]) 
 +  или 
 +8*rate(ifOutOctets{ifDescr="​Port-channel1",​instance="​router"​}[1m])
 </​code>​ </​code>​
  
сервис_prometheus.txt · Last modified: 2024/06/18 16:07 by val