Config Backup Reports
We are migrating from a legacy tool to LogicMonitor for Configuration Backups, but just noticed one issue. There isn’t a built in way to report on when the last config was backed up and when the last config checked to see if there is a new one to backup. Some clients want to see this VS “no alarms”.Solved503Views9likes5CommentsUsing groovy script to send email (inside a DS or CS)?
We use a resource associated with a specific collector to run scripts using config sources as the mechanism. One of the scripts I am writing now posts to a “UserDisable_Warning” config source a list of users whose suspension is imminent. I would like to use the config source to also send an email to the user, but I’m worried I’m going to have to do a bunch of crazy stuff to set up things on the collector. But I’d rather not use the collector’s exchange to send email, because I dont have direct access to it (go figure) and some of the datasources I’ve seen look like a serious pain to use (Email_TransitTime, for example) as a template. I was wondering if anyone knows a simpler way to send email. When a resource has an alert with an escalation chain that contains an email, I was under the assumption that no exchange server or imap or anything else has to be set up on the collector. Or so I thought. So I’m kinda hoping there is some easy way to avoid having to set up mail stuff on a collector, and just have that collector, via a groovy script, send an email out somehow. Like in my wildest dreams I would import something, and then do java.pipedream.Email.send (“blah@foo.blah”,”LM expiration for blah@foo.blah”,”Dear Blah,\nYour LM account expires in X days.\n\n--MyCompany”). Or at least something not reliant on setting up email servers or clients or etc on the collector. Maybe I’m completely off in the wrong direction. What would be the easiest way to have groovy send an email, preferably with me not having a lot of control of my own collector (even though I’m portal admin; work silos, know what I’m sayin’? :) )? Thanks!300Views3likes7CommentsAnyone getting Switch COnfigs from Aruba switches?
Hi, We have some HP Aruba 2530-48G switches. They are monitoring the basic info just fine, but LM is not pulling down the Configs like it does on some of our other switches. Is there anything special I need to do to get the Aruba switches to have their config downloaded? I saw an Aruba Config Source in the Exchange, but it didn’t work when I tried it. If anyone knows how I can get this to work, please let me know. Thanks!299Views2likes5CommentsCommon ConfigSource Documentation
Hello LogicMonitor community, I wanted to drop this here as it’s been something in the works for a long time. As I am sure many of your are all awareour development team has been working on and has actually released a new set of ConfigSources called “Common Configs”. These have been released into our core repository since late 2021 with support for more manufacturers and more features being added into these LogicModules throughout the last 2 years. The time has come that we have been able to get a support document around these Common Configs released with the requirements for them, optional parameters you can add to help them be successful, and thelist of all currently released modules related to this suite. https://www.logicmonitor.com/support/common-config-monitoring199Views28likes0CommentsFinding Cisco IOS XE CVE-2023-20198 With ConfigSources
On October 16, 2023, Cisco published a vulnerability that affects IOS XE machines running the built-in web server:https://sec.cloudapps.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-iosxe-webui-privesc-j22SaA4z This is tracked ashttps://nvd.nist.gov/vuln/detail/CVE-2023-20198 By adding a simple Config Check to an existing Cisco IOS ConfigSource, LogicMonitor can help people quickly identify which resources have the web server enabled. Here is an example: Name: Cisco-CSCwh87343-Check Check type: "Use Groovy Script" Groovy script: /* The built-in string variable 'config' contains the entire contents of the configuration file. The following example will trigger an alert when the configuration file contains the string "blue". if (config.contains("blue")) { return 1; } else { return 0; } */ if (config.contains("ip http")) { return 1; } else { return 0; } Then trigger this type of alert: Warning Description: "Search for presence of Cisco CSCwh87343 vulnerability" Caveats: -This will apply to all devices where the ConfigSource is used, even though all devices may not be affected by the vulnerability -This assumes usage of ConfigSources and specifically the Cisco_iOS ConfigSource Thanks to Todd Ritter for finding this CVE and Creating the ConfigSource150Views16likes1CommentRunning vs Startup Comparison ConfigSource (PoC)
This one's a little bit like my ConfigSource to compare a config to a static template file: https://community.logicmonitor.com/product-discussions-22/configsource-to-compare-to-a-known-template-poc-1360 It uses similar methodology, to compare the already-gathered 'running' and 'startup' instances of any existing ConfigSource via the LogicMonitor API. It doesn't gather any configs directly from the device. Example: The Cisco_IOS ConfigSource already gathers a 'running-config' and a 'startup-config' from relevant devices. This ConfigSource calls the LM API to pull the most recent retrievals of each of these, and compares one to the other. This ConfigSource can be extended to consider any ConfigSource that includes 'running' and 'startup' config instances, and/or could be cloned/edited to consider other instance pairs if the device type names them differently (e.g. 'default' vs 'running', 'original' vs 'custom', etc). The two configs are compared line-by-line and where lines differ, these are marked and alerted on. This ConfigSource demands the presence of theDataSources_List PropertySource, as it relies on a known list of LogicModules active on a device, as the AppliesTo is based on the presence of LogicModule names in the resultant auto.activedatasources device property: https://community.logicmonitor.com/product-discussions-22/datasources-list-propertysource-1346 As it uses the LM API, this ConfigSource also demands an API token ID and Key pair, but you'll need those for the above PropertySource anyway. That pair must have the ability to read LM Config data. v1.3.0 is published with locator:79Y7Y7100Views4likes4CommentsCommon Config Sources vs Legacy LM Config Sources
We use LM Config and have since day 1. I’m wondering if any of you have migrated off the legacy LM Config sources and onto the “Common Config” method? What sort of gaps in data did you have? I’m sort of stuck on the idea of having to dump one for another or potentially have some that work only with legacy vs Common methods? Seems like it could be hard to manage. Do you have any challenges today using the new way?100Views5likes1CommentCant get javax.mail.Session to work? (Groovy Datasource or ConfigSource)
Last week or so I asked a question about using groovy to send emails, and I was pointed to some datasources such as email_TransitTime and etc, to use as a template. I’m just getting a chance to look at that this week. And I hit a snag, and I’m not sure if this is user error or something else. I snagged the code for email_TransitTime and I did what I always do, which is to strip the code down to just the most minimal thing for object creation or for calling the classes etc that I see used, and I immediately hit the problem that the LM Groovy script always tells me: “No such property: Session for class”As it happens on our portal, nobody is even using email_TransitTime, so I cant really be sure, but it seems like something may be wrong on the portal. Here is the code I’m using, this is literally the entirety of the datasource code for now, and I literally just did the imports related to mail that email_TransitTime uses, and then just as that code does, I snag the properties and then try to make a call, without defining anything etc. import com.santaba.agent.groovyapi.expect.Expect; import com.santaba.agent.groovyapi.snmp.Snmp; import com.santaba.agent.groovyapi.http.*; import com.santaba.agent.groovyapi.jmx.*; import org.xbill.DNS.*; //mail? import javax.mail.* import javax.mail.internet.* import javax.mail.search.* //import javax.mail.Session //smtpProps.put("mail.smtp.port", "25"); def smtpProps = System.getProperties(); def smtpSession = Session.getInstance(smtpProps, null); println 0; return 0; So I poked around online for just java and groovy use of javax.mail.Session and I found some similar instances of people having a similar error and they fixed it by putting some other java file somewhere, but I cant control all of this obviously on the LM platform. I guess. But what I’m getting at is that I cant even interact with javax.mail.Session at all, from playing around with it, or trying to import javax.mail.Session directly or anything. Can anyone think of anything obvious going on? I dont see how email_TransitTime could even work on our portal. I’ve never had any issues using classes I’ve seen used in other config sources or datasources, and I’ve even never hit a problem using imports and code examples I see for java generically. I’ve found super simple examples of code online people are doing that basically are doing something just as minimal, and that line “def smtpSession = Session.getInstance(smtpProps, null);” works for them …. at least for those that could get the javax.mail.Session imported or available to them. I’m stumped. Help? :) Thanks!99Views1like2CommentsTips or Tweaks for controlling when a daily ConfigSource runs?
I have a config source, that really under the hood is doing some other task, a coding task, and it used to conveniently run every day at 22:47 or something like that, but because of reasons, now it runs at 10:05 every morning. This is some ancient script someone else wrote in python and it runs on a collector. I’ll probably convert it to be groovy, and have it run hourly, but only act when the hour digit on the time is 22 or something wacky. But short of that, it did have me wonder, are there any tricky ways to change when a daily config source runs? Because from what I can tell, they run at the time they were made, or I guess at the last time the collector went down because of a domain password problem :) *cough*. I could just try a meaningless edit on the ConfigSource and see if that does it. I dont think bouncing the collector service will do it because on rare occasion the service restarts at a time other than its normal time and that doesnt change CS run times. Just wondering if anyone has any tips or tricks? I’ll probably just rewrite this to run hourly but act only on a specific hour of the day. But just fishing for ideas. I really wish we could schedule ConfigSources like we can reports. Thanks!92Views8likes7CommentsTesla Motors LogicModule Suite
I previously published a datasource for Tesla Motors Battery Statistics - which presents compelling vehicle battery and charging information that is fetched from the Tesla REST API. To complement those efforts, I've written a few other Tesla Motors LogicModules that return a variety of different, but still interesting, datapoints - including a ConfigSource that displays configuration information about the vehicle itself (are the doors locked? Is the sunroof open?) The following is a list of all the Tesla Motors LogicModules now available (see the above-linked post for additional info on how this all works.) DataSource 'Battery Statistics' tracks battery and charger performance and health metrics Tesla Motors Battery Statisticspreviously posted to the Exchange but included here for sake of keeping everything together.) The datasource name isTeslaMotors_BatteryStatisticsand has lmLocatorDXLLKY. DataSource 'Climate Statistics' tracks inside and outside temperatures, as well as driver and passenger temperature settings. The datasource name isTeslaMotors_ClimateStatisticsand has lmLocatorYZRWXC. ConfigSource 'Car Configuration' collects textual configuration data, cleans it up and makes it easily readable (screenshot attached.) The configsource name isTeslaMotors_Configurationand has lmLocatorGRY9AE. DataSource 'Location Data' tracks compass heading, latitude and longitude, and power. The datasource name isTeslaMotors_LocationDataand has lmLocatorAYWYWA. DataSource 'Odometer Reading' does exactly what you might expect. The datasource name isTeslaMotors_BatteryStatisticsand has lmLocatorHHJRD86Views12likes5Comments