Hello Icinga Community!
I have started to build my icinga infrastructure.
Now I want to monitor my web service instances I have running on a windows server.
They are basically just one program.exe file launched multiple times with different command line arguments telling them to behave in a unique way.
They can be identified in the Task Manager by their unique “MainWindowTitle”, which tells what they are and what they do.
To monitor each instance’s memory an cpu usage I wrote my own c# check and and wanted to identify them by “system.diagnostics.process.mainwindowtitle”.
However this always returns empty when ran by the icinga agent. They always work when ran from cmd directly, even on the server.
After some research I found that the icinga agent is ran as a windows service which has a limited scope and is also not able to process window titles.
What I can read are:
- process id’s (immutable),
- process name (identical each time and immutable)
- process’s path (identical and immutable).
I tried iterating all windows like:
http://csharphelper.com/blog/2016/08/list-desktop-windows-in-c/
again only returning valid string when ran from cmd directly.
I tried running the service with administrator rights:
https://stackoverflow.com/questions/27263901/how-to-run-a-program-from-windows-service-with-administrator-privileges
which I checked worked but did not change anything.
Is it possible to run the icinga agent a regular program?
Is there some workaround for that?
Thanks for looking at it and kind regards
Pascal