SlideShare ist ein Scribd-Unternehmen logo
Netzwerkmonitoring mit Prometheus
Matthias,	Gallinger	
01.09.2018
Netzwerkmonitoring	mit	Prometheus
Um was gehts
• International	tätiger	Schweizer	Technologiekonzern	
• >	200	Standorte	auf	allen	Kontinenten	
• Ca.	300	Netzwerkgeräte	im	detaillierten	Monitoring	
• Konfiguration	per	coshsh	aus	CMDB	
• “ad	hoc“	Perfdaten	per	Mausklick
2
Netzwerkmonitoring	mit	Prometheus
Die Aufgabe
3
Netzwerkmonitoring	mit	Prometheus 4
Der Werkzeugkasten
OMD	-	Open	Monitoring	Distribution
Prometheus	&	SNMP-Exporter	
Grafana	für	die	Dashboards
Integration	in	Thruk	web	UI
Netzwerkmonitoring	mit	Prometheus 5
Prometheus
• In	“go“	geschrieben	
• Timeseries	Database	im	Backend	
• Nur	!!	64bit	floats	
• HTTP	Pull	System	
• Datasource	für	Grafana
Netzwerkmonitoring	mit	Prometheus 6
Prometheus
ifHCInOctets	{		
	 	 hostname="ALMA12",	
	 	 ifDescr="FastEthernet0/20",	
	 	 job="snmp",	
	 	 mib=„if_mib_ifdescr"	}	 20414123150
ifHCInOctets	{		 job=“snmp“	}	 	 20414123150
Metricname	 Label	 	 																Value
Netzwerkmonitoring	mit	Prometheus 7
OMD System
Prometheus Exporter
Prometheus scraper
Ziel System / Application
Node-Exporter

HTTP://10.0.0.1:9100/metrics
PULL
Netzwerkmonitoring	mit	Prometheus 8
Prometheus Node-Exporter
#	HELP	node_load1	1m	load	average.	
#	TYPE	node_load1	gauge	
node_load1					0.2	
#	HELP	node_memory_MemAvailable_bytes	Memory	information.	
#	TYPE	node_memory_MemAvailable_bytes	gauge	
node_memory_MemAvailable_bytes					1.840771072e+09	
#	HELP	node_boot_time_seconds	Node	boot	time,	in	unixtime.	
#	TYPE	node_boot_time_seconds	gauge	
node_boot_time_seconds					1.535941754e+09	
#	HELP	node_exporter_build_info	A	metric	with	a	constant	'1'	value	labeled	by	version,	revision,	branch,	and	
goversion	from	which	node_exporter	was	built.	
#	TYPE	node_exporter_build_info	gauge	
node_exporter_build_info{branch="HEAD",goversion="go1.9.6",revision="d42cb7fc31ea7e4f",version="0.16.0"}	1
Netzwerkmonitoring	mit	Prometheus 9
Prometheus SNMP-Exporter
Prometheus 

scraper
Network device

172.28.0.1
SNMP-Exporter

http://127.0.0.1:9116/snmp?target=172.28.0.1&
module=if_mib_name
HTTP
SN
M
P
Netzwerkmonitoring	mit	Prometheus 10
Prometheus SNMP-Exporter
#	HELP	ifAdminStatus	The	desired	state	of	the	interface	-	1.3.6.1.2.1.2.2.1.7	
#	TYPE	ifAdminStatus	gauge	
ifAdminStatus{ifIndex="16891904"}	1	
#	HELP	....	
#	TYPE	ifAlias	gauge	
ifAlias{ifAlias="ISL_UZA118_2",ifIndex="16891904"}	1	
ifConnectorPresent{ifIndex="16891904"}	2	
ifDescr{ifDescr="fc1/29",ifIndex="16891904"}	1	
ifHCInOctets{ifIndex="16891904"}	216	
ifIndex{ifIndex="16891904"}	1.6891904e+07	
ifName{ifIndex="16891904",ifName="fc1/29"}	1	
ifOperStatus{ifIndex="16891904"}	2	
ifPhysAddress{ifIndex="16891904",ifPhysAddress="20:1D:54:7F:EE:CB"}	1	
ifSpeed{ifIndex="16891904"}	0
Netzwerkmonitoring	mit	Prometheus 11
SNMP-Exporter Konfiguration
Module_name:	
		version:	3		
		auth:	
				username:	SomeUser	
				password:	TotallySecret	
				auth_protocol:	SHA	
				priv_protocol:	AES	
				security_level:	SomethingReadOnly	
				priv_password:	SomeOtherSecret	
		walk:		
				-	...	
		metrics:		
				-	...
Module_name:	
		version:	2	
		auth:	
				community:	Top5ecret	
		walk:		
				-	...	
		metrics:		
				-	...
Netzwerkmonitoring	mit	Prometheus 12
SNMP-Exporter Konfiguration
module_if_mib:	
		version:	2	
		walk:	
			-	1.3.6.1.2.1.31.1.1	
		metrics:	
			-	name:	ifHCInOctets	
					oid:	1.3.6.1.2.1.31.1.1.1.6	
					type:	counter	
					help:	The	total	number	of	octets	received	on	the	interface	
					indexes:	
					-	labelname:	ifName	
							type:	gauge	
					lookups:	
					-	labels:	
							-	ifName	
							labelname:			
							oid:	1.3.6.1.2.1.31.1.1.1.1	
							type:	DisplayString
Netzwerkmonitoring	mit	Prometheus 13
SNMP-Exporter Patch
Netzwerkmonitoring	mit	Prometheus 14
SNMP Exporter - Generator
#	generator.yml	
modules:	
		if_mib_ifname:	
				walk:		
						-	sysUpTime	
						-	interfaces	
						-	1.3.6.1.2.1.31.1.1	
			lookups:	
						-	old_index:	ifIndex	
								new_index:	1.3.6.1.2.1.31.1.1.1.1	#	ifName
Netzwerkmonitoring	mit	Prometheus 15
SNMP MIB als Basis
ifHCInOctets	OBJECT-TYPE	
				SYNTAX						Counter64	
				MAX-ACCESS		read-only	
				STATUS						current	
				DESCRIPTION	
												"The	total	number	of	octets	received	on	the	interface,	
												including	framing	characters.		This	object	is	a	64-bit	
												version	of	ifInOctets.“	
				::=	{	ifXEntry	6	}
Netzwerkmonitoring	mit	Prometheus 16
SNMP MIB als Basis
-	name:	ifHCInOctets	
				oid:	1.3.6.1.2.1.31.1.1.1.6	
				type:	counter	
				help:	The	total	number	of	octets	received	on	the	interface,	including	framing	
								characters	-	1.3.6.1.2.1.31.1.1.1.6	
				indexes:	
				-	labelname:	ifName	
								type:	gauge	
				lookups:	
				-	labels:	
								-	ifName	
								labelname:	ifName	
								oid:	1.3.6.1.2.1.31.1.1.1.1	
								type:	DisplayString
Netzwerkmonitoring	mit	Prometheus 17
SNMP Exporter - Generator
#	Fortinet	
		Fortigate:	
				version:	2	
				walk:	
						-	sysUpTime	
						-	interfaces	
						-	ifXTable	
						-	1.3.6.1.4.1.12356.101.4	#	fortinet.fnFortiGateMib.fgSystem	
						-	1.3.6.1.4.1.12356.101.11.2.2.1.1	#	fgIntSessNumber	
						-	1.3.6.1.4.1.12356.101.12.1	#	fortinet.fnFortiGateMib.fgVpn.fgVpnInfo	/	fgVpnTunnelUpCount	
						-	1.3.6.1.4.1.12356.101.13.2.1.1.1	#	fortinet.fnFortiGateMib.fgHighAvailability	fgHaStatsIndex	
						-	1.3.6.1.4.1.12356.101.13.2.1.1.2	#	fortinet.fnFortiGateMib.fgHighAvailability	fgHaStatsSerial	
						-	1.3.6.1.4.1.12356.101.13.2.1.1.11	#	fortinet.fnFortiGateMib.fgHighAvailability	fgHaStatsHostname	
						-	1.3.6.1.4.1.12356.101.13.2.1.1.12	#	fortinet.fnFortiGateMib.fgHighAvailability	fgHaStatsSyncStatus	
						-	1.3.6.1.4.1.12356.101.13.2.1.1.16	#	fortinet.fnFortiGateMib.fgHighAvailability	fgHaStatsMasterSerial	
				lookups:	
						-	old_index:	ifIndex	
								new_index:	ifName
Netzwerkmonitoring	mit	Prometheus 18
SNMP Exporter - Generator
#	Cicso	Wireless	LAN	Controller	
		cisco_wlc:	
				walk:	
						-	interfaces	
						-	ifXTable	
						-	1.3.6.1.4.1.14179.2.1.1.1.38			#	bsnDot11EssNumberofMobileStations	
						-	1.3.6.1.4.1.14179.2.2.2.1.2				#	bsnAPIfType	
						-	1.3.6.1.4.1.14179.2.2.2.1.4				#	bsnAPIfPhyChannelNumber	
						-	1.3.6.1.4.1.14179.2.2.2.1.15			#	bsnApIfNoOfUsers	
						-	1.3.6.1.4.1.14179.2.2.6.1						#	bsnAPIfDot11CountersTable	
						-	1.3.6.1.4.1.14179.2.2.13.1.3			#	bsnAPIfLoadChannelUtilization	
						-	1.3.6.1.4.1.14179.2.2.15.1.21		#	bsnAPIfDBNoisePower	
				lookups:	
						-	old_index:	bsnDot11EssIndex	
								new_index:	bsnDot11EssSsid	
						-	old_index:	bsnAPDot3MacAddress	
								new_index:	bsnAPName
Netzwerkmonitoring	mit	Prometheus 19
Prometheus SNMP-Exporter
Prometheus 

scraper
Network device
HTTP
SN
M
P
SNMP-Exporter

http://127.0.0.1:9116/snmp?target=172.28.0.1&
module=cisco_wlc
Netzwerkmonitoring	mit	Prometheus 20
Prometheus Konfiguration
#	SNMP	Exporter.yml	
-	job_name:	'snmp'	
				#	Override	the	global	default	
				scrape_interval:	120s	
				scrape_timeout:	90s	
				file_sd_configs:	
						-	files:	
								-	'/omd/sites/prod/etc/.../targets/*.json'	
								-	'/omd/sites/prod/etc/.../custom/*.json'
metrics_path:	/snmp	
				params:	
						module:	[if_mib_ifname]	
						community:	[public]	
				relabel_configs:	
						-	source_labels:	[mib]	
								target_label:	__param_module	
						-	source_labels:	[__address__]	
								target_label:	__param_target	
						-	source_labels:	[hostname]	
								target_label:	instance	
						-	target_label:	__address__	
								replacement:	127.0.0.1:9216
Netzwerkmonitoring	mit	Prometheus 21
Prometheus Target
[	
{	
				"targets":	[	"10.296.32.12"	],	
				"labels":	{	
						"hostname":	"ALMA12",	
						"snmpCommunity":	“Top5ecret",	
						"mib":	"if_mib_ifdescr",	
						"ondemand":	„true“	
}	
}	
]
Netzwerkmonitoring	mit	Prometheus 22
OMD Konfiguration
Netzwerkmonitoring	mit	Prometheus 23
Prometheus UI
Netzwerkmonitoring	mit	Prometheus
Prometheus UI
24
Netzwerkmonitoring	mit	Prometheus 25
Grafana Dashboard
Netzwerkmonitoring	mit	Prometheus 26
Grafana – Templating / Variables
Netzwerkmonitoring	mit	Prometheus 27
Grafana URLs
https://omd.local/site/grafana/d/dash00001/fortigate?orgId=1&var-host=ALMA01
Dashboard UID
Dashboard Name
Variable
Netzwerkmonitoring	mit	Prometheus 28
Grafana - URL
Netzwerkmonitoring	mit	Prometheus 29
Thruk Action Menus
• Zuweisung	über	Customvariable	„_THRUK_ACTION_MENU“	
• Customvariable	kann	während	der	Laufzeit	geändert	werden	
• Zuweisung	erfolgt	über	coshsh	aus	CMDB	
• Kann	Scripte	in	OMD	Site	ausführen
Netzwerkmonitoring	mit	Prometheus 30
Thruk Action Menus - MTR
Netzwerkmonitoring	mit	Prometheus 31
Thruk – Action Menu
Aus is !
ConSol	
Consulting & Solutions Software GmbH
Franziskanerstr. 38
D-81669 München
Tel.: +49-89-45841-100
info@consol.de
www.consol.de
Twitter: @consol_de

Weitere ähnliche Inhalte

Ähnlich wie OSMC 2018 | Netzwerkmonitoring mit Prometheus by Matthias Gallinger

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
 
Oracle connection manager_cman_doag_sig_security_mai_2015
Oracle connection manager_cman_doag_sig_security_mai_2015Oracle connection manager_cman_doag_sig_security_mai_2015
Oracle connection manager_cman_doag_sig_security_mai_2015
Gunther Pippèrr
 
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
NETWAYS
 
Citrix Day 2013: Citirx Networking
Citrix Day 2013: Citirx NetworkingCitrix Day 2013: Citirx Networking
Citrix Day 2013: Citirx Networking
Digicomp Academy AG
 
Cloud Observability mit Loki, Prometheus, Tempo und Grafana
Cloud Observability mit Loki, Prometheus, Tempo und GrafanaCloud Observability mit Loki, Prometheus, Tempo und Grafana
Cloud Observability mit Loki, Prometheus, Tempo und Grafana
QAware GmbH
 
Netzwerkmonitoring.pdf
Netzwerkmonitoring.pdfNetzwerkmonitoring.pdf
Netzwerkmonitoring.pdf
Westermo Network Technologies
 
Learnings aus einem Magento-Enterprise-Projekt
Learnings aus einem Magento-Enterprise-ProjektLearnings aus einem Magento-Enterprise-Projekt
Learnings aus einem Magento-Enterprise-Projekt
LIMESODA Interactive Marketing GmbH
 
Avoid Network-Issues and Polling
Avoid Network-Issues and PollingAvoid Network-Issues and Polling
Avoid Network-Issues and Polling
Kai Donato
 
Pub/Sub for the masses- Ein Einführungsworkshop in MQTT [GERMAN]
Pub/Sub for the masses- Ein Einführungsworkshop in MQTT [GERMAN]Pub/Sub for the masses- Ein Einführungsworkshop in MQTT [GERMAN]
Pub/Sub for the masses- Ein Einführungsworkshop in MQTT [GERMAN]
Dominik Obermaier
 
Pink Monitoring oder wie Prometheus Licht ins Dunkel der Container bringt 
Pink Monitoring oder wie Prometheus Licht ins Dunkel der Container bringt Pink Monitoring oder wie Prometheus Licht ins Dunkel der Container bringt 
Pink Monitoring oder wie Prometheus Licht ins Dunkel der Container bringt 
Klaus Bild
 
Echtzeitvisualisierung von Twitter und Co.
Echtzeitvisualisierung von Twitter und Co.Echtzeitvisualisierung von Twitter und Co.
Echtzeitvisualisierung von Twitter und Co.
Kai Donato
 
Echtzeitvisualisierung von Twitter & Co
Echtzeitvisualisierung von Twitter & CoEchtzeitvisualisierung von Twitter & Co
Echtzeitvisualisierung von Twitter & Co
Oliver Lemm
 
Port Security - Industrieller Cyber Security
Port Security - Industrieller Cyber SecurityPort Security - Industrieller Cyber Security
Port Security - Industrieller Cyber Security
Westermo Network Technologies
 
Grundlagen puppet
Grundlagen puppetGrundlagen puppet
Grundlagen puppetinovex GmbH
 
DACHNUG50 CNX3 Monitoring.pdf
DACHNUG50 CNX3 Monitoring.pdfDACHNUG50 CNX3 Monitoring.pdf
DACHNUG50 CNX3 Monitoring.pdf
DNUG e.V.
 
WebSocket my APEX!
WebSocket my APEX!WebSocket my APEX!
WebSocket my APEX!
Kai Donato
 
Qualitätssicherung für APEX Anwendungen.pdf
Qualitätssicherung für APEX Anwendungen.pdfQualitätssicherung für APEX Anwendungen.pdf
Qualitätssicherung für APEX Anwendungen.pdf
Oliver Lemm
 
TYPO3 Monitoring mit t3monitoring
TYPO3 Monitoring mit t3monitoringTYPO3 Monitoring mit t3monitoring
TYPO3 Monitoring mit t3monitoring
Peter Kraume
 
stackconf 2020 | SecDevOps in der Cloud by Florian Wiethoff
stackconf 2020 | SecDevOps in der Cloud by Florian Wiethoffstackconf 2020 | SecDevOps in der Cloud by Florian Wiethoff
stackconf 2020 | SecDevOps in der Cloud by Florian Wiethoff
NETWAYS
 
Monitoring Openstack - LinuxTag 2013
Monitoring Openstack - LinuxTag 2013Monitoring Openstack - LinuxTag 2013
Monitoring Openstack - LinuxTag 2013
NETWAYS
 

Ähnlich wie OSMC 2018 | Netzwerkmonitoring mit Prometheus by Matthias Gallinger (20)

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...
 
Oracle connection manager_cman_doag_sig_security_mai_2015
Oracle connection manager_cman_doag_sig_security_mai_2015Oracle connection manager_cman_doag_sig_security_mai_2015
Oracle connection manager_cman_doag_sig_security_mai_2015
 
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
 
Citrix Day 2013: Citirx Networking
Citrix Day 2013: Citirx NetworkingCitrix Day 2013: Citirx Networking
Citrix Day 2013: Citirx Networking
 
Cloud Observability mit Loki, Prometheus, Tempo und Grafana
Cloud Observability mit Loki, Prometheus, Tempo und GrafanaCloud Observability mit Loki, Prometheus, Tempo und Grafana
Cloud Observability mit Loki, Prometheus, Tempo und Grafana
 
Netzwerkmonitoring.pdf
Netzwerkmonitoring.pdfNetzwerkmonitoring.pdf
Netzwerkmonitoring.pdf
 
Learnings aus einem Magento-Enterprise-Projekt
Learnings aus einem Magento-Enterprise-ProjektLearnings aus einem Magento-Enterprise-Projekt
Learnings aus einem Magento-Enterprise-Projekt
 
Avoid Network-Issues and Polling
Avoid Network-Issues and PollingAvoid Network-Issues and Polling
Avoid Network-Issues and Polling
 
Pub/Sub for the masses- Ein Einführungsworkshop in MQTT [GERMAN]
Pub/Sub for the masses- Ein Einführungsworkshop in MQTT [GERMAN]Pub/Sub for the masses- Ein Einführungsworkshop in MQTT [GERMAN]
Pub/Sub for the masses- Ein Einführungsworkshop in MQTT [GERMAN]
 
Pink Monitoring oder wie Prometheus Licht ins Dunkel der Container bringt 
Pink Monitoring oder wie Prometheus Licht ins Dunkel der Container bringt Pink Monitoring oder wie Prometheus Licht ins Dunkel der Container bringt 
Pink Monitoring oder wie Prometheus Licht ins Dunkel der Container bringt 
 
Echtzeitvisualisierung von Twitter und Co.
Echtzeitvisualisierung von Twitter und Co.Echtzeitvisualisierung von Twitter und Co.
Echtzeitvisualisierung von Twitter und Co.
 
Echtzeitvisualisierung von Twitter & Co
Echtzeitvisualisierung von Twitter & CoEchtzeitvisualisierung von Twitter & Co
Echtzeitvisualisierung von Twitter & Co
 
Port Security - Industrieller Cyber Security
Port Security - Industrieller Cyber SecurityPort Security - Industrieller Cyber Security
Port Security - Industrieller Cyber Security
 
Grundlagen puppet
Grundlagen puppetGrundlagen puppet
Grundlagen puppet
 
DACHNUG50 CNX3 Monitoring.pdf
DACHNUG50 CNX3 Monitoring.pdfDACHNUG50 CNX3 Monitoring.pdf
DACHNUG50 CNX3 Monitoring.pdf
 
WebSocket my APEX!
WebSocket my APEX!WebSocket my APEX!
WebSocket my APEX!
 
Qualitätssicherung für APEX Anwendungen.pdf
Qualitätssicherung für APEX Anwendungen.pdfQualitätssicherung für APEX Anwendungen.pdf
Qualitätssicherung für APEX Anwendungen.pdf
 
TYPO3 Monitoring mit t3monitoring
TYPO3 Monitoring mit t3monitoringTYPO3 Monitoring mit t3monitoring
TYPO3 Monitoring mit t3monitoring
 
stackconf 2020 | SecDevOps in der Cloud by Florian Wiethoff
stackconf 2020 | SecDevOps in der Cloud by Florian Wiethoffstackconf 2020 | SecDevOps in der Cloud by Florian Wiethoff
stackconf 2020 | SecDevOps in der Cloud by Florian Wiethoff
 
Monitoring Openstack - LinuxTag 2013
Monitoring Openstack - LinuxTag 2013Monitoring Openstack - LinuxTag 2013
Monitoring Openstack - LinuxTag 2013
 

OSMC 2018 | Netzwerkmonitoring mit Prometheus by Matthias Gallinger