I started testing CheckMK in version 2.1. I would like to add monitoring of external services e.g. Artifactory. I can retrieve data from Artifactory via the REST API from on-prem and cloud version. I have not found any module to monitor Artifactory in Exchange. I already tested the plugin Checkmk Exchange but I don’t know how to configure service. Has anyone encountered a similar topic? Maybe there is a better way to monitor using checkmk?
Any ideas?
You can write your own active check that parses what you retrieve from the API. We do that for multiple services, for example logging in to a service. Perhaps robot-mk can do something here, not sure.
You can write your check in any programming language that you can run on your checkmk server
What exactly are you trying to monitor? If you just want to check if a HTTP-call to a specific URL is successful or if a HTTP-call returns a specific string/pattern you could do that with the builtin active check “Check HTTP Service”. This requires the monitoring server to be able to reach the target you want to monitor. This should already give you simple uptime monitoring for a website / API.
If you however want to monitor more granular aspects of your Artifactory instance you probably have to go the route @Anders suggested by writing your own checks.
I would like to check, for example, the size of the repositories, the number of files, whether they are all online, etc.
I would like to use curl for this and filter the result using jq. i use for example this command
curl -X GET -u user:password https://servername/artifactory/api/storageinfo | jq ‘.binariesSummary.artifactsSize’ with result “3.6 GB”. I would like to have graph with history results.
Can I use for it Check HTTP service? I tried to use it but I have connection timeout critical error.
Maybe I need to use solution according to this manual Datasource programs -- Monitoring devices without access to an operating system
Hi @woj and welcome to the checkmk community
In this case you have to write your own check/check-plugin. Therefor you can refer to Writing your own check plug-ins (checkmk.com). The HTTP check is just for monitoring the HTTP response codes (and TLS) but not payload information.
If you like to have several metrics and REST endpoints to monitor, i would highly recommend to pack them together as a special agent. (as example you could take a look at the vsphere special agent)
If you don’t like to write such a check/special agent on your own there are several checkmk partners at this forum which can do the work for you for some coins.
No, but you could easily write your own bash script that you let check-mk run every 5 minute or so that will give you data.
The output in your example could be:
0 "Artifactory" artifactsSize=3.6 Artifactory storage is 3.5GB
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.