ContributionsMost RecentMost LikesSolutionsRe: Datasource that outputs text and an error code? I don't think you would hammer the API because you don't run the API call unless the issue is detected. Right? Not every poll needs to employ API call. Only when exception is found that results in raising alert. I actually have a logic inside my script to fetch the property value at the beginning of poll and only update it if the issue is detected and the new property value needs to be output. Hopefully you don't run into too many alerts per device per DataSource per day, if you do, you create Alert fatigue and that's not good either. As far as the script I use PowerShell as my choice of scripting language and I would have to scrub it in order to publish it. But there are tons of examples out there for both, groovy and PS on how to update API enpoints. Lastly, I am again acknowledging, it would be nice if this capability was available out of the box. But since it is not, and based on business requirements, I have to do custom solution instead. Re: Datasource that outputs text and an error code? What Mike and Stuart stated, all of the above is true. Sad but true. However....what caught my attention - is it possible to pass the error message from a variable into the alarm message...in the same way that tokens work. And the answer is unequivocally yes! We do it all the time here. Now, it takes little of bit elbow grease but it works great. And it is all based on the fact you can use ##<DEVICEPROPERTYNAME>## as one of the DataSource Tokens in your alert message. Yeap, it is stated so right there on Tokens Available in LogicModule Alert Messages support website. So then, why not craft your own custom Device Property name that you can pass to the alert message? In your DataSource you define a customized Alert message for one of the DataPoints and you can pass the value of your device property (ie token) into the Subject and/or Description. Like this; Subject: ##LEVEL## - ##HOST## ##DATASOURCE## ##DATAPOINT## ##VALUE## Description: This alert will be raised when the reported value of Autoclient State is other than STARTED (value 1). See command output below for detailed description of error. Possible State values; 1=STARTED <-- all good 0=STOPPED <-- alert raised AutoClient command output: ##MB.SWIFT.AUTOCLIENT.SUMMARY## Host: ##HOST## Datasource: ##DATASOURCE## Datapoint: ##DATAPOINT## Level: ##LEVEL## Start: ##START## Duration: ##DURATION## Value: ##VALUE## ClearValue: ##CLEARVALUE## Reason: ##DATAPOINT## ##THRESHOLD## Notice I use ##MB.SWIFT.AUTOCLIENT.SUMMARY## custom token that I manipulate in my DataSource to update its value with free text. The trick is - you need to update this property BEFORE you output whatever DPs you are collecting in your DataSource. And how do you do that? Use LM API and /device/devices/{device_id}/properties/{prop_name} endpoint. Maybe little bit kludgy but again, once you figure out the syntax and workflow in your script it works remarkably well. Re: pull csv report via rest api Wow, I just stumbled across this thread…. Here, I thought I was being a good citizen, trying to align my scripts with official LM API v3 endpoint calls. So while the first part of getting report (/report/reports/{id}/executions) works fine, the second part of getting report - you know getting the actual data (CSV|HTML|PDF format) using the/report/reports/{REPORT_ID}/tasks/{TASK_ID} does not. Getting HTTP Status Code 404. Wasted an hour on that. It is broken. So yeah, back to fetching data via GETreportUrl. Which works fine. Windows Services Monitoring with quite a bit more Automation applied So today we use LM's Microsoft Windows ServicesDataSource to monitor Windows Services. This DS uses Groovy Script and WMI calls under the hood to fetch the service metrics like state, start mode, status, etc... Everything works fine but one of the prerequisites is to go and manually populate the list of Windows services which then the DS parses out as a WILDVALUE variable in the script. You know, go to the device, click on Down Arrow (Manage Resource Options) --> Add Additional Monitoring --> and CHOOSE from the list of Windows Services. Rinse and Repeat and Save. Then the DS goes to work. Well, what if you have a list of over 100 Windows Services you need to add to let's say 20 Windows devices? That would take forever to populate that list manually... That's a problem number 1. Scratch that. This is not really a problem since one can run a PowerShell script (or Groovy Script) to perform this task using undocumented - but working very well - LM API calls. That problem is solved. Next - This list of over 100 Services needs to be *refreshed* every let's say 24 hours to remove nonexistent services and add new ones based on the Regex filter. That's a problem number 2. And again, one can do it programmatically running API calls but this is where I am trying to figure out how to do it. Run my script as a custom PropertySource? I am not really writing Resource Properties, I am updating instance list (Windows Services) within Additional Monitoring on bunch of Resources. Plus PropertySources are applied when ActiveDiscovery is run which is what, every 24 hours? Or should I write custom DataSource that would accomplish this refresh and specify 1 day collection period? Thanks. SolvedRe: Dynamic Dashboards Yeah, I would have never thought of that, but I do have that setting enabled, so the issue is elsewhere...But I am encouraged to hear it is working so I will keep troubleshooting. Re: Dynamic Dashboards Excellent. I am using dashboard v1.9. Stuart, did you have to modify the underlying JavaScript or tweak it in any way in regards to API calls? Maybe I am missing something else to get it working? Re: Dynamic Dashboards I would love to get this functionality in a dashboard. I downloaded theDynamic Dashboard - Windows in json format, loaded in my LM instance (we are using Windows collectors) and - while Resource Selector is working fine - the dashboard is not being updated with selected resources. Question - is the underlying JavaScript compatible with LM API v.3? I assume "Update Dashboard" REST method to save the new token values is silently failing. Is anybody using this dashboard with success? Re: Revisiting old topic - Custom Alerts for ConfigSources Mr. Ravimishra, that’s not what I was asking. Please read my initial post (as well as archived post). I want to have an alert triggered on ‘Any Change’ check type AND in addition said alert should state what lines were added or removed in the body of alert. I understand this is currently not possible using the ConfigSources. For whatever reason. So what I am doing instead - schedule a cron job, fetch the config files every 10 minutes or so from destination, crunch the numbers, comparing the previous and current version and output the desired output in the log which is then consumed by EventSource. One can use LM Logs as well. So everything works but the solution has many moving parts as opposed to using just ConfigSource and be done with it. Oh well. Revisiting old topic - Custom Alerts for ConfigSources At this time I have a need for a custom ConfigSource that would compare 2 textual files and report on Any Change. Nothing fancy and the new ConfigSource with defaultsettings indeed works just fine IF you only want to get an alert that a change was detected. However I would like to pass the actual lines that were modified in the alert. In searching for this topic I found anarchived post from 5 years ago. Custom Alerts for ConfigSources In that post Nick is asking if it is possible to do the following; Being able to put what lines were added or removed right in the alert. For simple configs you can then tell right away if you need to take action or not. That’s exactly what I am after. The archived post was posted 5 years ago…. does anybody know if there was any progress on this feature? I have a sinking feeling this is not possible today, or at least it’s not any easier than it was 5 years ago. Back to custom scripting? SolvedAny way to display LM Logs query results in Dashboard? Not sure if I am overlooking something…. is it possible to put LM Logs query table showing the results of said query into a Dashboard? The purpose of that would be to have the query updated with the latest results every x minutes. I've tried Text widget and HTTP widget andembedded the URL for log query but that's not working.
Top ContributionsHow to get a list of local deprecated DataSourcesRevisiting old topic - Custom Alerts for ConfigSourcesSolvedWindows Services Monitoring with quite a bit more Automation appliedSolvedRe: Datasource that outputs text and an error code?Re: How to customize Clearing alertRe: Dynamic DashboardsRe: Datasource that outputs text and an error code?How to customize Clearing alertRe: Data throughput - I need to workout or display/graph total dataLinux dashboard question