Closed bieba closed 7 months ago
What happens if you try this and run
Test-IcingaAgent
after installation? It should check the permission for the folder and prompt you to change it in case it is wrong.
You just have to ensure the Icinga for Windows
and Icinga 2
service are running with the same user. Because we always expect it to be the same user.
While the installation is running
[Passed]: Icinga Agent service is installed
[Passed]: The specified user "NT AUTHORITY\NetworkService" is allowed to run as service
[Passed]: Directory "C:\ProgramData\icinga2\etc" is accessible and writeable by the Icinga Service User "NT AUTHORITY\NetworkService"
[Passed]: Directory "C:\ProgramData\icinga2\var" is accessible and writeable by the Icinga Service User "NT AUTHORITY\NetworkService"
[Passed]: Directory "C:\Program Files\WindowsPowerShell\modules\icinga-powershell-framework\cache" is accessible and writeable by the Icinga Service User "NT AUTHORITY\NetworkService"
[Passed]: Icinga Agent configuration is valid
[Passed]: Icinga Agent debug log is disabled
[Notice]: Restarting service "icinga2"
For me it seems that the installation of the icinga agent 2 is fixing the permission issue.
I tried to run
Test-IcingaAgent
but it gave me the error, Agent not installed. After installation it worked.
But thats somehow not the perfect solution. I ran into the issue, as I only re-installed the framework/plugins without re-installing the agent. I checked this behaviour again (deletion of framework/plugins and installing them again) and I can confirm that this is the problem. Right after re-installation of the agent it started working again.
I used the default user (network service) for both.
The problem right now is that the command only works while the Agent is installed. That's something we should re-work to make it non-dependent on the Agent.
Icinga for Windows v1.12.0 adds a new command
Test-IcingaForWindows;
which should resolve most of the test issues. In addition, the installer now properly handles permission updates during the installation.
I installed the background service within the framework and the plugins.
After configuring the background service it wasn't able to write its results to disk within each tick.
The permissions after installation:
Just for testing I added full permissions at the 'cache' folder level and it was working. I testet it one more and was running into the same problem.
OS: Windows Server 2012 R2 OS Language: german