Recent Discussions
API endpoint for User Groups?
I am super terrible at searching or picking the right keywords, but I am completely stumped on whether I can use the API to get a list of User Groups. I searched the Swagger page ( https://www.logicmonitor.com/support/rest-api-v3-swagger-documentation ) for user group, group, and looked through everything, and I cannot find a GET command to pull back a list of User Groups. I'm talking about the section under settings where you can make Users or User Groups, like if you wanted to organize "Department 1" and "Department 2" or "Ungrouped" under your users list. Can anyone tell me the endpoint for getting a list of User Groups? I swear I've combed the API swagger doc for every occurrence of group on the page, and found nothing. Maybe it doesnt exist in V3? Or maybe I'm terrible at searching. :) I would just grab all the users and brute force a list, except I am specifically wanting to interact with any empty User Groups as well, so I have no idea how I would find them with the API Thanks, and sorry for such a basic question.SolvedLewis_Beard3 days agoExpert150Views0likes4CommentsTrouble with setHTTPProxy creating discovery script.
For background I am currently working on onboarding Arista AP's that are managed from the Arista CUE platform, to build the discovery script at least I am using Groovy however when testing the Login element I am getting "setHTTPProxy MissingMethodException" the problem I have is that following the documentation presented here, I do not see what the issue is. I have tried single and double quotes for the string of the proxy and even though the port is documented as an Integer I have even tried string to no avail. The script is below: /******************************************************************************* * Arista WIFI Integration with CUE for discovery of the AP's ******************************************************************************/ import com.santaba.agent.groovyapi.http.* import com.santaba.agent.groovy.utils.GroovyScriptHelper as GSH import com.logicmonitor.mod.Snippets import com.santaba.agent.AgentVersion import java.text.DecimalFormat import groovy.json.JsonOutput import groovy.json.JsonSlurper // To run in debug mode, set to true Boolean debug = false // To enable logging, set to true Boolean log = false // Set props object based on whether or not we are running inside a netscan or debug console def props try { hostProps.get("system.hostname") props = hostProps debug = true // set debug to true so that we can ensure we do not print sensitive properties } catch (MissingPropertyException) { props = netscanProps } //String key = props.get("AristaWIFI.api.key") //String token = props.get("AristaWIFI.api.token") //String clientId = props.get("AristaWIFI.api.clientId") //Temp lines for testing String key = [KEY] String token = [token] String clientId = "logicmonitor" Integer collectorVersion = AgentVersion.AGENT_VERSION.toInteger() // Bail out early if we don't have the correct minimum collector version to ensure netscan runs properly if (collectorVersion < 32400) { def formattedVer = new DecimalFormat("00.000").format(collectorVersion / 1000) throw new Exception("Upgrade collector running netscan to 32.400 or higher to run full featured enhanced netscan. Currently running version ${formattedVer}.") } externalHost= [host dns record]; setHTTPProxy("proxy name",8080); httpClient = HTTP.open(externalHost,443); // Log in to arista loginurl = "https://[Our Instance].wifi.arista.com/wifi/api/session" payloadstring = '{}"type":"apiKeycredentials","keyId":'+key+',"keyValue":'+token+',"timeout":3600,"clientIdentifier": '+clientId+'}'; def payload = payloadstring; def loginResponse = httpClient.post(loginurl,payload,["Content-Type":"application/json"]); if ( !(httpClient.getStatusCode() =~ /200/) ) { // Error has occured println "Authentication Failure"; return(1); } println loginResponse; def LMDebugPrint(message) { if (debug) { println(message.toString()) } } Had a dive through the community and documentation and found nothing.SolvedSteveBamford11 days agoNeophyte38Views0likes2CommentsHelp with .. "is schedule down" notice.
Recently a user created an SDT on a resource to intentionally do some maintenance on it. LogicMonitor emailed us an alert that the resource: The host <hostname> (<ip address>) is scheduled down from 2025-03-18 14:08:00 MDT to 2025-03-18 16:00:00 MDT by <our user>. Can anyone point me to the purpose of this alert and the area of configuration in LogicMonitor where we might understand this more? Our support staff received this but really didn't have any action to take and we're not sure why we got it. Thanks!Solvedmaxwellpinna16 days agoNeophyte44Views0likes2CommentsWQL Query Datapoint cant do Expressions or Scripts?
Because LogicMonitor can't do Text Datapoints (correct me if I'm wrong) and because a Config Source can't run as frequently as I would like, I'm trying to find a way to essentially turn an ENUM through some kind of hardcoding, into a numeric value. I need to turn a normal TEXT FIELD from a WQL Query into a number, something like State, aka ServiceControllerStatus: 1 Stopped 2 StartPending 3 StopPending 4 Running 5 ContinuePending 6 PausePending 7 Paused But unfortunately I cant reference WQL query fields in the Complex datapoint section, but ONLY the complex datapoint section can do any kind of expressions. But it can only base those from the Normal datapoints, which all must be numeric. So short of doing some complete hack where I have a "Normal" datapoint that converts a textmatch(BLAH) into a gauge via a regex for each of the above text strings (essentially having a bunch of normal datapoints by the above names returning 0 or 1) and THEN doing some horrendous if expression or something that embeds all the gauges in a 7-nested deep if statement that multiplies the 0 or 1 * its value I need displayed in a super ugly expression ..... OOF ..... I cant think of any other way to do that. But I have someone that needs to track these states aka ServiceControllerStatus values. None of the WQL Query fields that come back from "SELECT * from Win32_Service" have a numeric equivalent of the text value. Just hoping there is some better way to do it. Thanks!SolvedLewis_Beard18 days agoExpert83Views0likes3CommentsAPI v1 reference?
I found a module that I suppose I had overlooked that might be v1 of the API. Its a custom module that ... well the details dont matter. A few days ago on the 24th or 25th, it just straight up stopped working, some 406 error, it looks like an old V1 API call or something. I cant find it in the V3 API. "/setting/admin/groups" is the call. Anyway, I was just going to re-write it in V3 (it does other stuff other than this one dall) but I cant even find anything for counting user groups directly in the V3 API. I'm guessing I'll have to snag all the users and count the groups myself. No big deal. But all this isnt really what I'm asking. I'm just wondering .... is there still a full reference of the old V1 API, like the full swagger? My search magic is either bad, or its not up anymore. Maybe both. :) Thanks!SolvedLewis_Beard21 days agoExpert139Views0likes3CommentsGroovy 4 timeline and Collector question
https://www.logicmonitor.com/release-notes/collector-release-notes-timelinecollector Right now, because we have a lot of custom things that use groovy, we are still working on making sure all of our custom modules are groovy4 compliant. All the out-of-box ones are upgraded. But in order to do that, I paused our portal updates by ONLY having the checkbox set for REQUIRED. So our version is in the 35.xxx range because I paused it in November or December. One item I'm having a bug with is jsonslurper giving a faststring service error, but i found out its been fixed since 36.200 by setting a parameter ( groovy.v4.classloader.enable ) to true. But the collector version we have doesnt even have that in the Agent.conf. So in order to test properly, and make sure its working, I want to upgrade to a version PRIOR to EA 37.100. EA 37.100 will absolutely force us onto Groovy4. But if I briefly toggle the schedule to also include Optional General, it looks like I will get 37.002. So I'm just hoping someone can sanity check me ..... I assume 37.002 is BEFORE the forced 37.200? And that 37.002 still supports both groovy2 and groovy4? So I may have a short window where I could upgrade our collectors. I'm just confused because the URL I posted lists the date for EA 37.100 as coming BEFORE GD 37.002, and now of course the latest EA is 37.200. If I take advantage of my short window, which shows that Optional General will gove me 37.002, will that version still support groovy2 AND groovy4? I expect to be done with my testing within 1-2 weeks but I'm stuck on this faststring bug. Thanks!SolvedLewis_Beard25 days agoExpert93Views2likes4CommentsSelenium IDE extension not available on Chrome
Hi Team, We have synthetics monitoring in place and I could see today that selenium IDE extension in removed from Chrome browser and even I am unable to download the extension now. Getting a message 'This extension is no longer available because it doesn't follow best practices for Chrome Extensions'. I am not sure if LM has any other plan for this. I have even raised a case with LM support. For now, we are unable to test any existing checks or even can't create new website checks.Solvedsayalirevalkar31 days agoNeophyte150Views0likes5CommentsLM SDK API v3 - get_device_list not responding
Hello, My script that was running without issue yesterday now just indefinitely hangs, if i interrupt it it looks like it just times out code: import logicmonitor_sdk from logicmonitor_sdk.rest import ApiException import json import sys from pprint import pprint from rich.console import Console import time company = 'company' id = 'abc' token = 'lma_' configuration = logicmonitor_sdk.Configuration() configuration.company = company configuration.access_id = id configuration.access_key = token lm = logicmonitor_sdk.LMApi(logicmonitor_sdk.ApiClient(configuration)) def get_devices(): try: devices = [] end_found = False offset = 0 size = 100 while not end_found: current = lm.get_device_list(size=size, start=offset).items devices += current offset += len(current) end_found = len(current) != size pprint(devices) return devices except ApiException as e: print('Exception Caught: %s\n' % e) Traceback: ^CTraceback (most recent call last): File "/Users/lee/dev/logic_monitor/test.py", line 155, in <module> get_devices() ~~~~~~~~~~~^^ File "/Users/lee/dev/logic_monitor/test.py", line 28, in get_devices current = lm.get_device_list(size=size, start=offset).items ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/lee/dev/logic_monitor/venv/lib/python3.13/site-packages/logicmonitor_sdk/api/lm_api.py", line 16986, in get_device_list (data) = self.get_device_list_with_http_info(**kwargs) # noqa: E501 File "/Users/lee/dev/logic_monitor/venv/lib/python3.13/site-packages/logicmonitor_sdk/api/lm_api.py", line 17070, in get_device_list_with_http_info return self.api_client.call_api( ~~~~~~~~~~~~~~~~~~~~~~~~^ '/device/devices', 'GET', ^^^^^^^^^^^^^^^^^^^^^^^^^ ...<11 lines>... _request_timeout=params.get('_request_timeout'), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ collection_formats=collection_formats) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/lee/dev/logic_monitor/venv/lib/python3.13/site-packages/logicmonitor_sdk/api_client.py", line 333, in call_api return self.__call_api(resource_path, method, ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^ path_params, query_params, header_params, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<2 lines>... _return_http_data_only, collection_formats, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _preload_content, _request_timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/lee/dev/logic_monitor/venv/lib/python3.13/site-packages/logicmonitor_sdk/api_client.py", line 162, in __call_api response_data = self.request( method, url, query_params=query_params, headers=header_params, post_params=post_params, body=body, _preload_content=_preload_content, _request_timeout=_request_timeout) File "/Users/lee/dev/logic_monitor/venv/lib/python3.13/site-packages/logicmonitor_sdk/api_client.py", line 355, in request return self.rest_client.GET(url, ~~~~~~~~~~~~~~~~~~~~^^^^^ query_params=query_params, ^^^^^^^^^^^^^^^^^^^^^^^^^^ _preload_content=_preload_content, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _request_timeout=_request_timeout, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ headers=headers) ^^^^^^^^^^^^^^^^ File "/Users/lee/dev/logic_monitor/venv/lib/python3.13/site-packages/logicmonitor_sdk/rest.py", line 231, in GET return self.request("GET", url, ~~~~~~~~~~~~^^^^^^^^^^^^ headers=headers, ^^^^^^^^^^^^^^^^ _preload_content=_preload_content, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _request_timeout=_request_timeout, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ query_params=query_params) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/lee/dev/logic_monitor/venv/lib/python3.13/site-packages/logicmonitor_sdk/rest.py", line 206, in request r = self.pool_manager.request(method, url, fields=query_params, preload_content=_preload_content, timeout=timeout, headers=headers) File "/Users/lee/dev/logic_monitor/venv/lib/python3.13/site-packages/urllib3/_request_methods.py", line 135, in request return self.request_encode_url( ~~~~~~~~~~~~~~~~~~~~~~~^ method, ^^^^^^^ ...<3 lines>... **urlopen_kw, ^^^^^^^^^^^^^ ) ^ File "/Users/lee/dev/logic_monitor/venv/lib/python3.13/site-packages/urllib3/_request_methods.py", line 182, in request_encode_url return self.urlopen(method, url, **extra_kw) ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/lee/dev/logic_monitor/venv/lib/python3.13/site-packages/urllib3/poolmanager.py", line 443, in urlopen response = conn.urlopen(method, u.request_uri, **kw) File "/Users/lee/dev/logic_monitor/venv/lib/python3.13/site-packages/urllib3/connectionpool.py", line 787, in urlopen response = self._make_request( conn, ...<10 lines>... **response_kw, ) File "/Users/lee/dev/logic_monitor/venv/lib/python3.13/site-packages/urllib3/connectionpool.py", line 534, in _make_request response = conn.getresponse() File "/Users/lee/dev/logic_monitor/venv/lib/python3.13/site-packages/urllib3/connection.py", line 516, in getresponse httplib_response = super().getresponse() File "/opt/homebrew/Cellar/python@3.13/3.13.1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/http/client.py", line 1428, in getresponse response.begin() ~~~~~~~~~~~~~~^^ File "/opt/homebrew/Cellar/python@3.13/3.13.1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/http/client.py", line 331, in begin version, status, reason = self._read_status() ~~~~~~~~~~~~~~~~~^^ File "/opt/homebrew/Cellar/python@3.13/3.13.1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/http/client.py", line 292, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/python@3.13/3.13.1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/socket.py", line 719, in readinto return self._sock.recv_into(b) ~~~~~~~~~~~~~~~~~~~~^^^ File "/opt/homebrew/Cellar/python@3.13/3.13.1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/ssl.py", line 1304, in recv_into return self.read(nbytes, buffer) ~~~~~~~~~^^^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/python@3.13/3.13.1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/ssl.py", line 1138, in read return self._sslobj.read(len, buffer) ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^ KeyboardInterrupt If i call another endpoint say get_alert_list, i have no issues and get a response.Solvedllama2 months agoNeophyte70Views0likes2CommentsCollector inherited properties bug
When editing a Collector that inherits properties from a Collector Group, the Edit dialog SHOULD NOT present the inherited properties for editing (orange highlight). This is a bug. Further, the value when edited gains the text " (inherited from Group)", which it SHOULD NOT (red highlight). Saving from this dialog results in the values incorrectly being applied to the Collector, which is NOT what the user intended.SolvedDavid_Bond2 months agoProfessor111Views3likes1Comment