I want to set up a service to monitor a specific port 5643 on Centreon 21.04.2 on one of my hosts. I just need to be alerted if it is up, or down. I’ve done some search's but haven’t come up with a way to do it.
Anyone got any tips or suggestions for me?
Thanks,
Steve Arnold
Page 1 / 1
Yo @sarnold02 ,
You can use the plugin apps::protocol::tcp::plugin like this:
/usr/lib/centreon/plugins/centreon_protocol_tcp.pl --plugin apps::protocols::tcp::plugin --mode response-time --hostname=127.0.0.1 --port=22 OK: Response time on port 22 is 0.002s | 'tcp.response.time.seconds'=0.002491s;;;0;
The plugin have a default threshold to alert you if the port is closed (see --help):
/usr/lib/centreon/plugins/centreon_protocol_tcp.pl --plugin apps::protocols::tcp::plugin --mode response-time --hostname=127.0.0.1 --port=23 CRITICAL: Connection status on port 23 is failed: error=Connection refused | 'tcp.response.time.seconds'=0.001444s;;;0;
OK I’m a newbie and I’m working from the web interface. I think I have the right plug-in but I’m not sure how to fill in the values, here is what I have:
How do i fill this out?
Hello @sarnold02 ,
Do not worry, we are to help you :)
You just need to fill:
PORT: the port that you want to test ;
WARNING: warning threshold in s (if you want to get a warning if the response time is above x s). You can set up 1 for 1s for example;
CRITICAL: critical threshold, could be 2 ;
EXTRAOPTIONS: In case you want to add other options from the plugin without recreate a new command :)
So basicaly, only the port could be enough for your need.
hmm I though that I had it working, but when I created it I get errors:
Total size: 37 k Installed size: 220 k Is this ok iy/d/N]: d Is this ok iy/d/N]: y Downloading packages: warning: /var/cache/yum/x86_64/7/centreon-stable-noarch/packages/centreon-plugin-Applications-Protocol-Tcp-20220414-091353.el7.centos.noarch.rpm: Header V4 RSA/SHA1 Signature, key ID 3fc49c1b: NOKEY Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CES
The GPG keys listed for the "Centreon open source software repository." repository are already installed but they are not correct for this package. Check that the correct key URLs are configured for this repository.
Failing package is: centreon-plugin-Applications-Protocol-Tcp-20220414-091353.el7.centos.noarch GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CES
I followed those instructions, but i still get the same error:
Failing package is: centreon-plugin-Applications-Protocol-Tcp-20220414-091353.el7.centos.noarch GPG Keys are configured as: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CES
Let’s do something dirty and try --nogpgcheck to your yum command.