test of pultiple ports for same service on same host
Hello!
I would like to monitor the same TCP service, on the same host, but running on 2 different ports. In fact, I run an MX server and it should be opened on port 25 (of course), and also on port 587 (for local network authenticated submissions).
So I would like to monitor, on the same host, SMTP on port 25 and on port 587.
If I write "0.0.0.0 myhost # smtp smtp:587" in "bb-hosts", it does not work and only the last directive ("smtp:587") is taken into account.
What should I do? Create a new service in file "bb-services" called maybe "smtp-submission", cloning the "smtp" one and adding the 587 port? Or does somebody have another solution in mind?
Thanks.
-- Christian
On 4/2/2014 4:25 AM, Christian wrote:
Hello!
I would like to monitor the same TCP service, on the same host, but running on 2 different ports. In fact, I run an MX server and it should be opened on port 25 (of course), and also on port 587 (for local network authenticated submissions).
So I would like to monitor, on the same host, SMTP on port 25 and on port 587.
If I write "0.0.0.0 myhost # smtp smtp:587" in "bb-hosts", it does not work and only the last directive ("smtp:587") is taken into account.
What should I do? Create a new service in file "bb-services" called maybe "smtp-submission", cloning the "smtp" one and adding the 587 port? Or does somebody have another solution in mind?
I create an alias to the test name in protocols.cfg like this: [ftp] ==> [ftp|ftp1|ftp2|ftp3]
Then I can use a line in hosts.cfg like this: 0.0.0.0 foo.bar.com # ftp ftp1:2211 ftp2:2212
This reuses all/any of the ftp send/response strings in protocols.cfg which is nicer than copy/paste the whole section. The problem with this approach is updates to the Xymon application will repair protocols.cfg by keeping my modified definition _and_ reinserting the original.
-- Do things because you should, not just because you can.
John Thurston 907-465-8591 John.Thurston at alaska.gov Enterprise Technology Services Department of Administration State of Alaska
On 3 April 2014 03:11, John Thurston <john.thurston at alaska.gov> wrote:
This reuses all/any of the ftp send/response strings in protocols.cfg which is nicer than copy/paste the whole section. The problem with this approach is updates to the Xymon application will repair protocols.cfg by keeping my modified definition _and_ reinserting the original.
You can use the "include" keyword for protocols.cfg. So you could append "include protocols-local.cfg" at the end of protocols.cfg, and then put your re-definition into that file. Upgrades should leave your own version alone, and you only need to re-insert the include line to get it working again. If it's anything like the graphs.cfg file, later definitions (such as in files included at the end) will replace earlier definitions.
J
On 4/4/2014 6:15 AM, Jeremy Laidman wrote:
On 3 April 2014 03:11, John Thurston <john.thurston at alaska.gov> wrote:
This reuses all/any of the ftp send/response strings in protocols.cfg which is nicer than copy/paste the whole section. The problem with this approach is updates to the Xymon application will repair protocols.cfg by keeping my modified definition _and_ reinserting the original.
You can use the "include" keyword for protocols.cfg. So you could append "include protocols-local.cfg" at the end of protocols.cfg, and then put your re-definition into that file.
A couple of months ago, I dug through the documentation seeking just such an option. Your suggestion was enough to have me try it even without finding it in the doc. I didn't confirm the 'include' keyword worked because I really wanted the 'directory' function.
a'yep. It does.
I've appended: directory /opt/xymon/server/etc/protocols.d to server/etc/protocols.cfg and it happily consumes the files I put in that directory.
Upgrades should leave your own version alone, and you only need to re-insert the include line to get it working again. If it's anything like the graphs.cfg file, later definitions (such as in files included at the end) will replace earlier definitions.
Shucks. I didn't know it would work with graphs.cfg, too. I'm off to try the same thing there. Thank you, Jeremy!
Do things because you should, not just because you can.
John Thurston 907-465-8591 John.Thurston at alaska.gov Enterprise Technology Services Department of Administration State of Alaska
On Fri, April 4, 2014 8:04 am, John Thurston wrote:
On 4/4/2014 6:15 AM, Jeremy Laidman wrote:
On 3 April 2014 03:11, John Thurston <john.thurston at alaska.gov> wrote:
This reuses all/any of the ftp send/response strings in protocols.cfg which is nicer than copy/paste the whole section. The problem with this approach is updates to the Xymon application will repair protocols.cfg by keeping my modified definition _and_ reinserting the original.
You can use the "include" keyword for protocols.cfg. So you could append "include protocols-local.cfg" at the end of protocols.cfg, and then put your re-definition into that file.
A couple of months ago, I dug through the documentation seeking just such an option. Your suggestion was enough to have me try it even without finding it in the doc. I didn't confirm the 'include' keyword worked because I really wanted the 'directory' function.
a'yep. It does.
I've appended: directory /opt/xymon/server/etc/protocols.d to server/etc/protocols.cfg and it happily consumes the files I put in that directory.
Shucks. I didn't know it would work with graphs.cfg, too. I'm off to try the same thing there. Thank you, Jeremy!
The include and directory directives should work on anything opened using the file stack routines, which is pretty much most files except the cgioptions.cfg shell include.
HTH, -jc
participants (4)
-
cleaver@terabithia.org
-
jlaidman@rebel-it.com.au
-
john.thurston@alaska.gov
-
xymon@elysiria.fr