PeterMattsson

Members
  • Content Count

    11
  • Joined

  • Last visited

Community Reputation

1 Neutral

About PeterMattsson

  • Rank
    Community Whiz Kid

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. PeterMattsson

    Fixing device hostnames after being populated

    Sorry for the delay, My next guess is that you create a script that lists the devices trough api. For each device do a ping (in PowerShell: Test-NetConnection) extract the computername and add it to the device displayname. Again through API. We don't have a script like that but have been talking about writing one. If or when we do we'll put it up here but that may take a while so if you haven't solved your problem yet my recommendation is start scripting. Hope it works out for you.
  2. PeterMattsson

    DPM (Data Protection Manager)

    Monitoring DPM First was a blur to us. To monitor all jobs wasn't the best thing as a multi instance datasource as the jobs were so many the monitoring of them could potentially use all of the backup server compute power. We also tried the batch script collector but we never got that to work for some reason. Then we took a step back sat down and thinking. We don't actually need to see all jobs. It's quite enough just to see which server got problems. So, i wrote this datasource (it's a multi instance datasource) that collect all computer objects and then for each object checks DPM Alerts and send it out to a custom message. Please enjoy, Z9NNJH
  3. PeterMattsson

    Custom Windows Eventlogs

    Hi, We were in need of monitoring other eventlogs than Application, Security and System so i made a scripted multi instanced datasource to monitor any eventlog in C:\Windows\System32\Winevt\Logs. Not a perfect datasource but it get the job done. 6WG9CE Use ##custom.eventlog## to monitor.
  4. PeterMattsson

    ManageEngine ServiceDesk Plus MSP Integration

    Hello, Sorry for the extreme delay. First things first. After upgrading Servicedesk plus 9.4 it started to behave differently. I've been in contact with Manage Engine and I've been in contact with Logic Monitor. We are looking for another ticket system.There is just too much arguments for leaving Servicedesk plus MSP version. However, after the upgrade SDP stopped receiving alerts. I troubleshooted for a very long time and found out that I couldn't use some of the tokens. Not happy about that at all. I also started using a type of json instead of the xml version. You need to set the integration to raw and use urlencodes as content-type. Do not use JSON because SDP cannot interpret that. Below is an integration for new alerts that we found was working. If you put this in a json verifier on internet it will fail right away but it is in this format SDP wants the data. format=json&data={ "operation": { "details": { "requesttype": "Incident", "priority": "Low", "urgency": "Low", "mode": "Other", "subject": "***##LEVEL##*** | ##ALERTID## | ##HOST## | ##DATASOURCE##", "description": [ "Host: ##HOST##", "\nLM AlertID: ##ALERTID##:", "\nDatasource: ##DATASOURCE##", "\nDatapoint: ##DATAPOINT##", "\nDatapoint Description: ##DPDESCRIPTION##", "\nLevel: ##LEVEL##", "\nStart: ##START##", "\nDuration: ##DURATION##", "\nValue: ##VALUE##", "\nClearValue: ##CLEARVALUE##", "\nReason: ##DATAPOINT## exceeds ##THRESHOLD##", "\nGroup: ##GROUP##", "\n\nCustomer Location: ##location##" ], "category": "[Category]", "subcategory": "[SubCategory]", "requester": "Logic Monitor", "site": "##customer.site##", "group": "Server Management", "account": "##customer.name##" } } } You also need to set the alert integration to get the ticketnumber from SDP. It looks like this. The others look like the setting above. Enjoy!
  5. Hello, We needed a datasource to show custom datasources named Mon_[CustomerName]* from all our customers in a datasource. This to be able to show big numbers on each customers dashboard and also a summary on our Sales Dashboard. It is important to know that this datasource calculates from every customer so be careful which server you appy this to. Best is to have an internal server of your own. First i created the datasource and made it a multi instance datasource with Active Discovery. Below is the script fetching our customers names from device groups. Please notice that we've got all our customers inside a group called customers. We search inside that group by telling Powershell to look inside that group by its DeviceGroup ID. CollectorScript ########################################################################################## <# Use TLS 1.2 #> [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 <# account info #> $accessId = '[AccessID]' $accessKey = '[AccessKey]' $company = '[Your Company]' <# request details #> $httpVerb = 'GET' $resourcePath = '/device/groups' $queryParams = '?filter=parentId~[ParentGroupID]' # Here we put the group ID of our Customers group. <# Construct URL #> $url = 'https://' + $company + '.logicmonitor.com/santaba/rest' + $resourcePath + $queryParams <# Get current time in milliseconds #> $epoch = [Math]::Round((New-TimeSpan -start (Get-Date -Date "1/1/1970") -end (Get-Date).ToUniversalTime()).TotalMilliseconds) <# Concatenate Request Details #> $requestVars = $httpVerb + $epoch + $resourcePath <# Construct Signature #> $hmac = New-Object System.Security.Cryptography.HMACSHA256 $hmac.Key = [Text.Encoding]::UTF8.GetBytes($accessKey) $signatureBytes = $hmac.ComputeHash([Text.Encoding]::UTF8.GetBytes($requestVars)) $signatureHex = [System.BitConverter]::ToString($signatureBytes) -replace '-' $signature = [System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($signatureHex.ToLower())) <# Construct Headers #> $auth = 'LMv1 ' + $accessId + ':' + $signature + ':' + $epoch $headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]" $headers.Add("Authorization",$auth) $headers.Add("Content-Type",'application/json') <# Make Request #> $response = Invoke-RestMethod -Uri $url -Method $httpVerb -Header $headers <# Create Body of Data #> $rawbody = $response.data $items = $rawbody.items foreach($item in $items){ $customername = $($item.name.Split(" ")[0]) # this filter the first word in the customer name Which is all we want. write-host "$customername##$customername" # Should be ID##Name##Description but then i got problems with the ##Wildvalue## Token } EXIT 0; ########################################################################################## After this we added the script below to count the amount of custom datasources for each customer in collection above. ########################################################################################## <# Use TLS 1.2 #> [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 <# account info #> $accessId = '[AccessId]' $accessKey = '[AccessKey]' $company = '[Company]' $httpVerb = 'GET' $resourcePath = '/setting/datasources' $queryParams = "?size=500&filter=name~MON_##WILDVALUE##" # Search for a datasource called *MON_Customername* <# Construct URL #> $url = 'https://' + $company + '.logicmonitor.com/santaba/rest' + $resourcePath + $queryParams <# Get current time in milliseconds #> $epoch = [Math]::Round((New-TimeSpan -start (Get-Date -Date "1/1/1970") -end (Get-Date).ToUniversalTime()).TotalMilliseconds) <# Concatenate Request Details #> $requestVars = $httpVerb + $epoch + $resourcePath <# Construct Signature #> $hmac = New-Object System.Security.Cryptography.HMACSHA256 $hmac.Key = [Text.Encoding]::UTF8.GetBytes($accessKey) $signatureBytes = $hmac.ComputeHash([Text.Encoding]::UTF8.GetBytes($requestVars)) $signatureHex = [System.BitConverter]::ToString($signatureBytes) -replace '-' $signature = [System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($signatureHex.ToLower())) <# Construct Headers #> $auth = 'LMv1 ' + $accessId + ':' + $signature + ':' + $epoch $headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]" $headers.Add("Authorization",$auth) $headers.Add("Content-Type",'application/json') <# Make Request #> $response = Invoke-RestMethod -Uri $url -Method $httpVerb -Header $headers $rawbody = $response.data $items = $rawbody.items $monitors=$items.Count write-host "CustomMonitors=$($monitors)" ########################################################################################## Create a Datapoint with the following settings. Hope all works well for you.
  6. PeterMattsson

    Logic Monitor and Power BI

    Hi, Is someone involved in creating a custom connector for Power BI to pull data from Logic Monitor? I'm starting to investigate this now. If I get it to work I will give you information on how to do it when I'm done.
  7. PeterMattsson

    Fixing device hostnames after being populated

    What happens if you rerun you netscan? Make sure to set rename to ##REVERSEDNS##.
  8. I wanted to collect data for processor, memory and systemdrive usage in Windows to one data source. This to have it show in percentage bars in a table widget. I don't know if you have any other use for it but it presents the data as percentage och consumed capacity. Oh, it's good if you know a little bit Powershell. The script is written to use custom properties so you either need to add them or change the script a little. MKKRR4
  9. PeterMattsson

    view integration strings

    Hello, We are using custom HTTP Integrations towards Servicedesk Plus from Manage Engine. When creating these we need to know what information we are sending to our ticket system so that we are able to see what we need to change to make it work. What we need is some tool to view the complete request we send to Servicedesk Plus. That would be a great help for us. When we test our integrations we just get the answer from the receiving system. Is it possible to have that kind of solution?
  10. PeterMattsson

    ManageEngine ServiceDesk Plus MSP Integration

    I'm in the process of writing and testing json requests now. It seems like Manage Engine are leaving XML. Check this site: https://www.manageengine.com/products/service-desk-msp/help/adminguide/api/rest-api.html
  11. PeterMattsson

    ManageEngine ServiceDesk Plus MSP Integration

    Great article! However I had to use method 'http put' when resolving. No it works like charm.