ContributionsMost RecentMost LikesSolutionsRe: Python script to run API call - AddWebsite - Need help with collectors Thanks for taking the time to reply, I really appreciate. My code does include the "is internal" boolean. The collectors I'm using are working. I tried a few differents, just to rule that out. These were good advices, thank you. If anyone else sees something else, feel free to participate :D Too bad LM support considers this as "custom" work and won't help. To me, creating a webcheck is fairly standard work, no matter if it's through an API or the GUI. Re: Python script to run API call - AddWebsite - Need help with collectors cnaStill no luck here. Still shows "dead collector" in the reply body. And in the portal is shows no collector at all. Dumb question: Does your script have a block for "collectors" and one for "checkpoints" ? If so, what do they look like in yours ? Or do you only have that simple "test_location" block and that's it ? ...It's really annoying the LM support doesn't want to help with this... Re: Python script to run API call - AddWebsite - Need help with collectors Thanks a lot for taking the time to reply. :) I figured I was (maybe?) passing too much data. Giving that a try in a few minutes and I'll update this post. Python script to run API call - AddWebsite - Need help with collectors Hello, I'm having troubles having a python script to work properly. I manage to have my webcheck created. But it always comes with no collector/checkpoint. Looking at the API sdk documentation doesn't really help me figure what I'm doing wrong. I tried doing a GET on existing webchecks, to copy/paste the following blocks: test_location, Checkpoints, Collectors. Here is a sample of my script: (the collector name is: "domain\\servername") I grabbed these blocks from the getwebsitelist output: Here is the API output when I try to create the webcheck: {'alert_expr': '', 'checkpoints': [{'geo_info': 'Overall', 'id': randomNumber, 'smg_id': 0}], 'collectors': [], 'description': 'Test API by Damien', 'disable_alerting': True, 'domain': 'Valid_website_url', 'global_sm_alert_cond': 0, 'group_id': 321, 'id': 4701, 'ignore_ssl': True, 'individual_alert_level': 'warn', 'individual_sm_alert_enable': False, 'is_internal': True, 'last_updated': 1732304976, 'name': 'testDamien', 'overall_alert_level': 'warn', 'page_load_alert_time_in_ms': 30000, 'polling_interval': 5, 'properties': [], 'role_privileges': [], 'schema': 'http', 'status': 'dead-collector', 'steps': [{'auth': None, 'description': '', 'enable': True, 'follow_redirection': True, 'fullpage_load': False, 'http_body': '', 'http_headers': '', 'http_method': 'GET', 'http_version': '1.1', 'invert_match': False, 'keyword': 'Alive', 'label': '', 'match_type': 'plain', 'name': '__step0', 'path': '', 'post_data_edit_type': None, 'req_script': '', 'req_type': 'config', 'require_auth': False, 'resp_script': '', 'resp_type': 'config', 'schema': 'http', 'status_code': '', 'timeout': 30, 'type': 'script', 'url': '', 'use_default_root': True}], 'stop_monitoring': False, 'stop_monitoring_by_folder': False, 'template': None, 'test_location': {'all': True, 'collector_ids': [], 'collectors': [], 'smg_ids': []}, 'transition': 5, 'trigger_ssl_expiration_alert': False, 'trigger_ssl_status_alert': False, 'type': 'webcheck', 'use_default_alert_setting': False, 'use_default_location_setting': False, 'user_permission': 'write'} And how it looks in the portal: Anyone has any idea of what I may be missing ? Thanks in advance. Re: API call - Postman - select specific systemProperties - ?fields= Thanks for the update, Stuart. Well,... I hardly see why anyone would not want to implement his stuff to be able to filter/parse data with a decent level of granularity. Anyways. It's gonna be a good opportunity for me to work on my scripting skills, I guess. There is good in this. Re: API call - Postman - select specific systemProperties - ?fields= That was a super fast reply. Thanks. That's interesting... (and slightly depressing) I used the following call and had success with it; {{url}}/device/devices/?filter=autoProperties.name:auto.network.names,autoProperties.value:{{deviceIP}}&fields=displayName,id Which allows me to only target the device with Property1:A. If I understood right, that worked only because I don't have two devices with the same IP... That's rough. I thought I got something to work the way I wanted and now I learn I just got lucky. I'll probably need to re-read your reply tomorrow morning, when my brain is functional... But it looks like I can't easily achieve what I wanted. I thought API calls were super versatile. Note that my initial question is about 'filtering' the result (fields=), not filtering the devices I'm getting (?filter=). Though I guess what you say applies to both. Thanks again for your detailed reply. API call - Postman - select specific systemProperties - ?fields= Hello everyone ! This could be a noob question. I tried to find the answer on the forum but did not. Sorry if I missed a thread mentioning it. I found how to use ?filters= on systemProperties stuff. But I can't figure how to select specific data in the result, with ?fields=. I'm willing to go through a file with my devicesID. For each of these device, I want to get the value for the property "system.azure.tag.vm", which is part of 'systemproperties'. I'm comfortable with "fields=" for whatever is part of the 'data' array. But no clue when it comes to these; Can anyone help me determine the proper syntax for my Get ? Thanks. Add the 'search' feature to widgets, in dashboards. Hello, Hopefully this wasn't already asked (if so, sorry, I missed it). I thought a few times it may be useful to have a 'search' feature whenever I'm looking at a widget such as a table that lists dozens/hundreds of devices. Search on any field of the widget, if possible. Thanks, Damien. Question/help ; Datasource to parse servers exposed to the log4j vulnerability ? Hi everyone, I'm new to LM and am looking for a way to achieve this through LogicMonitor. Maybe some of you guys already found a way ? We're still trying to figure if we're looking at an installer package version (if so, how) or at a specific file version (if so, how). Thanks.
Top ContributionsAdd the 'search' feature to widgets, in dashboards.Python script to run API call - AddWebsite - Need help with collectorsAPI call - Postman - select specific systemProperties - ?fields=Question/help ; Datasource to parse servers exposed to the log4j vulnerability ?Re: Python script to run API call - AddWebsite - Need help with collectorsRe: Python script to run API call - AddWebsite - Need help with collectorsRe: Python script to run API call - AddWebsite - Need help with collectorsRe: API call - Postman - select specific systemProperties - ?fields=Re: API call - Postman - select specific systemProperties - ?fields=