On Monday 24 October 2016 at 22:37:22, Gerald Vogt wrote:
> On 24/10/2016 22:05, Antony Stone wrote:
> >
> > So, I'm trying to work out where the 10% and 20% default thresholds are
> > defined.
>
> Well, I would run this:
>
> # icinga2 object list -t CheckCommand -n disk
>
> which would tell you something like this:
> > Object 'disk' of type 'CheckCommand':
> > % declared in '/usr/share/icinga2/include/command-plugins.conf', lines
> > 958:1-958:26 * __name = "disk"
> And of course look at the definition in the mentioned file
> /usr/share/icinga2/include/command-plugins.conf for the exact definition.
Aha - excellent info - useful to know.
> > I'm trying to find a way to define the SSH-based checks using the same
> > thresholds as the standard checks
> Well, that's pretty straight forward as you have to use the "disk"
> definition and supplement it with the by_ssh definition. For instance
> like this:
>
> object CheckCommand "by_ssh_disk" {
> import "disk"
>
> vars.by_ssh_command = command
> vars.by_ssh_arguments = arguments
>
> import "by_ssh"
>
> vars.by_ssh_logname = "icinga"
> vars.by_ssh_quiet = true
> }
Splendid, thanks - that works really nicely. My mistake was that I had put
the two "import"s together at the top of the definition.
"import"ing the "by_shh" *after* setting the comand and arguments array is
important :)
Thanks for the help,
Antony.
--
If you can smile when all about you things are going wrong, you must have
someone in mind to take the blame.
Please reply to the list;
please *don't* CC me.
_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users