Make Instance Groups searchable/filterable
Hello, We'd like to request some more usage for instance groups. Right now, it's just not very useful to group instances on a datasource. We have shared devices with datasources belonging to different teams and we have to create dashboards and alarm rules regarding those. Right now, we have to use the wildcard filter in a "creative" way to have shared devicealerts and dashboards from different teams configured. It would be really helpful if the instance-group namecould be used in Filters. Use-Case: * To configure alert rules for shared devices for different teams, we can group all datasource-instances in instance groups named "teamname" and then filter on "teamname", this works even when we use "*" for device/devicegroup, as long as instancegroup "teamname" is persistent over multiple shared devices. * To have dashboards for shared devices on a per-team base, we can filter for the teamname when creating those dashboards. This also works with "*" as device/devicegroup query, so instances on new devices will be added automatically. Regards, Bastian8Views3likes2CommentsCluster Alert Routing
It would be immensely helpful if I could see and test alert routing from the Cluster Alerts page at the device group level similar to the existingAlert Routing button on the Alert Tuning tab. As we begin to more heavily utilize this functionality, it's critical that we can verify that alerts are routed correctly wherever we set it up.4Views1like0CommentsConfigSource for Alert Rules Configuration
There is no way to backup Alert Rules configuration in LogicMonitor so I came up with this ConfigSource for LMConfig to keeptrack of configuration changes to Alert Rules. Groovy Script /* ConfigSource Retrieves and stores the JSON document for alert rules. Define the following custom properties on a collector object: api.accessId api.accessKey api.accountName Mosh Jahán Rentokil Initial May 2017 */ import org.apache.http.HttpEntity import org.apache.http.client.methods.CloseableHttpResponse import org.apache.http.client.methods.HttpGet import org.apache.http.impl.client.CloseableHttpClient import org.apache.http.impl.client.HttpClients import org.apache.http.util.EntityUtils import javax.crypto.Mac; import javax.crypto.spec.SecretKeySpec; import org.apache.commons.codec.binary.Hex; def debugMode = false; def apiAccessId; def apiAccessKey; def apiAccountName; if (debugMode == false) { try { apiAccessId = hostProps.get("api.accessId"); } catch (all) { println "(debug::fatal) Missing custom property api.accessId"; return 1; } try { apiAccessKey = hostProps.get("api.accessKey"); } catch (all) { println "(debug::fatal) Missing custom property api.accessKey"; return 1; } try { apiAccountName = hostProps.get("api.accountName"); } catch (all) { println "(debug::fatal) Missing custom property api.accountName"; return 1; } } else { // Hardcode values for debug here apiAccessId = ""; apiAccessKey = ""; apiAccountName = ""; } def resourcePath = "/setting/alert/rules"; def url = "https://" + apiAccountName + ".logicmonitor.com" + "/santaba/rest" + resourcePath; // Calculate signature epoch = System.currentTimeMillis(); requestVars = "GET" + epoch + resourcePath; hmac = Mac.getInstance("HmacSHA256"); secret = new SecretKeySpec(apiAccessKey.getBytes(), "HmacSHA256"); hmac.init(secret); hmacSigned = Hex.encodeHexString(hmac.doFinal(requestVars.getBytes())); signature = hmacSigned.bytes.encodeBase64(); // HTTP GET CloseableHttpClient httpclient = HttpClients.createDefault(); httpGet = new HttpGet(url); httpGet.addHeader("Authorization" , "LMv1 " + apiAccessId + ":" + signature + ":" + epoch); response = httpclient.execute(httpGet); responseBody = EntityUtils.toString(response.getEntity()); statusCode = response.getStatusLine().getStatusCode(); // Output response if (statusCode == 200) { println "AlertRulesJSON:" + responseBody; } else { println "Request failed " + statusCode; } httpclient.close(); return 0;3Views1like3Comments