SlideShare ist ein Scribd-Unternehmen logo
1 von 22
Downloaden Sie, um offline zu lesen
ConSol Consulting & Solutions Software GmbH
Prometheus
Sohn des Titanen Lapetos
2
ConSol Consulting & Solutions Software GmbH
Prometheus
Timeseries basierter Metriken
Sammler
3
ConSol Consulting & Solutions Software GmbH
Prometheus Timeseries
<metric name> {<label name>=<label value>, …} <
fl
oat64>


4
Audience { conference="OSMC", room=„Jacobi" } 100


Audience { conference="OSMC", room=„Elisabeth" } 50
ConSol Consulting & Solutions Software GmbH
SNMPWALK
5
Text im float64 !?!
IF-MIB::ifIndex.1 = INTEGER: 1


IF-MIB::ifHCInOctets.1 = Counter64: 22012663790


IF-MIB::ifHCOutOctets.1 = Counter64: 40461537447


IF-MIB::ifSpeed.1 = Gauge32: 1000000000
IF-MIB::ifAdminStatus.1 = INTEGER: up(1)


IF-MIB::ifOperStatus.1 = INTEGER: up(1)
IF-MIB::ifName.1 = STRING: Gi0/0


IF-MIB::ifAlias.1 = STRING: OSMC Port


IF-MIB::ifDescr.1 = STRING: GigabitEthernet0/0
ConSol Consulting & Solutions Software GmbH
SNMP Exporter generator
modules:


MyInterfaces:


walk: [sysUpTime, interfaces, ifXTable]


lookups:


- source_indexes: [ifIndex]


lookup: 1.3.6.1.2.1.31.1.1.1.1 # ifName


- source_indexes: [ifIndex]


lookup: 1.3.6.1.2.1.2.2.1.2 # ifAlias


overrides:


ifAdminStatus:


type: EnumAsInfo
6
ConSol Consulting & Solutions Software GmbH
SNMP result mapped to Prometheus
ifHCInOctets{instance=Switch01, ifIndex="1", ifName="Gi0/0", ifAlias="OSMC port"} 22012707668


ifHCOutOctets{instance=Switch01, ifIndex="1", ifName="Gi0/0", ifAlias="OSMC port"} 40461803968


ifSpeed{instance=Switch01, ifIndex="1", ifName="Gi0/0", ifAlias="OSMC port"} 1000000000


ifAdminStatus{instance=Switch01, ifIndex="1", ifName="Gi0/0", ifAlias="OSMC port“, ifAdminStatus="up"} 1


ifOperStatus{instance=Switch01, ifIndex="1", ifName="Gi0/0", ifAlias="OSMC port"} 1
7
ConSol Consulting & Solutions Software GmbH
Problem
Jede Kombination aus OID bzw. MIB verlangt ein eigenes Modul


CISCO-PROCESS-MIB vs. CISCO-OLD-CPU-MIB


L3 Switches ohne Routing


Unterschiedliche UPS / USV Konfigurationen


8
ConSol Consulting & Solutions Software GmbH
Lösung
Einzelnen Module automatisch kombinieren
9
ConSol Consulting & Solutions Software GmbH
Welche Module verwenden ?
10
Kollektor


SNMP Devices


CMDB


Extra DB


( MySql )


SNMP Devices


SNMP Devices


SNMP Devices
ConSol Consulting & Solutions Software GmbH
Kollektor Konfiguration
OIDS = {


'cisco': {


'CISCO-PROCESS-MIB': [


['cpmCPUTotalTable', 'cisco-process-mib'],


['cpmCPUHistory', 'cisco-process-mib'],


],


'OLD-CISCO-CPU-MIB': [


['avgBusy1', 'old-cisco-cpu-mib-avgbusy1'],


],


'CISCO-MEMORY-POOL-MIB': [


['ciscoMemoryPoolTable', 'cisco-memory-pool-mib'],


],


},


}


BETTERTHAN = {


'OLD-CISCO-CPU-MIB': {


'avgBusy1': ['CISCO-PROCESS-MIB', 'cpmCPUTotalTable'],


},


}
11
A Little Longer


Than A


Few Minutes Later
ConSol Consulting & Solutions Software GmbH
Die lokalen inventory / Extra DB
13
Host Type Module OID SNMP MIB Use Last Scann
Switch01 ip switch cisco cisco ws-c3850-48p-s CISCO-PROCESS-MIB cpmCPUTotalTable cisco-process-mib 1
2021-11-03
07:27:33
Switch01 ip switch cisco cisco ws-c3850-48p-s OLD-CISCO-CPU-MIB avgBusy1
old-cisco-cpu-mib-
avgbusy1
0
2021-11-03
07:27:33
Switch01 ip switch cisco cisco ws-c3850-48p-s CISCO-MEMORY-POOL-MIB ciscoMemoryPoolTable cisco-memory-pool-mib 1
2021-11-03
07:27:33
ConSol Consulting & Solutions Software GmbH
Coshsh, gesprochen ʦɔʃ:
Ein Python framework zum Regel
basierten erstellen von Monitoring
Konfigurationen
14
ConSol Consulting & Solutions Software GmbH
Coshsh workflow
15
CMDB


SNMP Devices


Prometheus


Scrape conf


Extra DB


( MySql )


Datasource


Datarecipient


Coshsh
Kollektor


SNMP Exporter


SNMP Exporter


Generator
ConSol Consulting & Solutions Software GmbH
SNMP Exporter Module
modules:


modul_name:


walk:


- < OIDs >


lookups:


- source_indexes: [<OID>]


lookup: <OID>


overrides:


- < Metrik >


16
ConSol Consulting & Solutions Software GmbH
SNMP Exporter Module
Module:


cisco-memory-pool-mib:


walk:


- ciscoMemoryPoolTable


cisco-process-mib:


walk:


- cpmCPUTotalTable


- entPhysicalTable


lookups:


- source_indexes: [cpmCPUTotalPhysicalIndex]


lookup: entPhysicalName
17
ConSol Consulting & Solutions Software GmbH
SNMP Exporter Module
Module:


cisco-memory-pool-mib__cisco-process-mib:


walk:


- ciscoMemoryPoolTable


- cpmCPUTotalTable


- entPhysicalTable


lookups:


- source_indexes: [cpmCPUTotalPhysicalIndex]


lookup: entPhysicalName
18
ConSol Consulting & Solutions Software GmbH
• OMD hat alles was benötigt wird on board


• Coshsh


• MySQL


• prometheus (snmp_exporter bereits gepatched)


• Victoriametrics


• Grafana


• Alles in einer OMD Site !
20
Vielen Dank!
ConSol


Consulting & Solutions Software GmbH


St.-Cajetan-Straße 43


D-81669 München


Tel.: +49-89-45841-100


info@consol.de


www.consol.de


Twitter: @consol_de

Weitere ähnliche Inhalte

Was ist angesagt?

Using Optimizer Hints to Improve MySQL Query Performance
Using Optimizer Hints to Improve MySQL Query PerformanceUsing Optimizer Hints to Improve MySQL Query Performance
Using Optimizer Hints to Improve MySQL Query Performanceoysteing
 
Spectrum Scale Best Practices by Olaf Weiser
Spectrum Scale Best Practices by Olaf WeiserSpectrum Scale Best Practices by Olaf Weiser
Spectrum Scale Best Practices by Olaf WeiserSandeep Patil
 
MySQL InnoDB Cluster - Group Replication
MySQL InnoDB Cluster - Group ReplicationMySQL InnoDB Cluster - Group Replication
MySQL InnoDB Cluster - Group ReplicationFrederic Descamps
 
MySQL InnoDB Cluster - Advanced Configuration & Operations
MySQL InnoDB Cluster - Advanced Configuration & OperationsMySQL InnoDB Cluster - Advanced Configuration & Operations
MySQL InnoDB Cluster - Advanced Configuration & OperationsFrederic Descamps
 
Common Table Expressions (CTE) & Window Functions in MySQL 8.0
Common Table Expressions (CTE) & Window Functions in MySQL 8.0Common Table Expressions (CTE) & Window Functions in MySQL 8.0
Common Table Expressions (CTE) & Window Functions in MySQL 8.0oysteing
 
MySQL Performance Schema in Action
MySQL Performance Schema in ActionMySQL Performance Schema in Action
MySQL Performance Schema in ActionSveta Smirnova
 
Hadoop & Greenplum: Why Do Such a Thing?
Hadoop & Greenplum: Why Do Such a Thing?Hadoop & Greenplum: Why Do Such a Thing?
Hadoop & Greenplum: Why Do Such a Thing?Ed Kohlwey
 
Using the New Apache Flink Kubernetes Operator in a Production Deployment
Using the New Apache Flink Kubernetes Operator in a Production DeploymentUsing the New Apache Flink Kubernetes Operator in a Production Deployment
Using the New Apache Flink Kubernetes Operator in a Production DeploymentFlink Forward
 
UKOUG - 25 years of hints and tips
UKOUG - 25 years of hints and tipsUKOUG - 25 years of hints and tips
UKOUG - 25 years of hints and tipsConnor McDonald
 
Using Queryable State for Fun and Profit
Using Queryable State for Fun and ProfitUsing Queryable State for Fun and Profit
Using Queryable State for Fun and ProfitFlink Forward
 
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricks
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricksQuery Optimization with MySQL 5.7 and MariaDB 10: Even newer tricks
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricksJaime Crespo
 
Client Drivers and Cassandra, the Right Way
Client Drivers and Cassandra, the Right WayClient Drivers and Cassandra, the Right Way
Client Drivers and Cassandra, the Right WayDataStax Academy
 
Oracle Database performance tuning using oratop
Oracle Database performance tuning using oratopOracle Database performance tuning using oratop
Oracle Database performance tuning using oratopSandesh Rao
 
Upgrade from MySQL 5.7 to MySQL 8.0
Upgrade from MySQL 5.7 to MySQL 8.0Upgrade from MySQL 5.7 to MySQL 8.0
Upgrade from MySQL 5.7 to MySQL 8.0Olivier DASINI
 
Cisco Identity Services Engine (ISE)
Cisco Identity Services Engine (ISE)Cisco Identity Services Engine (ISE)
Cisco Identity Services Engine (ISE)Anwesh Dixit
 
How to use histograms to get better performance
How to use histograms to get better performanceHow to use histograms to get better performance
How to use histograms to get better performanceMariaDB plc
 
ClickHouse Unleashed 2020: Our Favorite New Features for Your Analytical Appl...
ClickHouse Unleashed 2020: Our Favorite New Features for Your Analytical Appl...ClickHouse Unleashed 2020: Our Favorite New Features for Your Analytical Appl...
ClickHouse Unleashed 2020: Our Favorite New Features for Your Analytical Appl...Altinity Ltd
 
Reading AWR or Statspack Report - Straight to the Goal
Reading AWR or Statspack Report - Straight to the GoalReading AWR or Statspack Report - Straight to the Goal
Reading AWR or Statspack Report - Straight to the GoalFranck Pachot
 

Was ist angesagt? (20)

Using Optimizer Hints to Improve MySQL Query Performance
Using Optimizer Hints to Improve MySQL Query PerformanceUsing Optimizer Hints to Improve MySQL Query Performance
Using Optimizer Hints to Improve MySQL Query Performance
 
Spectrum Scale Best Practices by Olaf Weiser
Spectrum Scale Best Practices by Olaf WeiserSpectrum Scale Best Practices by Olaf Weiser
Spectrum Scale Best Practices by Olaf Weiser
 
MySQL InnoDB Cluster - Group Replication
MySQL InnoDB Cluster - Group ReplicationMySQL InnoDB Cluster - Group Replication
MySQL InnoDB Cluster - Group Replication
 
MySQL InnoDB Cluster - Advanced Configuration & Operations
MySQL InnoDB Cluster - Advanced Configuration & OperationsMySQL InnoDB Cluster - Advanced Configuration & Operations
MySQL InnoDB Cluster - Advanced Configuration & Operations
 
macvlan and ipvlan
macvlan and ipvlanmacvlan and ipvlan
macvlan and ipvlan
 
MySQL Router REST API
MySQL Router REST APIMySQL Router REST API
MySQL Router REST API
 
Common Table Expressions (CTE) & Window Functions in MySQL 8.0
Common Table Expressions (CTE) & Window Functions in MySQL 8.0Common Table Expressions (CTE) & Window Functions in MySQL 8.0
Common Table Expressions (CTE) & Window Functions in MySQL 8.0
 
MySQL Performance Schema in Action
MySQL Performance Schema in ActionMySQL Performance Schema in Action
MySQL Performance Schema in Action
 
Hadoop & Greenplum: Why Do Such a Thing?
Hadoop & Greenplum: Why Do Such a Thing?Hadoop & Greenplum: Why Do Such a Thing?
Hadoop & Greenplum: Why Do Such a Thing?
 
Using the New Apache Flink Kubernetes Operator in a Production Deployment
Using the New Apache Flink Kubernetes Operator in a Production DeploymentUsing the New Apache Flink Kubernetes Operator in a Production Deployment
Using the New Apache Flink Kubernetes Operator in a Production Deployment
 
UKOUG - 25 years of hints and tips
UKOUG - 25 years of hints and tipsUKOUG - 25 years of hints and tips
UKOUG - 25 years of hints and tips
 
Using Queryable State for Fun and Profit
Using Queryable State for Fun and ProfitUsing Queryable State for Fun and Profit
Using Queryable State for Fun and Profit
 
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricks
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricksQuery Optimization with MySQL 5.7 and MariaDB 10: Even newer tricks
Query Optimization with MySQL 5.7 and MariaDB 10: Even newer tricks
 
Client Drivers and Cassandra, the Right Way
Client Drivers and Cassandra, the Right WayClient Drivers and Cassandra, the Right Way
Client Drivers and Cassandra, the Right Way
 
Oracle Database performance tuning using oratop
Oracle Database performance tuning using oratopOracle Database performance tuning using oratop
Oracle Database performance tuning using oratop
 
Upgrade from MySQL 5.7 to MySQL 8.0
Upgrade from MySQL 5.7 to MySQL 8.0Upgrade from MySQL 5.7 to MySQL 8.0
Upgrade from MySQL 5.7 to MySQL 8.0
 
Cisco Identity Services Engine (ISE)
Cisco Identity Services Engine (ISE)Cisco Identity Services Engine (ISE)
Cisco Identity Services Engine (ISE)
 
How to use histograms to get better performance
How to use histograms to get better performanceHow to use histograms to get better performance
How to use histograms to get better performance
 
ClickHouse Unleashed 2020: Our Favorite New Features for Your Analytical Appl...
ClickHouse Unleashed 2020: Our Favorite New Features for Your Analytical Appl...ClickHouse Unleashed 2020: Our Favorite New Features for Your Analytical Appl...
ClickHouse Unleashed 2020: Our Favorite New Features for Your Analytical Appl...
 
Reading AWR or Statspack Report - Straight to the Goal
Reading AWR or Statspack Report - Straight to the GoalReading AWR or Statspack Report - Straight to the Goal
Reading AWR or Statspack Report - Straight to the Goal
 

Ähnlich wie OSMC 2021 | SNMP Monitoring mit Prometheus / OIDs dynamisch auswählen und im Griff behalten

MySQL Performance Tuning für Oracle-DBA's
MySQL Performance Tuning für Oracle-DBA'sMySQL Performance Tuning für Oracle-DBA's
MySQL Performance Tuning für Oracle-DBA'sFromDual GmbH
 
Tk roadschow-ipmi-pdeneu
Tk roadschow-ipmi-pdeneuTk roadschow-ipmi-pdeneu
Tk roadschow-ipmi-pdeneuWerner Fischer
 
Monitoring von SAP mit check_sap_health
Monitoring von SAP mit check_sap_healthMonitoring von SAP mit check_sap_health
Monitoring von SAP mit check_sap_healthGerhard Lausser
 
Intelligent Edge - breaking the storage hype (Michael Beeck, mibeeck GmbH)
Intelligent Edge - breaking the storage hype (Michael Beeck, mibeeck GmbH)Intelligent Edge - breaking the storage hype (Michael Beeck, mibeeck GmbH)
Intelligent Edge - breaking the storage hype (Michael Beeck, mibeeck GmbH)data://disrupted®
 
Service Mesh mit Istio und MicroProfile - eine harmonische Kombination?
Service Mesh mit Istio und MicroProfile - eine harmonische Kombination?Service Mesh mit Istio und MicroProfile - eine harmonische Kombination?
Service Mesh mit Istio und MicroProfile - eine harmonische Kombination?Michael Hofmann
 
ICDE 2009 - Perm: Processing Provenance and Data on the same Data Model throu...
ICDE 2009 - Perm: Processing Provenance and Data on the same Data Model throu...ICDE 2009 - Perm: Processing Provenance and Data on the same Data Model throu...
ICDE 2009 - Perm: Processing Provenance and Data on the same Data Model throu...Boris Glavic
 
OSMC 2008 | Monitoring von Messaging Systemen mit Nagios by Markus Thiel
OSMC 2008 | Monitoring von Messaging Systemen mit Nagios by Markus ThielOSMC 2008 | Monitoring von Messaging Systemen mit Nagios by Markus Thiel
OSMC 2008 | Monitoring von Messaging Systemen mit Nagios by Markus ThielNETWAYS
 
Bits and Bytes im Flow - Netzwerk im Wandel der Zeit
Bits and Bytes im Flow - Netzwerk im Wandel der ZeitBits and Bytes im Flow - Netzwerk im Wandel der Zeit
Bits and Bytes im Flow - Netzwerk im Wandel der ZeitB1 Systems GmbH
 
Praktische Erfahrungen mit den kleinen SPARC S7-2 Servern
Praktische Erfahrungen mit den kleinen SPARC S7-2 ServernPraktische Erfahrungen mit den kleinen SPARC S7-2 Servern
Praktische Erfahrungen mit den kleinen SPARC S7-2 ServernJomaSoft
 
OSMC 2008 | Nagios & OTRS Integration by Jens Bothe
OSMC 2008 | Nagios & OTRS Integration by Jens BotheOSMC 2008 | Nagios & OTRS Integration by Jens Bothe
OSMC 2008 | Nagios & OTRS Integration by Jens BotheNETWAYS
 
MYSQL in large environments - CeBIT 2012
MYSQL in large environments - CeBIT 2012MYSQL in large environments - CeBIT 2012
MYSQL in large environments - CeBIT 2012NETWAYS
 
digitalSTROM Developer Day 2011: digitalSTROM-Server-Apps
digitalSTROM Developer Day 2011: digitalSTROM-Server-AppsdigitalSTROM Developer Day 2011: digitalSTROM-Server-Apps
digitalSTROM Developer Day 2011: digitalSTROM-Server-AppsdigitalSTROM.org
 
Prometheus Monitoring
Prometheus MonitoringPrometheus Monitoring
Prometheus Monitoringinovex GmbH
 
Back to Basics – Webinar 2: Ihre erste MongoDB-Anwendung
Back to Basics – Webinar 2: Ihre erste MongoDB-AnwendungBack to Basics – Webinar 2: Ihre erste MongoDB-Anwendung
Back to Basics – Webinar 2: Ihre erste MongoDB-AnwendungMongoDB
 
System Center Configuration Manager with Azure, Intune and Application Manage...
System Center Configuration Manager with Azure, Intune and Application Manage...System Center Configuration Manager with Azure, Intune and Application Manage...
System Center Configuration Manager with Azure, Intune and Application Manage...Digicomp Academy AG
 

Ähnlich wie OSMC 2021 | SNMP Monitoring mit Prometheus / OIDs dynamisch auswählen und im Griff behalten (20)

MySQL Performance Tuning für Oracle-DBA's
MySQL Performance Tuning für Oracle-DBA'sMySQL Performance Tuning für Oracle-DBA's
MySQL Performance Tuning für Oracle-DBA's
 
Tk roadschow-ipmi-pdeneu
Tk roadschow-ipmi-pdeneuTk roadschow-ipmi-pdeneu
Tk roadschow-ipmi-pdeneu
 
Monitoring von SAP mit check_sap_health
Monitoring von SAP mit check_sap_healthMonitoring von SAP mit check_sap_health
Monitoring von SAP mit check_sap_health
 
Intelligent Edge - breaking the storage hype (Michael Beeck, mibeeck GmbH)
Intelligent Edge - breaking the storage hype (Michael Beeck, mibeeck GmbH)Intelligent Edge - breaking the storage hype (Michael Beeck, mibeeck GmbH)
Intelligent Edge - breaking the storage hype (Michael Beeck, mibeeck GmbH)
 
Service Mesh mit Istio und MicroProfile - eine harmonische Kombination?
Service Mesh mit Istio und MicroProfile - eine harmonische Kombination?Service Mesh mit Istio und MicroProfile - eine harmonische Kombination?
Service Mesh mit Istio und MicroProfile - eine harmonische Kombination?
 
MongoDB Einführung
MongoDB EinführungMongoDB Einführung
MongoDB Einführung
 
JavaScript Performance
JavaScript PerformanceJavaScript Performance
JavaScript Performance
 
ICDE 2009 - Perm: Processing Provenance and Data on the same Data Model throu...
ICDE 2009 - Perm: Processing Provenance and Data on the same Data Model throu...ICDE 2009 - Perm: Processing Provenance and Data on the same Data Model throu...
ICDE 2009 - Perm: Processing Provenance and Data on the same Data Model throu...
 
OSMC 2008 | Monitoring von Messaging Systemen mit Nagios by Markus Thiel
OSMC 2008 | Monitoring von Messaging Systemen mit Nagios by Markus ThielOSMC 2008 | Monitoring von Messaging Systemen mit Nagios by Markus Thiel
OSMC 2008 | Monitoring von Messaging Systemen mit Nagios by Markus Thiel
 
check_sap_health
check_sap_healthcheck_sap_health
check_sap_health
 
Bits and Bytes im Flow - Netzwerk im Wandel der Zeit
Bits and Bytes im Flow - Netzwerk im Wandel der ZeitBits and Bytes im Flow - Netzwerk im Wandel der Zeit
Bits and Bytes im Flow - Netzwerk im Wandel der Zeit
 
Praktische Erfahrungen mit den kleinen SPARC S7-2 Servern
Praktische Erfahrungen mit den kleinen SPARC S7-2 ServernPraktische Erfahrungen mit den kleinen SPARC S7-2 Servern
Praktische Erfahrungen mit den kleinen SPARC S7-2 Servern
 
NETCONF & YANG
NETCONF & YANGNETCONF & YANG
NETCONF & YANG
 
OSMC 2008 | Nagios & OTRS Integration by Jens Bothe
OSMC 2008 | Nagios & OTRS Integration by Jens BotheOSMC 2008 | Nagios & OTRS Integration by Jens Bothe
OSMC 2008 | Nagios & OTRS Integration by Jens Bothe
 
MYSQL in large environments - CeBIT 2012
MYSQL in large environments - CeBIT 2012MYSQL in large environments - CeBIT 2012
MYSQL in large environments - CeBIT 2012
 
digitalSTROM Developer Day 2011: digitalSTROM-Server-Apps
digitalSTROM Developer Day 2011: digitalSTROM-Server-AppsdigitalSTROM Developer Day 2011: digitalSTROM-Server-Apps
digitalSTROM Developer Day 2011: digitalSTROM-Server-Apps
 
Prometheus Monitoring
Prometheus MonitoringPrometheus Monitoring
Prometheus Monitoring
 
Back to Basics – Webinar 2: Ihre erste MongoDB-Anwendung
Back to Basics – Webinar 2: Ihre erste MongoDB-AnwendungBack to Basics – Webinar 2: Ihre erste MongoDB-Anwendung
Back to Basics – Webinar 2: Ihre erste MongoDB-Anwendung
 
System Center Configuration Manager with Azure, Intune and Application Manage...
System Center Configuration Manager with Azure, Intune and Application Manage...System Center Configuration Manager with Azure, Intune and Application Manage...
System Center Configuration Manager with Azure, Intune and Application Manage...
 
Logging mit log4net
Logging mit log4netLogging mit log4net
Logging mit log4net
 

OSMC 2021 | SNMP Monitoring mit Prometheus / OIDs dynamisch auswählen und im Griff behalten

  • 1.
  • 2. ConSol Consulting & Solutions Software GmbH Prometheus Sohn des Titanen Lapetos 2
  • 3. ConSol Consulting & Solutions Software GmbH Prometheus Timeseries basierter Metriken Sammler 3
  • 4. ConSol Consulting & Solutions Software GmbH Prometheus Timeseries <metric name> {<label name>=<label value>, …} < fl oat64> 4 Audience { conference="OSMC", room=„Jacobi" } 100 Audience { conference="OSMC", room=„Elisabeth" } 50
  • 5. ConSol Consulting & Solutions Software GmbH SNMPWALK 5 Text im float64 !?! IF-MIB::ifIndex.1 = INTEGER: 1 IF-MIB::ifHCInOctets.1 = Counter64: 22012663790 IF-MIB::ifHCOutOctets.1 = Counter64: 40461537447 IF-MIB::ifSpeed.1 = Gauge32: 1000000000 IF-MIB::ifAdminStatus.1 = INTEGER: up(1) IF-MIB::ifOperStatus.1 = INTEGER: up(1) IF-MIB::ifName.1 = STRING: Gi0/0 IF-MIB::ifAlias.1 = STRING: OSMC Port IF-MIB::ifDescr.1 = STRING: GigabitEthernet0/0
  • 6. ConSol Consulting & Solutions Software GmbH SNMP Exporter generator modules: MyInterfaces: walk: [sysUpTime, interfaces, ifXTable] lookups: - source_indexes: [ifIndex] lookup: 1.3.6.1.2.1.31.1.1.1.1 # ifName - source_indexes: [ifIndex] lookup: 1.3.6.1.2.1.2.2.1.2 # ifAlias overrides: ifAdminStatus: type: EnumAsInfo 6
  • 7. ConSol Consulting & Solutions Software GmbH SNMP result mapped to Prometheus ifHCInOctets{instance=Switch01, ifIndex="1", ifName="Gi0/0", ifAlias="OSMC port"} 22012707668 ifHCOutOctets{instance=Switch01, ifIndex="1", ifName="Gi0/0", ifAlias="OSMC port"} 40461803968 ifSpeed{instance=Switch01, ifIndex="1", ifName="Gi0/0", ifAlias="OSMC port"} 1000000000 ifAdminStatus{instance=Switch01, ifIndex="1", ifName="Gi0/0", ifAlias="OSMC port“, ifAdminStatus="up"} 1 ifOperStatus{instance=Switch01, ifIndex="1", ifName="Gi0/0", ifAlias="OSMC port"} 1 7
  • 8. ConSol Consulting & Solutions Software GmbH Problem Jede Kombination aus OID bzw. MIB verlangt ein eigenes Modul CISCO-PROCESS-MIB vs. CISCO-OLD-CPU-MIB L3 Switches ohne Routing Unterschiedliche UPS / USV Konfigurationen 8
  • 9. ConSol Consulting & Solutions Software GmbH Lösung Einzelnen Module automatisch kombinieren 9
  • 10. ConSol Consulting & Solutions Software GmbH Welche Module verwenden ? 10 Kollektor SNMP Devices CMDB Extra DB 
 ( MySql ) SNMP Devices SNMP Devices SNMP Devices
  • 11. ConSol Consulting & Solutions Software GmbH Kollektor Konfiguration OIDS = { 'cisco': { 'CISCO-PROCESS-MIB': [ ['cpmCPUTotalTable', 'cisco-process-mib'], ['cpmCPUHistory', 'cisco-process-mib'], ], 'OLD-CISCO-CPU-MIB': [ ['avgBusy1', 'old-cisco-cpu-mib-avgbusy1'], ], 'CISCO-MEMORY-POOL-MIB': [ ['ciscoMemoryPoolTable', 'cisco-memory-pool-mib'], ], }, } BETTERTHAN = { 'OLD-CISCO-CPU-MIB': { 'avgBusy1': ['CISCO-PROCESS-MIB', 'cpmCPUTotalTable'], }, } 11
  • 12. A Little Longer Than A Few Minutes Later
  • 13. ConSol Consulting & Solutions Software GmbH Die lokalen inventory / Extra DB 13 Host Type Module OID SNMP MIB Use Last Scann Switch01 ip switch cisco cisco ws-c3850-48p-s CISCO-PROCESS-MIB cpmCPUTotalTable cisco-process-mib 1 2021-11-03 07:27:33 Switch01 ip switch cisco cisco ws-c3850-48p-s OLD-CISCO-CPU-MIB avgBusy1 old-cisco-cpu-mib- avgbusy1 0 2021-11-03 07:27:33 Switch01 ip switch cisco cisco ws-c3850-48p-s CISCO-MEMORY-POOL-MIB ciscoMemoryPoolTable cisco-memory-pool-mib 1 2021-11-03 07:27:33
  • 14. ConSol Consulting & Solutions Software GmbH Coshsh, gesprochen ʦɔʃ: Ein Python framework zum Regel basierten erstellen von Monitoring Konfigurationen 14
  • 15. ConSol Consulting & Solutions Software GmbH Coshsh workflow 15 CMDB SNMP Devices Prometheus 
 Scrape conf Extra DB 
 ( MySql ) Datasource Datarecipient Coshsh Kollektor SNMP Exporter SNMP Exporter Generator
  • 16. ConSol Consulting & Solutions Software GmbH SNMP Exporter Module modules: modul_name: walk: - < OIDs > lookups: - source_indexes: [<OID>] lookup: <OID> overrides: - < Metrik > 16
  • 17. ConSol Consulting & Solutions Software GmbH SNMP Exporter Module Module: cisco-memory-pool-mib: walk: - ciscoMemoryPoolTable cisco-process-mib: walk: - cpmCPUTotalTable - entPhysicalTable lookups: - source_indexes: [cpmCPUTotalPhysicalIndex] lookup: entPhysicalName 17
  • 18. ConSol Consulting & Solutions Software GmbH SNMP Exporter Module Module: cisco-memory-pool-mib__cisco-process-mib: walk: - ciscoMemoryPoolTable - cpmCPUTotalTable - entPhysicalTable lookups: - source_indexes: [cpmCPUTotalPhysicalIndex] lookup: entPhysicalName 18
  • 19.
  • 20. ConSol Consulting & Solutions Software GmbH • OMD hat alles was benötigt wird on board • Coshsh • MySQL • prometheus (snmp_exporter bereits gepatched) • Victoriametrics • Grafana • Alles in einer OMD Site ! 20
  • 22. ConSol Consulting & Solutions Software GmbH St.-Cajetan-Straße 43 D-81669 München Tel.: +49-89-45841-100 info@consol.de www.consol.de Twitter: @consol_de