What language is used to create the default check commands

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

What language is used to create the default check commands

Postby dhlao » Sun Sep 12, 2021 11:26 pm

Just curious about what the default check commands such as "check_ping" and "check-dummy" inside "/libexec" are written in. They're clearly not written in plain text scripts but instead compiled.
I'm planning to make my own check command and want to use the same language that used by Nagios, nothing special, just my personal preference.
While Nagios Core is said to be open source, I don't know if the source codes of those commands are open to public too. It would be nice if I can have some for reference.
dhlao
 
Posts: 9
Joined: Thu Apr 29, 2021 10:23 am

Re: What language is used to create the default check comman

Postby mcapra » Mon Sep 13, 2021 8:05 am

C, for the most part:
https://github.com/nagios-plugins/nagios-plugins

Some Perl, Bash, and Python in there too. Depends on the specific plugin you're looking at.

Here's check_ping and check_dummy:
https://github.com/nagios-plugins/nagio ... ck_dummy.c
https://github.com/nagios-plugins/nagio ... eck_ping.c

But you can write a plugin in practically any language:
https://nagios-plugins.org/doc/guidelines.html

And many mainstream languages already have libraries for writing plugins:
https://pypi.org/project/nagiosplugin/
https://pkg.go.dev/github.com/olorin/nagiosplugin
https://metacpan.org/pod/Monitoring::Plugin
https://crates.io/crates/nagiosplugin
Former Nagios employee
https://www.mcapra.com/
User avatar
mcapra
 
Posts: 3711
Joined: Thu May 05, 2016 3:54 pm

Re: What language is used to create the default check comman

Postby dhlao » Tue Sep 14, 2021 5:00 am

Thanks mcapra, I'll go for C then, as I like to compile.
dhlao
 
Posts: 9
Joined: Thu Apr 29, 2021 10:23 am


Return to Community Support

Who is online

Users browsing this forum: No registered users and 26 guests