redbob365
(*** Redbob)
1
Hi:
I created a service template check_Cockpit_socket
to check port 9090.
zones.d/master/service_templates.conf
template Service "check_Cockpit_socket" {
check_command = "check_cockpit"
}
based on check_cockpit
command:
zones.d/master/commands.conf
object CheckCommand "check_cockpit" {
import "plugin-check-command"
command = [ PluginDir + "/check_tcp" ]
zone = "master"
vars.address = "$address$"
vars.port = 9090
}
But the output is this:
Whis this 3306 port, instead of 9090? Where I did go wrong??
stevie-sy
(Stevie Sy)
2
Hi and welcome,
The configuration of the check looks good to me. So just some ideas:
- Did you test which programm is listing to these two ports (use the command netstat)?
- Did you configure a port forwarding on the server you want to check?
greets
Hello Redbob,
Your check command is missing the argument for “port”. Please review the check_commands online documentation.
object CheckCommand "check_cockpit" {
import "plugin-check-command"
command = [ PluginDir + "/check_tcp" ]
arguments = {
"-p" = {
value = "$cockpit_port$"
description = "Port number"
}
}
zone = "master"
vars.address = "$address$"
vars.cockpit_port = 9090
}
Regards
Alex