Error when executing my own plugin

This forum is intended for the discussion of Nagios plugin development. Feature requests, patches, bug fixes, and all types of development-related discussions are welcome!

NOTE: The nagiosplug-devel mailing list has been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Error when executing my own plugin

Postby pedropedro » Sun May 20, 2018 9:25 pm

Hey all, i have developped a pluging that extract results from an Oracle database, it workin fine when i try to execute it in Terminal with the command: ./ --user=nagios --password=xxxx --database=xxxxx --port=1521 --request="SELECT username, expiry_date - sysdate, account_status FROM dba_users" --check_type=TEXT --warn=-1. The result is shown on the figure attached.

i add the plugin to the path /usr/local/nagios/libexec with permissions (chmod +x -> i have defined my command in commads.cfg also i have defined my service in windows.cfg i restared nagios succesfly ... but when i try to connect to my nagios core interface the service "Oracle_Server:My_Own_Plugin" doesn"t work .. i got the Error: Return code of 127 is out of bounds - plugin may be missing .. i don"t know what should i do to fix this .

look at the pictures attached please.
thanks for everyone that can help me.
plugin_work fine in terminal.PNG
Posts: 9
Joined: Mon Apr 02, 2018 3:31 am

Re: Error when executing my own plugin

Postby pedropedro » Mon May 21, 2018 4:59 am

Hy, you can lock this Post. i have solved this issue.
this is the modification for everyone with the same problem :)

in my configuration file commands.cfg:

define command {
command_name check_bdd_request
command_line /usr/local/nagios/libexec/ # In the fisrt time i don't set the name of plugin completely : i just
# write check_bdd_request , so nagios doesn't find the plugin: ( i add .pl)

hope i will help some one day with the same problem. :D ;)
Posts: 9
Joined: Mon Apr 02, 2018 3:31 am

Return to Nagios Plugin Development

Who is online

Users browsing this forum: No registered users and 1 guest