23 Apr 2022 05:28 PM
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?
...
"responseHeaders": [],
"responseBody": "",
"resolvedIps": [
"ONE.IP.ADDRESS.HERE",
"OTHER.IP.ADDRESS.HERE"
],
"healthStatusCode": 15,
"healthStatus": "CONNECTION_TIMEOUT",
"responseMessage": "",
...
Thanks
Solved! Go to Solution.
04 May 2022 05:26 PM
Hi Danne,
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.
Thanks!
Bill
05 May 2022 04:14 PM
@bill_smith perhaps I'm misreading or misunderstanding your comment regarding no DNS extension that exists... 🤔 https://www.dynatrace.com/hub/detail/synthetic-monitor-dns/
05 May 2022 04:27 PM
Hi @andre_vdveen ,
The extension in that link is meant to monitor the domain name services on the servers. Danne needs something that tests specific domain name requests to make sure the right IP address(es) is returned.
Thanks!
Bill
05 May 2022 04:30 PM
Ah, I indeed misunderstood 😉 (next time, I'll read through the entire thread first, hahaha!)
04 May 2022 06:45 PM
Thanks, @bill_smith.
Will this custom extension creation has a cost, or as per this post, it will just consumes the DDU when used?
Thanks
04 May 2022 09:04 PM
Hi Danne,
The policy for existing extensions is to charge only for DDU's consumed by the extension. To have a new one created, I don't know the policy, so please contact your Dynatrace Account Executive for details.
Thanks!
Bill
04 May 2022 07:22 PM
Just wondering, what would be your usecase? You mentioned having a list and validating against it? In which cases are you expecting the resolved IP not to be in the list?
04 May 2022 10:07 PM
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.
04 May 2022 10:46 PM
Hi @dannemca,
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.
Thanks!
Bill
04 May 2022 11:17 PM
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...
05 May 2022 07:33 AM
Hi,
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
05 May 2022 02:58 PM
Thanks all for the suggestions here. We will take a look on the DNS extension or even another similar solution.
01 Nov 2022 10:29 AM
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.
01 Nov 2022 09:02 PM
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.
02 Nov 2022 10:05 AM
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.