slauger / check_netscaler

A Nagios Plugin written in Perl for the Citrix ADC (formerly Citrix NetScaler). It uses the NetScaler NITRO API.
35 stars 18 forks source link

Check the expiry date of a local license file #83

Closed hampe4460 closed 3 years ago

hampe4460 commented 3 years ago

Hi, it's for sure not the right way to post this here, but I don't know another way. Even if I do the configuration as you wrote in your README, I don't get the check for the license files running with another user than nsroot. With nsroot ev. is working properly.

Always get this error --> NetScaler UNKNOWN - { "errorcode": 2138, "message": "Not authorized to execute this command [show system file -fileLocation \"\/nsconfig\/license\"]", "severity": "ERROR" }

I tried already to set the "add system cmdPolicy" command with user nagios and the effective user I use in the commend line. I am using the newest Version: v1.6.1

Thanks in advance

slauger commented 3 years ago

It seems that the cmdPolicy in the README.md does no longer work. I did a quick test and it is sufficent to grant read permissions to the system command for the license check.

add system cmdPolicy nagios_custom ALLOW "(^show\\s+system\\s+\\S+)|(^show\\s+system\\s+\\S+\\s+.*)"

This can be combined with the global (predefined) read-only policy for the other checks.

Bildschirmfoto 2021-07-10 um 22 00 07
github-actions[bot] commented 3 years ago

:tada: This issue has been resolved in version 1.6.2 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: