Skip to content

Commit c97de33

Browse files
author
Mattias Schlenker
committed
KNW-2089 remove now obsolete hints on performance and porting
1 parent 1bb7b76 commit c97de33

2 files changed

Lines changed: 0 additions & 64 deletions

File tree

src/onprem/de/devel_check_plugins.asciidoc

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2244,38 +2244,6 @@ Erstellen Sie dann eine Datei im Verzeichnis `/var/lib/check_mk_agent/spool/`, w
22442244
Beim nächsten Aufruf des Agenten wird dann der Inhalt der Spool-Datei statt der Ausgabe des Agentenplugins übertragen.
22452245

22462246

2247-
[#performance]
2248-
=== Alte Check-Plugins werden bei vielen Services langsam
2249-
2250-
Bei einigen Check-Plugins, die Items nutzen, ist es auf größeren Servern durchaus möglich, dass einige hundert Services erzeugt werden.
2251-
Wenn keine eigene Parse-Funktion verwendet wird, hat dies zur Folge, dass für jedes der hunderten Items die gesamte Liste von hunderten Zeilen durchlaufen werden muss.
2252-
Die zum Suchen benötigte Zeit steigt also im Quadrat mit der Zahl der Listenelemente, bei hunderten Services bedeutet das zigtausende Vergleiche.
2253-
Ist dagegen die geschachtelte Liste in ein Dictionary überführt, steigt der Aufwand für die Suche eines Elements nur linear mit der Größe des Dictionaries.
2254-
2255-
Im Python-Wiki finden Sie eine link:https://wiki.python.org/moin/TimeComplexity[Übersicht der Kosten^] für die Suche in verschiedenen Datentypen, inklusive Erläuterung und _O-Notation._
2256-
Mit der Parse-Funktion reduzieren die Komplexität der Suche von _O(n)_ auf _O(1)_.
2257-
2258-
Da ältere Versionen dieses Artikels keinen Gebrauch von der Parse-Funktion gemacht haben, sollten Sie derartige Check-Plugins identifizieren und diese auf Verwendung einer Parse-Funktion umschreiben.
2259-
2260-
2261-
[#migration]
2262-
== Migration
2263-
2264-
Die in der {CMK}-Version {v20} eingeführte Check-API V1 wurde noch in der Version {v23} weiterhin unterstützt, aber nicht mehr in der aktuellen Version {v24}.
2265-
Um Ihre Check-Plugins weiter nutzen zu können müssen Sie diese noch unter {v23} auf die neuen APIs migrieren.
2266-
2267-
Die folgenden Informationen helfen Ihnen bei der Migration von Check-Plugins der Check-API V1 auf die V2:
2268-
2269-
* Die neue Verzeichnisstruktur und Namenskonvention zur Ablage der Dateien für alle Plugin-APIs finden Sie in der xref:check_api_doc[API-Dokumentation] auf der Hauptseite [.guihint]#{CMK}'s Plug-in APIs#.
2270-
2271-
* Die Zusammenfassung der Änderungen in der Check-API V2 steht ebenfalls in der API-Dokumentation in [.guihint]#{CMK}'s Plug-in APIs > Agent based ("Check API") > Version 2 > New in this version#.
2272-
Dort finden Sie auch den Link zu einem GitHub-Commit, der das bestehende Check-Plugin `apt` zur Check-API V2 migriert.
2273-
2274-
* Auf link:https://github.com/Checkmk/checkmk/tree/master/doc/treasures/migration_helpers/[GitHub^] finden Sie im `treasures`-Verzeichnis von {CMK} Skripte, die Ihnen bei der Migration auf die neuen APIs helfen.
2275-
2276-
include::include_treasures_admonition.asciidoc[]
2277-
2278-
22792247
[#files]
22802248
== Dateien und Verzeichnisse
22812249

src/onprem/en/devel_check_plugins.asciidoc

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2236,38 +2236,6 @@ Then create a file in the `/var/lib/check_mk_agent/spool/` directory that contai
22362236
The next time the agent is called, the content of the spool file will be transferred instead of the output from the agent plug-in.
22372237

22382238

2239-
[#performance]
2240-
=== Old check plug-ins become slow for many services
2241-
2242-
With some check plug-ins that use items, it is quite possible that on larger servers several hundred services will be generated.
2243-
If no separate parse function is used, this means that the entire list of hundreds of lines must be run through for each of the hundreds of items.
2244-
The time required to search therefore increases by the square of the number of listed items, which means tens of thousands of comparisons for hundreds of services.
2245-
If, on the other hand, the nested list is transferred to a dictionary, the time required to search for an element increases only linearly with the size of the dictionary.
2246-
2247-
In the Python wiki you will find an link:https://wiki.python.org/moin/TimeComplexity[overview of costs^] for searching in different data types, including an explanation and _O notation_.
2248-
Using the parse function reduces the complexity of the search from _O(n)_ to _O(1)_.
2249-
2250-
As older versions of this article did not make use of the parse function, you should identify such check plug-ins and rewrite them to use a parse function.
2251-
2252-
2253-
[#migration]
2254-
== Migration
2255-
2256-
The Check API V1 introduced in {CMK} version {v20} was supported up to version {v23}, but no longer in the current version {v24}.
2257-
In order to continue using your check plugins, you must migrate them to the new APIs while still on {v23}.
2258-
2259-
The following information will help you with the migration of check plug-ins from Check API V1 to V2:
2260-
2261-
* The new directory structure and naming convention for storing the files for all plug-in APIs can be found in the xref:check_api_doc[API documentation] on the main page [.guihint]#{CMK}'s Plug-in APIs#.
2262-
2263-
* The summary of the changes in the Check API V2 can also be found in the API documentation under [.guihint]#{CMK}'s Plug-in APIs > Agent based ('Check API') > Version 2 > New in this version#.
2264-
There you will also find the link to a GitHub commit that migrates the existing check plug-in `apt` to Check API V2.
2265-
2266-
* On link:https://github.com/Checkmk/checkmk/tree/master/doc/treasures/migration_helpers/[GitHub^] you will find scripts in the `treasures` directory of {CMK} that will help you migrate to the new APIs.
2267-
2268-
include::include_treasures_admonition.asciidoc[]
2269-
2270-
22712239
[#files]
22722240
== Files and directories
22732241

0 commit comments

Comments
 (0)