W
W
wolverine7772019-06-22 02:27:00
Nagios
wolverine777, 2019-06-22 02:27:00

How to write plugins for Nagios?

Hello, I need to write the first plugin in my life (for educational purposes) for Nagios that will ping a remote server and that's it.
The simplest thing that was enough for me today is

#!/bin/bash
ping  192.168.0.37;

Where 192.168.0.37 is the ip of the remote host (which is visible in the hosts list)
As a result, the following is displayed in the list of plugins:
5d0d674b1e8ea496058284.png
How to be? Is there a tutorial or instruction somewhere?
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alex-du, 2021-03-03
@alex-du

<NAME> <STATE> - <text> [| <perfdata>]
---
<NAME> - имя, MY_PLUGIN
<STATE> - возврат скрипта: OK/WARNING/CRITICAL/UNKNOWN/PENDING
<text> - какой-то текст возврата из скрипта
<perfdata> - данные для построения графика/ов

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question