1- # Checkmk Grafana Data Source Plugin
1+ # Checkmk's Grafana Data Source Plugin
22
33![ CI] ( https://github.com/tribe29/grafana-checkmk-datasource/actions/workflows/node.js.yml/badge.svg )
44
5- This Data Source allows you to query checkmk metrics. It is a complete rewrite
6- of the previous connector to match newer grafana versions. This plugin is on
7- the alpha testing stage.
5+ This data-source plugin is a complete rewrite from the previous connector. It has
6+ undergone a new architectural design and is not backwards compatible to the
7+ previous version. We nevertheless provide an upgrade procedure to assist you on
8+ the transition.
89
9- Due to the breaking changes in this plugin, it is a complete separate plugin. We
10- provide an update utility, although not all features from the previous connector
11- are available. Those are some single metrics and annotations.
12-
13- This plugin id is: ` tribe-29-grafana-checkmk-datasource `
10+ This project has entered the Beta testing phase.
1411
1512## Requirements
1613
17- You require checkmk nightly build from the master branch and 7.0<=Grafana<8.2
14+ - Checkmk >= 2.0.0p20
15+ - Grafana >= 7.0
1816
19- Since Grafana 8.2, plugins loaded diffently and the connector fails to load.
20- Please help us with your setup on Issue # 52 for us to debug further. We know
21- that Grafana 8.3.4 on a docker container has worked for us, yet we don't yet
22- know why .
17+ This plugin release accompanies the Checkmk 2.1 release. You can use it already
18+ with Checkmk 2.0.0p20 for testing purposes, however bug-fixes, changes and
19+ updates will mainly take place on Checkmk 2.1 to not compromise the stability
20+ of Checkmk 2.0 .
2321
2422## Getting started
23+ ### Installation
2524
26- ### Building the plugin
27-
28- 1 . Install dependencies
29-
30- ``` BASH
31- yarn install
32- ```
33-
34- 2 . Build plugin in development mode or run in watch mode
35-
36- ``` BASH
37- yarn dev
38- ```
39-
40- or
41-
42- ``` BASH
43- yarn watch
44- ```
45-
46- 3 . Build plugin in production mode
25+ Download the released version of this repository or clone it. Released versions
26+ include the built artifacts, for non-releases you need to build the plugin
27+ yourself as explained further on this guide.
4728
48- ``` BASH
49- yarn build
50- ```
51-
52- ### Installing
53-
54- For development it is easiest to create a symlink inside your grafana plugins
29+ This plugin's id is: ` tribe-29-checkmk-datasource `
30+ For development it is easiest to create a symlink inside your Grafana plugins
5531path(` /var/lib/grafana/plugins ` ) to this repository. Or if using docker mount
5632this repository as a volume.
5733
58- This plugin is not yet signed, thus you need to allow it on the ` grafana.ini ` file under
59- ` allow_loading_unsigned_plugins=tribe-29-grafana-checkmk-datasource `
60-
61- Grafana will read the ` dist ` folder, this repository does not include the
62- builds. You need to follow previous section to prepare your own builds.
63-
64- ### Plugin configuration
34+ This plugin is not signed, thus you need to allow it on the ` grafana.ini ` file under
35+ ` allow_loading_unsigned_plugins=tribe-29-checkmk-datasource `
6536
66- #### URL:
37+ Beware that starting Grafana>=8.2 the systemd start script changed permissions
38+ and you need to make sure this plugin is readable under those conditions. [ Issue
39+ #52 ] ( https://github.com/tribe29/grafana-checkmk-datasource/issues/52#issuecomment-1026917446 )
40+ includes troubleshooting information.
6741
68- URL of the Checkmk Server used.\
69- Example: http://checkmk.server/site/
7042
71- #### Username:
43+ ### Plugin configuration
44+ URL
45+ : URL of the Checkmk Server used.
46+ : Example: http://checkmk.server/site/
7247
73- User for API calls. Don't use ` automation ` , because that user has also
74- admin configuration rights. Use a dedicated user that can only monitor.
48+ Edition
49+ : Your checkmk edition
50+ : The connector will validate against the checkmk server your selection.
7551
76- #### API Key:
52+ Username
53+ : User for API calls.
54+ : Don't use ` automation ` , because that user has also admin configuration rights.
55+ Use a dedicated user that has only monitoring permissions.
7756
78- Secret for the API User. This key is not transmitted from the grafana UI, only
79- the backend has access to it. This is a security improvement to the previous
80- plugin.
57+ Secret
58+ : Secret for the API User.
59+ : This key is not transmitted from the Grafana UI, only the back-end has access
60+ to it. This is a security improvement over the previous plugin.
8161
8262Save & Test will check if the User authenticates and the data source is
8363reachable.
8464
8565## Current state
8666
87- - Service graph works on RAW & CEE
88- - Single metric for the moment now works only on CEE
89- - Combined graphs remains CEE only
90- - Dropped "Label Format" option. Prefer Grafana overrrides .
91- - Annotations are not usable yet
67+ - CEE configuration is now a filter based selection of graph templates of single metric.
68+ - RAW configuration offers Service graphs and some single metrics.
69+
70+ - Dropped "Label Format" option. Prefer Grafana overrides .
71+ - Annotations are not available.
9272
9373### Combined graphs
9474
@@ -113,8 +93,8 @@ reachable.
11393
11494## Updating from the previous connector
11595
116- We provide a Python script ` utils/converter.py ` which will update the Grafana
117- Sqlite database from the old connector setup to the new one. In that process it
96+ We provide a Python script ` utils/converter.py ` which updates the Grafana
97+ SQLite database from the old connector setup to the new one. In that process it
11898will go over all the dashboards and create a new version of them with the
11999updated connector. PLEASE BACKUP THIS FILE BEFORE UPDATING.
120100
@@ -130,8 +110,37 @@ python3 converter.py -o "checkmk" -n "Latest cmk connector" -db grafana.db
130110```
131111
132112If any of the two datasources is your default datasource, omit that option on
133- the command. This script will go over all your dashboards, it might take some
134- time because it also queries information from your checkmk site, and that
135- communication takes time.
113+ the command.
114+
115+ This script will go over all your dashboards, it might take some time because it
116+ also queries information from your checkmk site, and that communication takes
117+ time.
136118
1371194 . After the update completes start your Grafana server again.
120+
121+ ### Building the plugin
122+
123+ 1 . Install dependencies
124+
125+ ``` BASH
126+ yarn install
127+ ```
128+
129+ 2 . Build plugin in development mode or run in watch mode
130+
131+ ``` BASH
132+ yarn dev
133+ ```
134+
135+ or
136+
137+ ``` BASH
138+ yarn watch
139+ ```
140+
141+ 3 . Build plugin in production mode
142+
143+ ``` BASH
144+ yarn build
145+ ```
146+
0 commit comments