Forum Discussion
7 years ago
#!/bin/sh
USERN="iamabot"
PASSW="ohyouwannahaveaparty"
#PROXY="--proxy http://proxy.example.com:3128"
/usr/bin/env curl $PROXY -s \
"https://iamameatpopsicle.logicmonitor.com/santaba/rpc/getHosts?hostGroupId=1&c=iamameatpopsicle&u=${USERN}&p=${PASSW}" | \
grep -c '"type": "HOST",'
so do that, set up a datasource to absorb the return value.
Update the hostGroupId with the correct groupId.
Note: I wrote this a very long time ago and some of the interfaces may have changed.