You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Windows, if you have identical script names in a subfolder in the NCPA Plugins directory, the subfolder copy of the script is executed when Nagios makes the call, even though the logs indicate the script in the root of the Plugins directory is executed.
For example, your Plugins directory is:
C:\Program Files\Nagios\NCPA\plugins\
It contains a script: hello.ps1
Contents:
Write-Host "Hello"
exit 0
You have a subdirectory inside of the Plugins directory:
C:\Program Files\Nagios\NCPA\plugins\backups\
It contains an old copy of the script, with the same name: hello.ps1
Contents:
Write-Host "Goodbye"
exit 0
When you have nagios execute the script in the root of the plugins folder, it actually executes the one in the subfolder.
check_ncpa.py -H $HOSTADDRESS$ -t $TOKEN$ -P 5693 -M 'plugins/hello.ps1' -q ''
Output: Goodbye
The text was updated successfully, but these errors were encountered:
This also occurs on Linux. I have been able to replicate on both Windows and Linux and suspect we will need to modify the functionality to require specification of a directory if there are multiple instances of plugins with the same name. If anyone has suggestions or disagreements on this, let me know!
In Windows, if you have identical script names in a subfolder in the NCPA Plugins directory, the subfolder copy of the script is executed when Nagios makes the call, even though the logs indicate the script in the root of the Plugins directory is executed.
For example, your Plugins directory is:
C:\Program Files\Nagios\NCPA\plugins\
It contains a script: hello.ps1
Contents:
Write-Host "Hello"
exit 0
You have a subdirectory inside of the Plugins directory:
C:\Program Files\Nagios\NCPA\plugins\backups\
It contains an old copy of the script, with the same name: hello.ps1
Contents:
Write-Host "Goodbye"
exit 0
When you have nagios execute the script in the root of the plugins folder, it actually executes the one in the subfolder.$HOSTADDRESS$ -t $TOKEN$ -P 5693 -M 'plugins/hello.ps1' -q ''
check_ncpa.py -H
Output: Goodbye
The text was updated successfully, but these errors were encountered: