Problem/Motivation
I created a small custom nagios module with drush gen and for hook implementation it took example code from nagios.api.php but I got errors because of missing array keys. I figured out that the hook example fits to the internal functions in nagios.module which are called from own hook implementation nagios_nagios() but doesn't work for hook implementation in other modules.
Steps to reproduce
Use Example code as described in nagios.api.php:
return [
'key' => 'IDENTIFIER',
// This identifier will appear on Nagios' monitoring pages and alerts.
'data' => $data,
];
Proposed resolution
Use this code and the data are processed properly:
return [
'IDENTIFIER' => $data,
];
Remaining tasks
Change nagios.api.php acdording to how the hook data are currently processed. Maybe check documentation and update if needes.
User interface changes
No.
API changes
No.
Data model changes
No.
Issue fork nagios-3583931
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
c-logemannComment #4
gogowitsch commentedMerged!
Thank you for your contributions, @c-logemann and @tunic!
I have created a new release, 8.x-1.26.