CMK version:
2.2.0p33
Ansible v5.2.1 from galaxy OS version:
Virt 1 6.5 Error message:
"These fields have problems: parent", "fields": {"parent": ["The folder \‘/local_monitoring/de\’ could not be found."]}}'"}
We are currently testing checkmk ansible. Unfortunately we ran into an issue with creating folders. We use the following standardized folder structure:
/local_monitoring/{{countrycode}}/{{sitecode}}
countrycode is the 2 letter ANSI code in upper case like DE
sitecode is a 3 letter code specific to a site in upper case AUG
Finally that ends in the OS folder:
./local_monitoring/DE/AUG
I can setup this exactly via REST API and get the above described folders on OS level.
Doing this with Ansible fails with following error:
\"These fields have problems: parent\", \"fields\": {\"parent\": [\"The folder \\'/local_monitoring/de\\' could not be found.\"]}}'"}
The country folder is created uppercase but even if I use path: "/local_monitoring/DE/{{sitecode}}"
it fails because it tries to access the folder in lower case.
IIRC, we made a conscious decision to force lowercase folder paths.
It is not good practice to mix upper- and lowercase, but even if one sticks to uppercase, there is a risk of seemingly duplicate folder names.
We might re-evaluate that decision, given demand for it.
For a new environment that might be a solution but we started with checkmk 1.4.0 and we have already thousands of folders in uppercase. I am not sure if its fully save to rename them all to lower case.
Even so the behavior of Ansible code isnt consistent because you can create the folder in uppercase but you cannot access the folder because the path is forced to be in lowercase.
As said, in legacy API and in REST API this isnt the case. So if checkmk makes the decision that folders on OS level must be in lowercase it has to be the case in ALL interfaces, not only GUI Setup and part of Ansible.
I can understand the confusion if you are coming from Windows world but if you coming from *NIX world the logic in Windows isnt consistent. A != a
Will do right away
Thanks for all your work you spent on Ansible checkmk code.
I hear what you are saying and I will take the feedback with me. I cannot make any promises, but of course we strive for the best possible user experience.
That is exactly what we wanted to avoid with the collection.
I did the same decision in the cmdbsycner to have the internal names lowercase, and when you want to see it in uppercase it’s done via the title attribute. I would also not want to see uppercase folder names for automations on Linux because, like stated: Folder de != Folder DE. Specially if the source for the data is User Input.
So anyway there is no link between OS and what we see in Setup regards the folder and I dont see a reason why to force it to be lowercase.
If one is using the REST API or even the ansible automation I would expect that this individual has some technical experience and is aware of the situation in IT that a!=A.
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.