Forum Discussion
The way you would "ingest" the data is to have that script run on a Collector. If running the collector is a problem, you could always run it in a container in the cloud.
There are several advantages to this vs. trying to use the API to ingest the data:
1) your UltraDNS credentials can be safely stored in LogicMonitor without hard coding them into your script.
2) Once you get authenticated to UltraDNS' API, you'd only need to output the data in a specific format, which isn't hard to do.
The authentication to UltraDNS' API would be the same whether your running it on the Collector or on your laptop or on another server you might be building. As @Michael Rodrigues mentioned, the Santaba http classes won't be easy to get working on another system, so you may as well develop it
Once you get it working, you'd:
1) Add the UltraDNS API as a resource in LogicMonitor. Simply go to your resources page and click Add >> One Device >> Expert.
a) Use "api.ultradns.com" as the "IP Address/DNS name"
b) Give it whatever Name you'd like it to display as. "UltraDNS API" would work fine.
c) Choose the Collector that will monitor it
d) Add it into any static group (optional)
e) Add a property called "system.categories" with a value of "NoPing" (optional, this will disable ping checks on the API)
f) Add a property called "ultradns.user" with the value of whatever your username is
g) Add a property called "ultradns.pass" with the value of whatever your password is
h) Add a proeperty called "ultradns.accountName" with the value of your UltraDNS account name
2) Create the UltraDNS DataSource. Go to Settings >> DataSources and click the Add >> DataSource option
a) Choose an appropriate Name, Displayed as, Description
b) Put in the Technical notes information about how this depends on the properties mentioned above existing on the device
c) In the AppliesTo, put "ultradns.accountName && ultradns.pass && ultradns.user". You could experiment with other expressions, but this one is the simplest.
d) Choose "Script" for the collector and choose your desired poll rate.
e) Modify your script, replacing the literal username and password with the hostProp.get() calls you have in the first posted copy of your script. This is what will bring the property values into the script at runtime.
f) Make sure your script output matches LM's scripted output format.
g) Paste your script into the "Groovy Script"
h) For each datapoint of your output, create a datapoint with the corresponding key
i) You can test your script at this point, but it should work the same as it did on your laptop.
I'm available to guide you through that process, but using a Collector is the way.
Related Content
- 8 months ago
- 17 hours ago
- 2 years agoAnonymous
- 10 months ago