I am trying to create a simple http monitor to check for the resolved IP from an URL.
Such like this: Do a get on https://www.dynatrace.com and check for its resolvedIps, to cross check with a specific range of IPs I have, and if the IPs are not the same, I want to make it fail/alert.
I can see its values when analyzing the last execution, so data is there, but how to use it on the pre/post execution to do the compare trick?
Anyone has a clue?
Solved! Go to Solution.
The work done by the HTTP monitor to gather the resolved IP address(es) is outside the scope of the pre/post-execution scripts, so they wouldn't be able to get that information directly. You could use an API to get data from previous executions of the script, but the IP could be different from the current execution. Check if the server being monitored responds with a response header containing its IP address.
A better solution would be to use an ActiveGate extension to perform IP lookups. We don't have a DNS-specific extension right now, but one could be developed by one of our services teams.
Hi @AntonioSousa , a client need to monitor an external SFTP provider, they do not use the fqdn, but the IP instead. The problem is that the provider did changed the IP in past and their application could not reach the sftp anymore.
They were just checking if Dynatrace could do something out of the box in this case. I did suggested the Synthetic, since they can not use oneagent.
I think the Ping extension would be a good solution for them, as long as the SFTP server is pingable. You can provide IP addresses or FQDN's. In the portal, go to Settings-->Monitoring-->Monitored technologies-->Custom extensions to find it and links to documentation.
Still a little bit confusing to me. You have some application that uses an external SFTP provider, but that connection is done without the FQDN, but I suppose the IP address. So any change in the IP would of course make the application not reach the new server. But, you have a FQDN for that server, and would like to check if it changes IPs, is that it? If this is the case, than a DNS extension is the way to go, as suggested...
just suggesting a way, the customer can add a dummy host entry in ETC/hosts file to map the called IP to a FQDN. The customer should start using FQDN from their application.
I dont know if calling the FQDN would add value here, but its always recommended to call a FQDN using etc hosts. Anytime in future if the SFTP ip changes, the customer needs to update the same in their vm etc/host file
hi @dannemca , I ran into a customer with a similar request (currently fulfilled with Nagios). How did you go with this topic? Case is that a 3rd party supplier sometimes changes IP addresses without notice, which makes certain applications to fail that are still bound to the old address.
We end up using a custom script running in the client host and sending event data to Dynatrace using API, as basic as seems so. They do test the DNS/resolved IPs with curl/nslookup commands, and compare with a pre-defined IP list. If any difference, an event API is called, generating a Problem.
Thanks, Danne. That seems indeed a workaround path to follow.
I actually see already quite a view Product Ideas regarding this topic (DNS/IP test, with synthetic.