ueberarbeitung html
This commit is contained in:
parent
f9559e9ebd
commit
d4783f94d2
69
README.md
69
README.md
@ -2,19 +2,56 @@
|
||||
|
||||
Ein kleines Bash Script um Linux Services mit dem PRTG Monitor zu überwachen
|
||||
|
||||
# Script herunterladen
|
||||
|
||||
git clone https://git.media-techport.de/scriptos/prtg-linux-service-monitor.git
|
||||
|
||||
# Cronjob setzen:
|
||||
|
||||
*/5 * * * * /home/scripts/default/prtg-service-mon.sh "service" "monitoring-server:5050" "guid" > /dev/null 2>&1
|
||||
|
||||
# Folgenden Sensor in PRTG anlegen:
|
||||
|
||||
HTTP Push Data Advanced sensor
|
||||
|
||||
Quellen:
|
||||
|
||||
https://kb.paessler.com/en/topic/70771-how-can-i-monitor-and-automatically-restart-a-service-on-a-linux-host
|
||||
https://www.paessler.com/manuals/prtg/http_push_data_advanced_sensor
|
||||
<div style="direction: ltr; border-width: 100%;">
|
||||
<div style="direction: ltr; margin-top: 0in; margin-left: 0in; width: 7.4361in;">
|
||||
<div style="direction: ltr; margin-top: 0in; margin-left: 0in; width: 7.4361in;">
|
||||
<ol style="direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;" type="1">
|
||||
<li style="margin-top: 0; margin-bottom: 0; vertical-align: middle;" value="1"><span style="font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;">Script installieren</span></li>
|
||||
</ol>
|
||||
<p style="margin: 0in; margin-left: .75in; font-family: Calibri; font-size: 11.0pt;">mkdir -p /temp && cd /temp</p>
|
||||
<p style="margin: 0in; margin-left: .75in; font-family: Calibri; font-size: 11.0pt;">git clone <a href="https://git.media-techport.de/scriptos/prtg-linux-service-monitor.git">https://git.media-techport.de/scriptos/prtg-linux-service-monitor.git</a></p>
|
||||
<p style="margin: 0in; margin-left: .75in; font-family: Calibri; font-size: 11.0pt;">cd prtg-linux-service-monitor</p>
|
||||
<p style="margin: 0in; margin-left: .75in; font-family: Calibri; font-size: 11.0pt;">cp prtg-service-mon.sh /home/scripts/default/prtg-service-mon.sh</p>
|
||||
<p style="margin: 0in; margin-left: .75in; font-family: Calibri; font-size: 11.0pt;">chmod 711 /home/scripts/default/prtg-service-mon.sh</p>
|
||||
<p style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"> </p>
|
||||
<ol style="direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;" type="1">
|
||||
<li style="margin-top: 0; margin-bottom: 0; vertical-align: middle;" value="2"><span style="font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;">Cronjob einrichten</span></li>
|
||||
</ol>
|
||||
<p style="margin: 0in; margin-left: .75in; font-family: Calibri; font-size: 11.0pt;">cat <(crontab -l) <(echo "*/5 * * * * /home/scripts/default/prtg-service-mon.sh mariadb push.mon01.media-techport.de:5050 b2949934-1f05-40b0-afd8-856ac7e534cd > /dev/null 2>&1") | crontab -</p>
|
||||
<p style="margin: 0in; margin-left: 1.125in; font-family: Calibri; font-size: 11.0pt;">Beschreibung für die Parameter hinter dem Befehl:</p>
|
||||
<p style="margin: 0in; margin-left: 1.125in; font-family: Calibri; font-size: 11.0pt;"><span style="font-size: 11pt;">1. ist der Service, welcher überwacht werden soll</span></p>
|
||||
<p style="margin: 0in; margin-left: 1.125in; font-family: Calibri; font-size: 11.0pt;"><span style="font-family: Calibri; font-size: 11.0pt;">2. ist der Server, an dem die Push gesendet wird</span></p>
|
||||
<p style="margin: 0in; margin-left: 1.125in; font-family: Calibri; font-size: 11.0pt;"><span style="font-family: Calibri; font-size: 11.0pt;">3. ist die GUID zur Identifizierung (der sogenannte Ident, dieser muss für jeden Sensor anders sein)</span></p>
|
||||
<p style="margin: 0in; margin-left: 1.125in; font-family: Calibri; font-size: 11.0pt;">Kann hier generiert werden: <a href="https://guidgenerator.com/">https://guidgenerator.com/</a></p>
|
||||
<p style="margin: 0in; margin-left: .75in; font-family: Calibri; font-size: 11.0pt;"> </p>
|
||||
<ol style="direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;" type="1">
|
||||
<li style="margin-top: 0; margin-bottom: 0; vertical-align: middle;" value="3"><span style="font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;">Sensor einrichten</span></li>
|
||||
<ol style="direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;" type="a">
|
||||
<li style="margin-top: 0; margin-bottom: 0; vertical-align: middle;" value="1"><span style="font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;">in PRTG anmelden</span></li>
|
||||
<li style="margin-top: 0; margin-bottom: 0; vertical-align: middle;"><span style="font-family: Calibri; font-size: 11.0pt;">Server, dessen Service überwacht werden soll, aufrufen</span></li>
|
||||
<li style="margin-top: 0; margin-bottom: 0; vertical-align: middle;"><span style="font-family: Calibri; font-size: 11.0pt;">Neuen Sensor hinzufügen</span></li>
|
||||
</ol>
|
||||
</ol>
|
||||
<p style="margin: 0in; margin-left: .75in;"><img src="https://img1.media-techport.de/Huye3/WAfUtEpe28.png/raw" alt="" /></p>
|
||||
<ol style="direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;" type="a">
|
||||
<li style="margin-top: 0; margin-bottom: 0; vertical-align: middle;" value="4"><span style="font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;">Folgende Felder ausfüllen:</span></li>
|
||||
<ol style="direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;" type="1">
|
||||
<li style="margin-top: 0; margin-bottom: 0; vertical-align: middle;" value="1"><span style="font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;">Name des Sensors: "Service: MariaDB"</span></li>
|
||||
<li style="margin-top: 0; margin-bottom: 0; vertical-align: middle;"><span style="font-family: Calibri; font-size: 11.0pt;">Einstellungen für SSL: unsicher</span></li>
|
||||
<li style="margin-top: 0; margin-bottom: 0; vertical-align: middle;"><span style="font-family: Calibri; font-size: 11.0pt;">Port: "5050"</span></li>
|
||||
<li style="margin-top: 0; margin-bottom: 0; vertical-align: middle;"><span style="font-family: Calibri; font-size: 11.0pt;">Token für Identifikation: Dieser wird aus dem Cronjob übernommen</span></li>
|
||||
<li style="margin-top: 0; margin-bottom: 0; vertical-align: middle;"><span style="font-family: Calibri; font-size: 11.0pt;">Keine hereinkommenden Daten: Auf "Nach x Minuten auf "Fehler" wechseln" setzen</span></li>
|
||||
<li style="margin-top: 0; margin-bottom: 0; vertical-align: middle;"><span style="font-family: Calibri; font-size: 11.0pt;">Schwellenwert für Zeit (Minuten): "10"</span></li>
|
||||
</ol>
|
||||
</ol>
|
||||
<p style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"> </p>
|
||||
<p style="margin: 0in; margin-left: .75in; font-family: Calibri; font-size: 11.0pt;">Das ganze könnte dann so aussehen:</p>
|
||||
<p style="margin: 0in; margin-left: .75in;"><img src="https://img1.media-techport.de/Huye3/raLitaYO73.png/raw" alt="" /></p>
|
||||
<p style="margin: 0in; margin-left: .75in;"><img src="https://img1.media-techport.de/Huye3/raLitaYO73.png" alt="" /><img src="https://img1.media-techport.de/Huye3/raLitaYO73.png" alt="" /></p>
|
||||
<p style="margin: 0in; margin-left: .75in;"><img src="https://img1.media-techport.de/Huye3/fOfibuxo37.png/raw" alt="" /></p>
|
||||
<p style="margin: 0in; margin-left: .75in; font-family: Calibri; font-size: 11.0pt;"> </p>
|
||||
<p style="margin: 0in; font-family: Calibri; font-size: 11.0pt;">Quellen:</p>
|
||||
<p style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"><a href="https://kb.paessler.com/en/topic/70771-how-can-i-monitor-and-automatically-restart-a-service-on-a-linux-host">https://kb.paessler.com/en/topic/70771-how-can-i-monitor-and-automatically-restart-a-service-on-a-linux-host</a> <a href="https://www.paessler.com/manuals/prtg/http_push_data_advanced_sensor">https://www.paessler.com/manuals/prtg/http_push_data_advanced_sensor</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user