New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[dev.icinga.com #13391] How do I setup nrpe service templates? #638
Comments
Updated by mbassett on 2016-12-02 21:59:03 +00:00 Do i need to create fields for all of the vars? Is there a list of which things are macros and which need to be fields? I don't see any examples in the documentation |
Updated by mbassett on 2016-12-02 23:06:17 +00:00 i believe i have this working but would still like someone to confirm this is the correct way to do it. create fields: Create command: Create service: Attach service to host template |
Updated by mbassett on 2016-12-03 00:01:34 +00:00 This mostly works, except for the nrpe_arguments. I cannot get working nrpe arguments. check_memory needs -w 90 -c 95 passed to it, but using -a they get passed as individual arguments. if i try to quote the arguments the nrpe daemon squawks saying invalid metacharacter " |
Updated by tgelf on 2016-12-05 13:23:44 +00:00 Honestly I didn't even try it out, but using an array field for -a (and adding every key/value arg pair as a single entry) should work fine. |
Updated by mbassett on 2016-12-13 19:40:16 +00:00 I believe my issue is an instance of http://tracker.nagios.org/view.php?id=222 centos7 only has nrpe version 2.15 Looks like i need to abandon this route and go for icinga agent instead. |
This can be closed. |
Thanks! Just curious, have you been able to figure out how it works - or did you opt for the Agent instead? |
I went with icinga agent instead. My issue was with the NRPE version installed in centos |
I had similiar issue with passing argument to nrpe. I workaround the issue. More details here. http://serverfault.com/questions/702586/error-with-using-nrpe-with-icinga2 |
This issue has been migrated from Redmine: https://dev.icinga.com/issues/13391
Created by mbassett on 2016-12-02 20:41:22 +00:00
Assignee: (none)
Status: New
Target Version: (none)
Last Update: 2016-12-13 19:40:16 +00:00 (in Redmine)
I attempted to build a check-via-nrpe service that i could use to run multiple kinds of nrpe checks. I built the fields and tried to replicate the nrpe imported service as closely as i could and applied this to nodes. I tried using the$HOSTADDRESS$ macro but when the check tried to execute it claimed there was no such macro even though icinga2 docs say that macro should be present everywhere. I tried several ways to get it to work and ended up deleting all my work. What is the correct way to do this?
director imported the existing nrpe service from icinga2 core api but i'm not sure really how to use this.
object CheckCommand "nrpe" {
import "plugin-check-command"
command = [ PluginDir + "/check_nrpe" ]
timeout = 5m
arguments += {
"-4" = {
description = "Use IPv4 connection"
set_if = "$nrpe_ipv4$"
}
"-6" = {
description = "Use IPv6 connection"
set_if = "$nrpe_ipv6$"
}
"-H" = "$nrpe_address$"
"-a" = {
order = 1
repeat_key = false
value = "$nrpe_arguments$"
}
"-c" = "$nrpe_command$"
"-n" = {
description = "Do not use SSL."
set_if = "$nrpe_no_ssl$"
}
"-p" = "$nrpe_port$"
"-t" = "$nrpe_timeout$"
"-u" = {
description = "Make socket timeouts return an UNKNOWN state instead of CRITICAL"
set_if = "$nrpe_timeout_unknown$"
}
}
vars.check_address = {
type = "Function"
}
vars.check_ipv4 = "$nrpe_ipv4$"
vars.check_ipv6 = "$nrpe_ipv6$"
vars.nrpe_address = "$check_address$"
vars.nrpe_no_ssl = false
vars.nrpe_timeout_unknown = false
}
The text was updated successfully, but these errors were encountered: