I was wondering what approach should I take to run my own API request for checkmk. I have already tested retrieving data quota usage information.
Thank you in advanced
Kind regards
I already searched on checkmk site:-
{
"unit":"Bytes"
"nextResetTime" : "9999-12-31T23:59:59.999999z"
"currentValue": 14725120,
"limit": 5368701200,
"name" : {
"value" : "FileSystemStorage",
"localizedValue": "File System Storage"
}
}
],
"nextLink" : null,
"id" : null
}

Here's a sample code to call an API with python inside the VM or host that runs your
checkmk site:-To call a
checkmk APIwith authorization, Refer the code below:-Code with a API without any authorization:-
Output:-
Also, as an alternative you can directly monitor an Azure service:-
According to this Checkmk Official document, You need to implement authentication for your Rest API through Azure AD by referring this Document:-
In your Azure AD create a new application/service principal for Azure AD like below:-
Then assign this application role to access the File storage by assigning it Contributor role on the Azure storage account that contains your File share or at the Subscription level:-
Azure storage account level:-
Azure Subscription level for the access to all the storage account in multiple resource groups:-
Now create a Client Secret for your Azure AD app and then
navigate to
Setup > Agents > VM, Cloud, Container > Microsoft Azure, and establish a rule that specifically targets the newly created Azure host. And add the above Application Subscription Id, Tenant ID, Client ID and Client Secret:- and implement the testing of Azure resource monitoring according to the document above.You can also use the above application's parameters in postman or by curl like below:-
Create a Post request to obtain access token for the checkmk api:-
And then call the checkmk API with the Access Token above, Given you have added the checkmk API as an API app and provided API permissions to the App above.