Hi, Here is the service: apply Service "MySQL uptime" { import "generic-service" check_command = "check_mysql_health" vars.mysql_mode = "uptime" assign where host.vars.servicename == "mysql" }
The host is defined automatically by the satellite in /etc/icinga2/repository.d/hosts/: object Host "LONL3AOMMySQL" { import "satellite-host" check_command = "cluster-zone" *vars.servicename = "mysql"* } The servicename variable was then added manually. The error I am having is that I think it uses the details of the Icinga server instead of the satellite when trying to connect to MySQL. Here is the command definition: object CheckCommand "check_mysql_health" { import "plugin-check-command" command = [ CustomPluginDir + "/libexec/check_mysql_health" ] arguments = { "--hostname" = "$address$" "--username" = "$mysql_user$" "--password" = "$mysql_password$" "--mode" = "$mysql_mode$" "--name" = "$mysql_object$" "--name2" = "$mysql_statement$" "--method" = "$mysql_connection_method$" "--warning" = "$mysql_warning$" "--critical" = "$mysql_critical$" "--unit" = "$mysql_unit$" } vars.mysql_user = "nagios" vars.mysql_password = "password" } Basically I would like to know how to pass the relevant information to the check command, the host ip address in this case. On Thu, 18 Jun 2015 at 12:49 Tobias von der Krone < icinga+us...@vonderkrone.info> wrote: > Hi Bertalan, > > this is possible. Maybe you use "endpoint_name" in the service > definition which is wrong here. If not, please show your host and > service config. > > Regards, > Tobias > > On 2015-06-18 11:59, Bertalan Voros wrote: > > Hello All, > > > > I would like to use both agentless and agent based checks against > > some of our monitored hosts. > > > > I am using Icinga2 as a satellite node configured with the wizard on > > our linux systems, all is well. > > > > I am having problems when I try to apply services that would be > > executed from our Icinga2 server. > > > > This is using a plugin that worked before against the same host when > > it was set up agentless, so I know that the check command an plugin is > > OK. > > > > Specifically it's the check_mysql_health plugin that I don't want to > > have to install on the monitored host if not necessary. > > > > Any help will be appreciated. > > > > Bertalan > > _______________________________________________ > > icinga-users mailing list > > icinga-users@lists.icinga.org > > https://lists.icinga.org/mailman/listinfo/icinga-users > > -- > Regards > Tobias > _______________________________________________ > icinga-users mailing list > icinga-users@lists.icinga.org > https://lists.icinga.org/mailman/listinfo/icinga-users >
_______________________________________________ icinga-users mailing list icinga-users@lists.icinga.org https://lists.icinga.org/mailman/listinfo/icinga-users