Plugin to Execute any OS Command I specify

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
gregbeyer
Posts: 181
Joined: Fri Sep 11, 2020 2:13 pm

Plugin to Execute any OS Command I specify

Post by gregbeyer »

Hi, I'm looking for a plugin that I can use, or maybe modify, that will execute an arbitrary CLI command. We are a high performance computing shop, and we use a piece of software, Slurm, from SchedMD for scheduling compute jobs. Slurm installs CLI utilities that we use to manually check queues and jobs. I find no plugin for slurm on Exchange. I would like to run a couple of these slurm utilities as I would any Nagios check, and OK/Warn/Critical on output.

Has anyone else used a plugin in this context to execute a specific OS or application command available on a box? What plugin did you use? Thanks for any leads/ideas.
danderson

Re: Plugin to Execute any OS Command I specify

Post by danderson »

Thanks for reaching out @gregbeyer,

Here are the development guidelines in case you are willing to write your own plugin for this.

To be honest, I think you could write a simple bash script that runs the command and makes sure the return code of the command conforms to the required return codes for the plugins.

What would be an example command you would want? What kind of information would you want from the plugin? I might be able to write a quick one.
User avatar
jmichaelson
Posts: 375
Joined: Wed Aug 23, 2023 1:02 pm

Re: Plugin to Execute any OS Command I specify

Post by jmichaelson »

I agree with danderson. You may want to have it be a slightly more complex script that takes the specific slurm command as a command line option and then everything else after that, so you only have one script to maintain. e.g.,

Code: Select all

./check_slurm subcommand option1 option2 option3.....
Please let us know if you have any other questions or concerns.

-Jason
Post Reply