I like to know when my LM portal has been upgraded. I use this inside a Datasource:
import com.santaba.agent.util.Settings
import groovy.json.*
def account = hostProps.get("lmaccount")?:Settings.getSetting(Settings.AGENT_COMPANY)
def jsondata = new URL("https://${account}.logicmonitor.com/santaba/rest/version").getText()
def versiondata = new JsonSlurper().parseText(jsondata)
println(versiondata.data.version.major)
import groovy.json.*
def account = hostProps.get("lmaccount")?:Settings.getSetting(Settings.AGENT_COMPANY)
def jsondata = new URL("https://${account}.logicmonitor.com/santaba/rest/version").getText()
def versiondata = new JsonSlurper().parseText(jsondata)
println(versiondata.data.version.major)
I then set a delta > 0 alert so that I get an alert whenever the version changes. You can play with the alert clear interval so that the alert stays open long enough for you to notice it (otherwise the alert clears on the next poll where the new version doesn't differ from the new version).