{"id":765,"date":"2025-09-02T15:43:53","date_gmt":"2025-09-02T13:43:53","guid":{"rendered":"https:\/\/whoami.lausitz-event.info\/?p=765"},"modified":"2025-09-02T15:54:52","modified_gmt":"2025-09-02T13:54:52","slug":"vpn-tunnel-monitoring-fortinet-fortigate","status":"publish","type":"post","link":"https:\/\/whoami.lausitz-event.info\/?p=765","title":{"rendered":"VPN Tunnel Monitoring Fortinet FortiGate"},"content":{"rendered":"\n\n<p>Du m\u00f6chtest einen spezifischen Tunnel auf der FortiGate \u00fcberwachen und wei\u00dft nicht wie. Diverse Icinga2 Plugins bieten dir lediglich die Funktion alle Tunnel zu \u00fcberwachen. Das ist leider nicht immer zielf\u00fchrend. Wir verwenden f\u00fcr die \u00dcberwachung das SNMP Plugin <em>check_snmp<\/em>.<\/p>\n\n\n\n\n\n<p>Als Erstes ziehst du dir von deiner Fortigate das MIB File. Das findest du unter System -> SNMP. Dieses speicherst du unter \/usr\/share\/snmp\/mibs\/ ab. Um an die entsprechenden OID's der Tunnel zu kommen, musst du ein wenig mit <em>snmpwalk<\/em> spielen. Dazu machst du als erstes ein snmwalk auf die konfigurierten Namen in Phase 2. Der Parameter -On gibt dir die realen OID's aus.<\/p>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code>snmpwalk -v2c -c public X.X.X.X FORTINET-FORTIGATE-MIB::fgVpnTunEntPhase2Name -On<\/code><\/pre>\n\n\n\n\n\n<p>Du erh\u00e4lst dann in etwa so eine Liste:<\/p>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code>.1.3.6.1.4.1.12356.101.12.2.2.1.3.1.1 = STRING: Kunde1-Tunnel1\n.1.3.6.1.4.1.12356.101.12.2.2.1.3.1.2 = STRING: Kunde1-Tunnel2\n.1.3.6.1.4.1.12356.101.12.2.2.1.3.1.3 = STRING: Kunde1-Tunnel3\n.1.3.6.1.4.1.12356.101.12.2.2.1.3.2.1 = STRING: Kunde2-Tunnel1\n.1.3.6.1.4.1.12356.101.12.2.2.1.3.2.2 = STRING: Kunde2-Tunnel1\nund so weiter <\/code><\/pre>\n\n\n\n\n\n<p>Nun hast du schon einmal die ID's zu den Tunneln. Jetzt ein weiterer snmpwalk f\u00fcr den Tunnel Status.<\/p>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code>snmpwalk -v2c -c public X.X.X.X FORTINET-FORTIGATE-MIB::fgVpnTunEntStatus<\/code><\/pre>\n\n\n\n\n\n<p>Dann bekommst du folgende Ausgabe:<\/p>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code>.1.3.6.1.4.1.12356.101.12.2.2.1.20.1.1 = INTEGER: up(2)\n.1.3.6.1.4.1.12356.101.12.2.2.1.20.1.2 = INTEGER: up(2)\n.1.3.6.1.4.1.12356.101.12.2.2.1.20.1.3 = INTEGER: up(2)\n.1.3.6.1.4.1.12356.101.12.2.2.1.20.2.1 = INTEGER: up(2)\n.1.3.6.1.4.1.12356.101.12.2.2.1.20.2.2 = INTEGER: up(2)<\/code><\/pre>\n\n\n\n\n\n<p>Nun erstellst einen Icinga2 Check nach folgendem Format:<\/p>\n\n\n\n\n\n<pre class=\"wp-block-code\"><code>.\/check_snmp -H 172.16.4.2 -C public -v 2c -o .1.3.6.1.4.1.12356.101.12.2.2.1.20.1.1 -c 2<\/code><\/pre>\n\n\n\n\n\n<p>Das f\u00fchrst du f\u00fcr jede OID durch und bekommst damit einzelne Checks f\u00fcr die einzelnen Tunnel in Phase 2.<\/p>\n\n\n","protected":false},"excerpt":{"rendered":"<p>Du m\u00f6chtest einen spezifischen Tunnel auf der FortiGate \u00fcberwachen und wei\u00dft nicht wie. Diverse Icinga2 Plugins bieten dir lediglich die Funktion alle Tunnel zu \u00fcberwachen. Das ist leider nicht immer zielf\u00fchrend. Wir verwenden f\u00fcr die \u00dcberwachung das SNMP Plugin check_snmp. Als Erstes ziehst du dir von deiner Fortigate das MIB File. Das findest du unter [&hellip;]<\/p>","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[19,9,3],"tags":[],"class_list":["post-765","post","type-post","status-publish","format-standard","hentry","category-fortinet","category-icinga","category-it"],"_links":{"self":[{"href":"https:\/\/whoami.lausitz-event.info\/index.php?rest_route=\/wp\/v2\/posts\/765","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/whoami.lausitz-event.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/whoami.lausitz-event.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/whoami.lausitz-event.info\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/whoami.lausitz-event.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=765"}],"version-history":[{"count":3,"href":"https:\/\/whoami.lausitz-event.info\/index.php?rest_route=\/wp\/v2\/posts\/765\/revisions"}],"predecessor-version":[{"id":770,"href":"https:\/\/whoami.lausitz-event.info\/index.php?rest_route=\/wp\/v2\/posts\/765\/revisions\/770"}],"wp:attachment":[{"href":"https:\/\/whoami.lausitz-event.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=765"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/whoami.lausitz-event.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=765"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/whoami.lausitz-event.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=765"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}