Skip to content

Commit ff7dbec

Browse files
KNW-1345 - ready for review
1 parent 71bae12 commit ff7dbec

File tree

5 files changed

+53
-42
lines changed

5 files changed

+53
-42
lines changed

images/ds_program_netapp.png

11.8 KB
Loading

images/ds_program_rules.png

39.6 KB
Loading

images/ds_program_vcenter.png

-33.7 KB
Loading

src/onprem/de/datasource_programs.asciidoc

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// -*- coding: utf-8 -*-
2-
// IGNORE WebAPI
2+
// IGNORE
33
include::global_attr.adoc[]
44
= Datenquellenprogramme
5-
:revdate: 2023-01-30
5+
:revdate: draft
66
:title: Datenquellenprogramme - Geräte ohne direkten Agentenzugriff überwachen
77
:description: Mit Datenquellenprogrammen werden Hosts überwacht, welche nicht direkt oder nur über eine API erreichbar sind. Grundlegende Informationen zur Funktion werden hier beschrieben.
88

@@ -14,6 +14,7 @@ xref:piggyback#[Der Piggyback-Mechanismus]
1414
{related-end}
1515

1616

17+
[#intro]
1718
== Einleitung
1819

1920
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:
3233
Sie geben {CMK} die Kommandozeile eines Befehls.
3334
Anstelle der Verbindung auf Port 6556 führt {CMK} diesen Befehl aus.
3435
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.
3637

3738
Die Modularität von {CMK} hilft, diese Anforderungen zu erfüllen.
3839
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
4849
In solchen Fällen können Sie ein Datenquellenprogramm schreiben, das die vorhandene Schnittstelle abfragt und aus den gewonnenen Daten Agenten-Output generiert.
4950

5051

52+
[#writing]
5153
== Schreiben von Datenquellenprogrammen
5254

5355
=== Das einfachst mögliche Programm
5456

5557
Das Schreiben und Einbinden eines eigenen Datenquellenprogramms ist nicht schwer.
5658
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.
5860

5961
Folgendes erstes minimale Beispiel heißt `myds` und erzeugt einfache fiktive Monitoring-Daten.
6062
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.
236238
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.
237239

238240
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:#
240242

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+
====
241248
Wer von älteren {CMK} Versionen umgestiegen ist, wird sich möglicherweise über die neue Gruppierung wundern:
242249
Seit {v20} gruppiert {CMK} nicht mehr nach Zugriffstechnik, sondern nach Art des überwachten Objektes.
243250
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+
====
244252

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._
249255
Diese lassen die Installation eines {CMK}-Agenten nicht zu.
250256
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.
255258

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.
256260
Im Inhalt der Regel können Sie dann die Daten eingeben, die der Spezialagent braucht.
257261
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."]
259265

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.
261267

262268
Es gibt seltene Situationen, in denen Sie sowohl einen Spezialagenten als auch den normalen Agenten abfragen möchten.
263269
Ein Beispiel dafür ist die Überwachung von xref:monitoring_vmware#[VMware ESXi] über das vCenter.
264270
Letzteres ist auf einer (meist virtuellen) Windows-Maschine installiert, auf welcher sinnvollerweise auch ein {CMK}-Agent läuft.
265271

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."]
267273

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.
270276

271277

272278
[#files]
@@ -277,7 +283,6 @@ Wenn Sie eine Modifikation an einem solchen Agenten machen möchten, dann kopier
277283
|Pfad |Bedeutung
278284

279285
|`~/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.
282288
|===
283-

src/onprem/en/datasource_programs.asciidoc

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// -*- coding: utf-8 -*-
2-
// IGNORE WebAPI
2+
// IGNORE
33
include::global_attr.adoc[]
44
= Datasource programs
5-
:revdate: 2023-03-06
5+
:revdate: draft
66
:title: Datasource programs - Monitoring devices without access to an operating system
77
:description: Datasource programs monitor hosts that are reachable only through an API. Basic information about this function is provided here.
88

@@ -14,6 +14,7 @@ xref:piggyback#[The piggyback mechanism]
1414
{related-end}
1515

1616

17+
[#intro]
1718
== Introduction
1819

1920
{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:
3233
one passes a command as text to {CMK}.
3334
Instead of connecting to port 6556, {CMK} executes this command.
3435
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].
3637

3738
The modularity of {CMK} helps you to fulfill these requirements by transmitting the plain text agent output over arbitrary means of transport.
3839
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
4849
In such cases, you can write a datasource program that queries the existing interface and generates agent output from the data obtained.
4950

5051

51-
== Writing from datasource programs
52+
[#writing]
53+
== Writing datasource programs
5254

5355
=== The simplest possible program
5456

5557
The writing and installation of a datasource program is not difficult.
5658
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.
5860

5961
The following first very basic example is called `myds` and it generates simple, fictional monitoring data.
6062
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}.
235237
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.
236238

237239
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#.
239241

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+
====
240247
Those who have switched from older {CMK} versions may be surprised by the new grouping:
241248
{CMK} {v20} no longer groups according to access technique, but by type of monitored object.
242249
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+
====
243251

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_.
248254
These do not allow the installation of {CMK} agents.
249255
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.
254257

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.
255259
The data required by the special agent can then be entered into the rule's content.
256260
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."]
258264

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].
260266

261267
There are rare occasions in which it is desired that both a special agent, as well as the normal agent are to be queried.
262268
An example for this is the monitoring of xref:monitoring_vmware#[VMware ESXi] over the vCenter.
263269
This latter is installed on a (usually virtual) Windows machine, on which reasonably enough a {CMK} agent is also running.
264270

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."]
266272

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.
269275

270276

271277
[#files]
@@ -275,6 +281,6 @@ If you wish to modify such an agent, first copy the file with the same name to `
275281
|===
276282
|Path |Function
277283
|`~/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.
280286
|===

0 commit comments

Comments
 (0)