Search the Community

Showing results for tags 'rest'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • From LogicMonitor
    • Product Announcements
    • LM Staff Contributions
    • Community Events
  • LogicMonitor Product Discussion
    • Feature Requests
    • LM Exchange
    • Ask the Community

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me

Found 8 results

  1. Trying to schedule a new SDT for January 1, 2018 1:00 AM to 1:30 AM for a device group, but getting a Status:1007 and a blank response. <# account info #> $accessId = 'SHj6Hub8e63FUwkc5' $accessKey = 'xz37=(][{qb6ANLp}5$-S9Hvn6HV292P' $company = 'api' # stdTYpe (integer) # 1 - one time, 2 - Weekly SDT, 3 - Monthly SDT, 4 - Daily SDT # we have to use "one time" style values because LM has no concept of day of month $stdTYpe = 1 # type (string) # ServiceGroupSDT, DeviceGroupSDT, CollectorSDT $type = "DeviceGroupSDT" # deviceGroupId (string) # $deviceGroupId = 18 # dataSourceId (in
  2. I took a working groovy script datasource and am now trying to adjust it to some needs we have. This data will end up giving us alert totals for each month so we can build reports. Any ideas? Here is what I have so far. import javax.crypto.Mac; import javax.crypto.spec.SecretKeySpec; import org.apache.commons.codec.binary.Hex; import groovy.json.JsonSlurper; //define credentials and url def accessId = hostProps.get('lmaccess.id'); def accessKey = hostProps.get('lmaccess.key'); def account = hostProps.get('lmaccount'); def alertgroup = hostProps.get('lmaccess.group'); def collectionF
  3. I am attempting to adjust an escalation chain via PowerShell and REST. I am currently getting back a 1007 and can't seem to figure out what is wrong. Below is what I am using, I have tried different forms of $data. Our main goal is to change CC. We have tried these two and then the 1 in the script below. Just not sure what is coming up wrong. $data = '"ccDestinations":[{"type":"arbitrary","method":"email","addr":"test@test.com"}]' $data = '"destinations":[{"type":"single","stages":[[{"type":"arbitrary","method":"email","addr":"test@test.com"}]]}]' <# Use TLS 1.2 #> [Ne
  4. I have created a Groovy script based PropertySource, that uses a REST call to contact an external site using the included HTTP helper methods in order to fill some information fields. This works fine in itself. The issue I have is the need to set the proxy details on the object after it is instantiated in the script. As far as I know, the collector properties/settings are not exposed in any way to a scripted PropertySource, despite the script running locally on the collector. Nor does the HTTP connection use the existing proxy as set on the collector. Unless I am missing somethi
  5. I have the below code which results in a 401. Any ideas? I am attempting to update the hostGroupIds. $status = $null $body = $null $response = $null <# Use TLS 1.2 #> [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 <# account info #> $accessId = '*****' $accessKey = '*****' $company = '*****' <# request details #> $httpVerb = 'PATCH' $resourcePath = '/device/devices/1210' $queryParams = '?patchFields=hostGroupIds' $data = '{"hostGroupIds":"187,258"}' <# Construct URL #> $url = 'https://' + $company + '.logicmonitor.com/sant
  6. Hello all, I am trying to get updates on alerts that span multiple days. So, our normal code will grab new alert data for today, let's say. However, we need to go back to old alerts and see if they have been resolved yet, so we can do accurate reporting. What I want to do is provide a list of the IDs for a handful of alerts and get more than 1 row back. Any ideas on how I can formulate an alert query so that I can get 2 rows back for, say ID=DS1234567 and ID=1234568 in the same request? Here is my example call: https://mysite.logicmonitor.com/santaba/rest/alert/alerts?filter
  7. Hi, Is there a way to get all instances for given data source, but without having to provide device IDs? The REST API offers the following URI: URI: /device/devices/{deviceId}/devicedatasources/{deviceDatasourceId}/instances What I need is the equivalent of something like this: URI: /datasource/datasources/{datasourceId}/instances Which would return all instances for the datasource from all devices that have the datasource. The returned data should include the "managedObjectName" property so that from the instance we can refer back to a device.
  8. I've been trying to get data for individual datapoints within a single instance datasource via the REST API, in this case there are ~twenty datapoints and I only want data for one of them. Using get_data: https://www.logicmonitor.com/support/rest-api-developers-guide/data/get-data/ I can pick out my datasource, however I can't find any information on filtering by datapoint. When I get data, the datapoints are all listed in an array, then the data is presented as an array of arrays for the last hour...I could get the position of the datapoint in the first array, then pick out the data using th