How to customize configuration monitoring

I’m now implementing custom configuration monitoring through here

But if there are a lot of computers, you’re too tired.

So refer to here

  1. sudo mkdir -p /data/scripts

  2. vim /etc/icinga2/constants.conf
    const CustomPluginDir = “/data/scripts”

3.vim /data/scripts/

4.vim /etc/icinga2/conf.d/check_my_tcp.conf
object CheckCommand “check_my_tcp” {
command = [ “/data/scripts/” ]
arguments += {
“-P” = “$PORT$”

service restart icinga2

but No success,Is it any worse there?

Director does not read files edited in the /etc/icinga2 directory after the initial import ( even that is not “read” but DB representation of the objects) , so the modifications that you did in the configuration files will not be presented in the Director UI.

If you want to add the new custom check in the config files then you need to use only those, if you want to use the Director, then you will need to use only it

1 Like

You can use both ways. Just run the director wizard again, to update the configuration inside the director. But its not possible to edit the imported configurations inside the director.

1 Like

Okay, thank you all.