[icinga-users] Any way to modify the output of a Service check from configuration files?

Ivo Kidze ivo.kidze at duke.edu
Fri Oct 26 16:52:05 CEST 2018


Hi,

Some plugins have the -l label option.
check_snmp
-l, --label=STRING
        Prefix label for output from plugin

Which plugin are you using? 

Kind Regards,
Ivo Kidze

-----Original Message-----
From: icinga-users [mailto:icinga-users-bounces at lists.icinga.org] On Behalf Of Antony Stone
Sent: Friday, October 26, 2018 10:51 AM
To: Icinga User's Corner <icinga-users at lists.icinga.org>
Subject: Re: [icinga-users] Any way to modify the output of a Service check from configuration files?

On Friday 26 October 2018 at 16:47:56, Michael Friedrich wrote:

> Hi,
> 
> short answer: no.

Ah, okay :(

> Long answer: The output and performance data isn’t modified by the 
> core when running a command and receiving its output. It is split out 
> into various values according to the plugin API specification (output, 
> parsed performance data) but there is no user action allowed here.

Hm, I suspected as much.

> If you need values like the hostname, you can pass these attributes as 
> command line argument thus requiring the plugin to read it and add it 
> to the output.

Indeed, I've done that for a couple of plugins I wrote myself, but then wondered if there was an easier way when it came to others which I didn't (and are compiled, not scripted in bash, perl, etc).

Thanks anyway.


Antony.

--
The first fifty percent of an engineering project takes ninety percent of the time, and the remaining fifty percent takes another ninety percent of the time.

                                                   Please reply to the list;
                                                         please *don't* CC me.
_______________________________________________
icinga-users mailing list
icinga-users at lists.icinga.org
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.icinga.org_mailman_listinfo_icinga-2Dusers&d=DwIGaQ&c=imBPVzF25OnBgGmVOlcsiEgHoG1i6YHLR0Sj_gZ4adc&r=dLhm7TMuuUAhZaaelXPoEPyMbTqxkar-G5Ayny5-yLE&m=rnGjveBV86hOrleJz5j6ugjkxvh51g_g75SWOE6ZQWs&s=Q-OoqCI2_vNJNkKnnj9pIENL3B-w7aplXrF5c8yMT_w&e=


More information about the icinga-users mailing list