How to monitor a host with TCP without agent?

Started by jonasc, June 29, 2016, 04:46:31 PM

Previous topic - Next topic

jonasc

Hi!

I know that this is such a newbie question but I've tried to accomplish this for many days.
My colleagues have looked into it as well without result.

Let's say I want to monitor www.netxms.org and make sure it responds to TCP on port 80
As I understand there are some options:

1. Create a node and a network service
This is a straight forward thing but:
- According to a post in the forum this is the deprecated way and DCIs should be used instead.
- Templates cannot be used, as with DCIs
- The status calculation doesn't seem to work properly; When the service is down and comes back again the node still shows down.
   After terminating the error it goes away but after that never goes into alarm mode again even though the network service is down.

2. DCIs
This is perfect when you can use templates but since the new 'www.netxms.org'-node get SYS_DCI_UNSUPPORTED I guess it can't handle netxmsagent-DCIs.
I mean, www.netxms.org does not have the Netxms agent installed.

3. According to a forum post this should maybe be handled by adding DCIs under the netxms-server.
It feels wrong but maybe this is the way to do it?


I like number 1 best because you can see in the tree what's being monitored, the network services are added below the node and the whole supportteam can see it all clear.


So... what do you pros think the best way is?

Thanks in advance

tomaskir

#1
As for 2), you need to create the DCI on the "netxms.org" node, but set the source node to the server.
You will find this option in the DCI configuration.

This mean your NetXMS server will poll the data, but the DCI will display correctly on the "netxms.org" node.

jonasc

Thanks for your reply!
If you mean "source node" as poller node on the DCI i created on the netxms.org-node i tried that.
The problem I get is that the parameter list I expected to see when I clicked [Select] is empty.

jonasc

#3
Sorry, I found poller node on the netxms.org-node.
thanks I'll give it a shot.

Update:
After changing to netxms-server as poller node on "netxms.org"-node I created a DCI and selected "Netxms agent".
This still gives me an empty parameters list when I hit [Select].

Any ideas?
thanks

jonasc

Hello dear friends!

I still don't get it right...

Attached are some screenshots of what I see.
I created a new netxms.org-node

_new_node shows just what I see when I create the new node.
_polling shows the polling settings <server> is there as default, I also tried changing that to the server "netxms"
_new_dci shows the new DCI-form you all know
_parameters_empty shows what I see when I click [select]. On a node with netxmsagent installed this list is full of goodies, but not now.
For appearent reasons I can't install the agent on all websites and gear I want to monitor with TCP.

Thanks for your patience


Tursiops

Set the "Source Node" in your third screenshot to be your NetXMS server.
This will tell NetXMS to run your check on the NetXMS server, but the results will display on the DCI on your netxms.org node.

You will not see any available parameters on your netxms.org node, as it does not have an agent running on it.
However, you can right-click on your NetXMS server node and go to Tools -> Info -> Agent -> Supported parameters.
This will give you a list of what's available. You will have to manually enter/type the one you want to use into the DCI on your netxms.org node.



jonasc

I'm really sorry. I must be slow...

I have tried everything you describe and what was described above too.
Unsupported DCI, error with timestamp 1970-01-01 etc etc comes up.

So, I shouldn't use poller node?
Is it source node on the DCI that should be used for this purpose?

I created a template, netxms agent origin, selected "ServiceCheck.HTTP(*)".
Set source node as netxms1 (my netxms server).
Applied it to the netxms.org-node.

The status of the DCI under netxms.org is "Not supported".

- All I want to do is monitor www.netxms.org port 80 and get an alert if it doesn't respond to TCP on port 80.
This must be the worlds simplest task and I am unable to understand how I should do it.
I'm really sorry for my newbie questions. I thought 22 years of experience would be enough, obviously it's not.

tomaskir

It a bit more complicated for "netxms.org", because it doesnt respond to ping.

I created a step-by-step tutorial for you:
https://wiki.netxms.org/wiki/Step_by_step_service_monitoring

Please note, that for a website that responds to ping, it would be much simpler :)

jonasc

Thank you very much for your wiki!!
Very serious!

I have a few comments:

1. "Special note: in NetXMS 2.0.4 and older, there was a bug that would create a node down alarm.
Please terminate this alarm on this node before proceeding further in the tutorial if running a version older than 2.0.5 (or 2.1)."

That really confused at first but now when I got it confirmed that it's a bug I'm satisfied:-) Thanks for the confirmation.


2. "We create a new DCI. Make sure Origin is set to NetXMS Agent, press Select, and find ServiceResponseTime.Custom(*)."

Why not use "ServiceResponseTime.HTTP(*)"?


3. "We will create another DCI, this one will be used to check just if the website is up or down."

Is this a redundant post?
I mean, we don't need to create two DCIs, do we?


Thanks again for your serious respons!
I didn't expect that:-)

tomaskir

2) To make the tutorial shorter and more generic-oriented, I chose just custom port check.
Feel free to use actual HTTP service checking (and setup the DCI accordingly).

3) Its not redundant. We need this 2nd DCI for node status calculation.
The DCI used for node status calc must return values consistent with object status codes.
This is why it has the transform script, and has the "Use for status calculation" checked.

We cant use the ServiceResponseTime DCI, because we want to have actual historic values of the response time.
So this one we dont want to / cant use for status calc.

As mentioned, this would not be needed if the node responded to ICMP, and status poll would just use ICMP for status calculation.

jonasc

#11
Hi again!

After creating the template DCI and assigning it to the netxms.org-node I get this "UNSUPPORTED" message.
See enclosed image

Also, the "last values" page on the node is empty.

tomaskir

Are you sure you have the portcheck SubAgent enabled on your NetXMS server?

jonasc

Atleast I've got:

SubAgent = portcheck.nsm

in the nxagentd.conf

I have no other way of checking if it's ok.
It had the value from start so I haven't added anything in the conf-file, just verified that the entry was there.

tomaskir

Ok, this will probably be much faster in person.

Feel free to add me on Skype at t.kirnak[at]atris[dot]sk.