cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can I use the resolvedIps from an HTTP Monitor result into a validation?

dannemca
DynaMight Guru
DynaMight Guru

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

 

Site Reliability Engineer @ Kyndryl
15 REPLIES 15

bill_smith
Dynatrace Enthusiast
Dynatrace Enthusiast

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

@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/ 

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

Ah, I indeed misunderstood 😉 (next time, I'll read through the entire thread first, hahaha!)

dannemca
DynaMight Guru
DynaMight Guru

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

Site Reliability Engineer @ Kyndryl

bill_smith
Dynatrace Enthusiast
Dynatrace Enthusiast

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

AntonioSousa
DynaMight Guru
DynaMight Guru

@dannemca,

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?

Antonio Sousa

dannemca
DynaMight Guru
DynaMight Guru

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.

Site Reliability Engineer @ Kyndryl

bill_smith
Dynatrace Enthusiast
Dynatrace Enthusiast

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

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...

 

Antonio Sousa

techean
Dynatrace Champion
Dynatrace Champion

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

KG

dannemca
DynaMight Guru
DynaMight Guru

Thanks all for the suggestions here. We will take a look on the DNS extension or even another similar solution.

Site Reliability Engineer @ Kyndryl

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. 

Kind regards, Frans Stekelenburg                 Certified Dynatrace Associate | measure.works, Dynatrace Partner

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.

Site Reliability Engineer @ Kyndryl

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.

Kind regards, Frans Stekelenburg                 Certified Dynatrace Associate | measure.works, Dynatrace Partner

Featured Posts