Forum Discussion

Kerry_DeVilbiss's avatar
8 years ago

Air Quality - Automatic by GeoIP Location

Our LogicMonitor headquarters are based in Santa Barbara, CA, which is currently experiencing the wrath of a large wildfire in the backcountry and overwhelming the city with ash and smoke. Monitoring the air quality and particulate levels can help provide information on whether or not it's safe and/ or appropriate to be outside with some form of respiratory protection. The datasource below retrieves Air Quality Index information from AIQCN.org, including an overall health score, PM2.5 and PM10 levels, as well as Temperature, Humidity, and Pressure levels. This datasource can be applied to any device in the account; ultimately it will use the WAN IP (of the collector monitoring the device it is applied to) and will automatically attempt to GeoIP locate the closest Air Quality Station and start to monitor it.

If anyone's interested, reach out and I have a couple different versions of this - one that can search a keyword and return multiple stations in the area (and could be adjusted for any locale.)

The locator code for datasource 'AirQualityInformation_GeoIP' is: WCEXT3

  • I cannon seem to figure out what I am doing incorrectly, I keep receiving 

    Failed to execute the script - Cannot get property 'v' on null object
    java.lang.NullPointerException: Cannot get property 'v' on null object
    	at org.codehaus.groovy.runtime.NullObject.getProperty(NullObject.java:60)
    	at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:174)
    	at org.codehaus.groovy.runtime.callsite.NullCallSite.getProperty(NullCallSite.java:47)
    	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:296)
    	at Script249.run(Script249.groovy:29)
    Any Ides on what I am doing incorrectly?