You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/onprem/de/datasource_programs.asciidoc
+26-21Lines changed: 26 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
// -*- coding: utf-8 -*-
2
-
// IGNORE WebAPI
2
+
// IGNORE
3
3
include::global_attr.adoc[]
4
4
= Datenquellenprogramme
5
-
:revdate: 2023-01-30
5
+
:revdate: draft
6
6
:title: Datenquellenprogramme - Geräte ohne direkten Agentenzugriff überwachen
7
7
:description: Mit Datenquellenprogrammen werden Hosts überwacht, welche nicht direkt oder nur über eine API erreichbar sind. Grundlegende Informationen zur Funktion werden hier beschrieben.
Der {CMK}-Server erreicht Hosts im xref:glossar#pull_mode[Pull-Modus] üblicherweise über eine TCP-Verbindung auf Port 6556.
@@ -32,7 +33,7 @@ Die Idee ist sehr einfach:
32
33
Sie geben {CMK} die Kommandozeile eines Befehls.
33
34
Anstelle der Verbindung auf Port 6556 führt {CMK} diesen Befehl aus.
34
35
Dieser produziert die Agentendaten auf der _Standardausgabe_, welche dann von {CMK} genauso verarbeitet werden, als kämen sie von einem „normalen“ Agenten.
35
-
Da Änderungen der Datenquellen meist Transportwege betreffen, ist es wichtig, dass Sie den Host in der Setup-GUI auf der Einstellung [.guihint]#API integrations if configured, else {CMK} agent# belassen.
36
+
Da Änderungen der Datenquellen meist Transportwege betreffen, ist es wichtig, dass Sie den Host in der xref:hosts_setup#monitoring_agents[Setup-GUI] auf der Einstellung [.guihint]#API integrations if configured, else {CMK} agent# belassen.
36
37
37
38
Die Modularität von {CMK} hilft, diese Anforderungen zu erfüllen.
38
39
Letztlich kann die Klartextausgabe des Agentenskripts über beliebige Wege transportiert werden -- direkt oder indirekt, per Pull oder Push.
@@ -48,13 +49,14 @@ Ein weiterer Anwendungsbereich für Datenquellenprogramme sind Systeme, die kein
48
49
In solchen Fällen können Sie ein Datenquellenprogramm schreiben, das die vorhandene Schnittstelle abfragt und aus den gewonnenen Daten Agenten-Output generiert.
49
50
50
51
52
+
[#writing]
51
53
== Schreiben von Datenquellenprogrammen
52
54
53
55
=== Das einfachst mögliche Programm
54
56
55
57
Das Schreiben und Einbinden eines eigenen Datenquellenprogramms ist nicht schwer.
56
58
Sie können jede von Linux unterstützte Skript- und Programmiersprache verwenden.
57
-
Legen Sie das Programm am besten im Verzeichnis `~/local/bin` an, dann wird es immer automatisch ohne Pfadangabe gefunden.
59
+
Legen Sie das Programm am besten im Verzeichnis `~/local/bin/` an, dann wird es immer automatisch ohne Pfadangabe gefunden.
58
60
59
61
Folgendes erstes minimale Beispiel heißt `myds` und erzeugt einfache fiktive Monitoring-Daten.
60
62
Anstatt einen neuen Transportweg zu integrieren, erzeugt es Monitoring-Daten selbst.
@@ -236,37 +238,41 @@ Einige häufig benötigte Datenquellenprogramme werden von {CMK} mitgeliefert.
236
238
Diese erzeugen Agentenausgaben nicht durch den Abruf eines normalen {CMK}-Agenten auf irgendwelchen krummen Wegen, sondern sind für die Abfrage von bestimmter Hardware oder Software konzipiert.
237
239
238
240
Weil diese Programme teilweise recht komplexe Parameter benötigen, haben wir dafür spezielle Regelsätze in der Setup-GUI definiert, mit denen Sie diese direkt konfigurieren können.
239
-
Diese Regelsätze finden Sie gruppiert nach Anwendungsfällen unter [.guihint]#Setup > Agents > Other integrations# und [.guihint]#Setup > Agents > VM, Cloud, Container#.
241
+
Diese Regelsätze finden Sie gruppiert nach Anwendungsfällen unter [.guihint]#Setup > Agents > VM, cloud, container# und [.guihint]#Setup > Agents > Other integrations:#
240
242
243
+
.Regelsätze unter [.guihint]#Setup > Agents > Other integrations#
244
+
image::ds_program_rules.png[alt="Regelsätze für die Überwachung von Anwendungen per Datenquelle und Piggyback."]
245
+
246
+
[TIP]
247
+
====
241
248
Wer von älteren {CMK} Versionen umgestiegen ist, wird sich möglicherweise über die neue Gruppierung wundern:
242
249
Seit {v20} gruppiert {CMK} nicht mehr nach Zugriffstechnik, sondern nach Art des überwachten Objektes.
243
250
Dies ist insbesondere deshalb sinnvoll, weil es in vielen Fällen den Anwender nicht interessiert, mit welcher Technik Daten eingeholt werden und zudem oft Datenquellen und xref:piggyback#[Piggyback] miteinander kombiniert werden, hier also keine klare Abgrenzung möglich ist.
251
+
====
244
252
245
-
image::ds_program_rules.png[alt="Regelsätze für die Überwachung von Anwendungen per Datenquelle und Piggyback."]
246
-
247
-
Diese Programme heißen auch „Spezialagenten“, weil sie eben ein _spezieller_ Ersatz für den normalen {CMK}-Agenten sind.
248
-
Nehmen Sie als Beispiel die Überwachung von NetApp Filers.
253
+
Diese Programme heißen auch _Spezialagenten,_ weil sie eben ein _spezieller_ Ersatz für den normalen {CMK}-Agenten sind.
254
+
Nehmen Sie als Beispiel die Überwachung von _NetApp Filers._
249
255
Diese lassen die Installation eines {CMK}-Agenten nicht zu.
250
256
Die SNMP-Schnittstelle ist langsam, fehlerhaft und unvollständig.
251
-
Aber es gibt eine spezielle HTTP-Schnittstelle, welche Zugriff auf alle Überwachungsdaten liefert.
252
-
253
-
Der Spezialagent `agent_netapp` greift über diese Schnittstelle zu und wird über den Regelsatz [.guihint]#NetApp via WebAPI# als Datenquellenprogramm eingerichtet.
254
-
Wichtig ist, dass Sie den Host in der Setup-GUI auf der Einstellung [.guihint]#API integrations if configured, else {CMK} agent# belassen.
257
+
Aber es gibt eine spezielle HTTP-Schnittstelle, welche Zugriff auf das NetApp-Betriebssystem _Ontap_ und alle Überwachungsdaten liefert.
255
258
259
+
Der Spezialagent `agent_netapp_ontap` greift über eine REST-API auf diese Schnittstelle zu und wird über den Regelsatz [.guihint]#NetApp via Ontap REST API# als Datenquellenprogramm eingerichtet.
256
260
Im Inhalt der Regel können Sie dann die Daten eingeben, die der Spezialagent braucht.
257
261
Fast immer sind das irgendwelche Zugangsdaten.
258
-
Beim NetApp-Agenten gibt es noch eine zusätzliche Checkbox für das Erfassen von Metriken (die hier recht umfangreich werden können):
262
+
Beim NetApp-Spezialagenten gibt es unter anderen auch noch eine zusätzliche Checkbox für das Erfassen von Metriken (die hier recht umfangreich werden können):
263
+
264
+
image::ds_program_netapp.png[alt="Regel zur Konfiguration des Netapp-Spezialagenten."]
259
265
260
-
image::ds_program_netapp.png[alt="Eingabemaske der Zugangsdaten für die Netapp-Überwachung."]
266
+
Wichtig ist, dass Sie den Host in der xref:hosts_setup#monitoring_agents[Setup-GUI] auf der Einstellung [.guihint]#API integrations if configured, else {CMK} agent# belassen.
261
267
262
268
Es gibt seltene Situationen, in denen Sie sowohl einen Spezialagenten als auch den normalen Agenten abfragen möchten.
263
269
Ein Beispiel dafür ist die Überwachung von xref:monitoring_vmware#[VMware ESXi] über das vCenter.
264
270
Letzteres ist auf einer (meist virtuellen) Windows-Maschine installiert, auf welcher sinnvollerweise auch ein {CMK}-Agent läuft.
265
271
266
-
image::ds_program_vcenter.png[alt="Auswahlmöglichkeiten 'host system' vs. 'vCenter' in der VMware ESXi Konfiguration."]
272
+
image::ds_program_vcenter.png[alt="Auswahlmöglichkeiten beim Abfragetyp in der VMware ESXi Konfiguration."]
267
273
268
-
Die Spezialagenten sind unter `~/share/check_mk/agents/special` installiert.
269
-
Wenn Sie eine Modifikation an einem solchen Agenten machen möchten, dann kopieren Sie die Datei mit dem gleichen Namen nach `~/local/share/check_mk/agents/special` und ändern Sie sie dort.
274
+
Die Spezialagenten sind unter `~/share/check_mk/agents/special/` installiert.
275
+
Wenn Sie eine Modifikation an einem solchen Agenten machen möchten, dann kopieren Sie die Datei mit dem gleichen Namen nach `~/local/share/check_mk/agents/special/` und ändern Sie sie dort.
270
276
271
277
272
278
[#files]
@@ -277,7 +283,6 @@ Wenn Sie eine Modifikation an einem solchen Agenten machen möchten, dann kopier
277
283
|Pfad |Bedeutung
278
284
279
285
|`~/local/bin/` |Ablage von eigenen Programmen oder Skripten, die im Suchpfad sein sollen und ohne Pfadangabe direkt ausgeführt werden können. Ist ein Programm sowohl in `~/bin/` als auch in `~/local/bin/`, hat letzteres Vorrang.
280
-
|`~/share/check_mk/agents/special` |Hier sind die mitgelieferten Spezialagenten installiert.
281
-
|`~/local/share/check_mk/agents/special` |Ablage der von Ihnen modifizierten Spezialagenten.
286
+
|`~/share/check_mk/agents/special/` |Hier sind die mitgelieferten Spezialagenten installiert.
287
+
|`~/local/share/check_mk/agents/special/` |Ablage der von Ihnen modifizierten Spezialagenten.
{CMK} usually accesses monitored hosts in the xref:glossar#pull_mode[pull mode] via a TCP connection to port 6556.
@@ -32,7 +33,7 @@ The idea is very simple:
32
33
one passes a command as text to {CMK}.
33
34
Instead of connecting to port 6556, {CMK} executes this command.
34
35
This produces the agent data on the _standard output_, which is then processed by {CMK} in exactly the same way as if it had come from a ‘normal’ agent.
35
-
Since changes to data sources usually only affect transports, it is important that you leave the host to [.guihint]#API integrations if configured, else {CMK} agent# in the Setup GUI.
36
+
Since changes to data sources usually only affect transports, it is important that you leave the host to [.guihint]#API integrations if configured, else {CMK} agent# in the xref:hosts_setup#monitoring_agents[Setup GUI].
36
37
37
38
The modularity of {CMK} helps you to fulfill these requirements by transmitting the plain text agent output over arbitrary means of transport.
38
39
Ultimately, the plain text output of the agent script can be transported by any means -- direct or indirect, pull or push.
@@ -48,13 +49,14 @@ Another area of application for datasource programs are systems that do not allo
48
49
In such cases, you can write a datasource program that queries the existing interface and generates agent output from the data obtained.
49
50
50
51
51
-
== Writing from datasource programs
52
+
[#writing]
53
+
== Writing datasource programs
52
54
53
55
=== The simplest possible program
54
56
55
57
The writing and installation of a datasource program is not difficult.
56
58
Any Linux-supported script and program language can be used.
57
-
The program is best stored in the `~/local/bin` directory, where it will always be found automatically without the need to specify a data path.
59
+
The program is best stored in the `~/local/bin/` directory, where it will always be found automatically without the need to specify a data path.
58
60
59
61
The following first very basic example is called `myds` and it generates simple, fictional monitoring data.
60
62
Instead of integrating a new transport path, it generates the monitoring data itself.
@@ -235,37 +237,41 @@ A number of often-required datasource programs are delivered with {CMK}.
235
237
These generate agent outputs not just by calling a normal {CMK} agent in a roundabout way, rather they have been specially conceived for the querying of particular hardware or software.
236
238
237
239
Because these programs sometimes require quite complex parameters, we have defined special rule sets in the Setup GUI that allow you to configure them directly.
238
-
You can find these rule sets grouped by use cases under [.guihint]#Setup > Agents > Other integrations# and [.guihint]#Setup > Agents > VM, Cloud, Container#.
240
+
You can find these rule sets grouped by use cases under [.guihint]#Setup > Agents > VM, cloud, container# and [.guihint]#Setup > Agents > Other integrations#.
239
241
242
+
.Rule sets under [.guihint]#Setup > Agents > Other integrations#
243
+
image::ds_program_rules.png[alt="Rule sets for monitoring applications by datasource and piggyback."]
244
+
245
+
[TIP]
246
+
====
240
247
Those who have switched from older {CMK} versions may be surprised by the new grouping:
241
248
{CMK} {v20} no longer groups according to access technique, but by type of monitored object.
242
249
This is particularly useful because in many cases the user is not interested in which technique is used to retrieve data and, moreover, data sources and xref:piggyback#[piggyback] are often combined, so no clear delimitation is possible here.
250
+
====
243
251
244
-
image::ds_program_rules.png[alt="Rule sets for monitoring applications by datasource and piggyback."]
245
-
246
-
These programs are also known as ‘special agents’, because they are a _special_ alternative to the normal {CMK} agents.
247
-
As an example, let us take the monitoring of NetApp Filers.
252
+
These programs are also known as _special agents_, because they are a _special_ alternative to the normal {CMK} agents.
253
+
As an example, let us take the monitoring of _NetApp Filers_.
248
254
These do not allow the installation of {CMK} agents.
249
255
The SNMP interface is slow, flawed and incomplete.
250
-
There is however a special HTTP interface which provides access to all of the monitoring data.
251
-
252
-
The `agent_netapp` special agent accesses via this interface and is set up as a datasource program via the [.guihint]#NetApp via WebAPI# rule set.
253
-
It is important that you leave the host set to [.guihint]#API integrations if configured, else {CMK} agent# in the Setup GUI.
256
+
There is however a special HTTP interface which provides access to the NetApp _Ontap_ operating system and all of the monitoring data.
254
257
258
+
The `agent_netapp_ontap` special agent accesses this interface via a REST API and is set up as a data source program using the [.guihint]#NetApp via Ontap REST API# rule set.
255
259
The data required by the special agent can then be entered into the rule's content.
256
260
This is almost always some sort of access data.
257
-
With the NetApp agent there is also an additional check box for the recording of metrics (which here can be quite comprehensive):
261
+
With the NetApp special agent there is also an additional check box for the recording of metrics (which here can be quite comprehensive):
262
+
263
+
image::ds_program_netapp.png[alt="Rule for configuring the NetApp special agent."]
258
264
259
-
image::ds_program_netapp.png[alt="Input mask of the access data for Netapp monitoring."]
265
+
It is important that you leave the host set to [.guihint]#API integrations if configured, else {CMK} agent# in the xref:hosts_setup#monitoring_agents[Setup GUI].
260
266
261
267
There are rare occasions in which it is desired that both a special agent, as well as the normal agent are to be queried.
262
268
An example for this is the monitoring of xref:monitoring_vmware#[VMware ESXi] over the vCenter.
263
269
This latter is installed on a (usually virtual) Windows machine, on which reasonably enough a {CMK} agent is also running.
264
270
265
-
image::ds_program_vcenter.png[alt="Choices 'host system' vs. 'vCenter' in VMware ESXi configuration."]
271
+
image::ds_program_vcenter.png[alt="Query type options in the VMware ESXi configuration."]
266
272
267
-
The special agents are installed under `~/share/check_mk/agents/special`.
268
-
If you wish to modify such an agent, first copy the file with the same name to `~/local/share/check_mk/agents/special` and make your changes in that new version.
273
+
The special agents are installed under `~/share/check_mk/agents/special/`.
274
+
If you wish to modify such an agent, first copy the file with the same name to `~/local/share/check_mk/agents/special/` and make your changes in that new version.
269
275
270
276
271
277
[#files]
@@ -275,6 +281,6 @@ If you wish to modify such an agent, first copy the file with the same name to `
275
281
|===
276
282
|Path |Function
277
283
|`~/local/bin/` |The repository for own programs and scripts that should be in a search path, and which can be directly executed without specifying the path. If a program is in `~/bin/` as well as in `~/local/bin/`, the latter has priority.
278
-
|`~/share/check_mk/agents/special` |The special agents provided with {CMK} are installed here.
279
-
|`~/local/share/check_mk/agents/special` |The repository for your own modified special agents.
284
+
|`~/share/check_mk/agents/special/` |The special agents provided with {CMK} are installed here.
285
+
|`~/local/share/check_mk/agents/special/` |The repository for your own modified special agents.
0 commit comments