It appears that you do not have the correct API permissions to insert Insights data. Check the documentation for the type of key you require.
Folks this is great but How evaluate self signed certificates? Is it possible?
I have an issue with this script when an “url to monitor” has no A record but only a CNAME record where it refers to. When executing the script it 's aborting with this error when executing the check on the url with the CNAME:
Error: getaddrinfo ENOTFOUND myURL myURL:443
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:57:26)
How can I change the script CNAME is also resolved? Or how to change the script it doesn’t stop when one of the “urls_to_monitor” have a DNS resolving issue and putting something in the logging to monitor through NRQL but still execute the checks on the other “urls_to_monitor”