Page 1 of 1

custom plugin scripts - perl Vs shell

Posted: Fri Jun 15, 2012 10:14 am
by sebastiaopburnay
Hi,

I'm using Nagios since a while ago, but only now I'm begining to design my own plugins.

I'm wondering which is the best language to develop my plugins.

In the meanwhile I will stick to shell because it is raw, fast and it avoids some issues I've had with perl's libraries and paths.

I will still consider the use of perl because I know for a fact that it is very handy with complex parsing.

In the meanwhile I would like to read some feedback drom contributing Gurus :)

Re: custom plugin scripts - perl Vs shell

Posted: Fri Jun 15, 2012 10:31 am
by agriffin
For very simple plugins, it doesn't matter. For anything a little more complicated, it's easiest to write in a language with a Nagios plugin library available. Right now that pretty much limits your choices to Perl or Python. The official plugins are mostly written in C, but unfortunately none of the support functions you might want to take advantage of are split into a separate library.

I've also been working on library for the Go programming language here (although I haven't pushed my latest changes online yet... I need to get around to that). I think Go is an interesting choice for plugin development since it occupies a niche right between C and scripting languages in terms of efficiency and ease of development.