LM Linux collector deployment failed to start Logicmonitor watchdog service
Success to set net capabilities on file `/usr/local/logicmonitor/agent/jre/bin/j ava` Detecting proxy, please wait ... Registering collector to bp.logicmonitor.com, please wait ... Init program is systemd ... Redirecting to /bin/systemctl restart logicmonitor-watchdog.service Job for logicmonitor-watchdog.service failed because the control process exited with error code. See "systemctl status logicmonitor-watchdog.service" and "journalctl -xe" for de tails. Congratulations! LogicMonitor Collector has been installed successfully! Extracting bundled JRE files ... Success to set net capabilities on file `/usr/local/logicmonitor/agent/lib/sblin uxproxy` Success to set net capabilities on file `/usr/local/logicmonitor/agent/jre/bin/j ava` Detecting proxy, please wait ... Registering collector to bp.logicmonitor.com, please wait ... Init program is systemd ... Redirecting to /bin/systemctl restart logicmonitor-watchdog.service Job for logicmonitor-watchdog.service failed because the control process exited with error code. See "systemctl status logicmonitor-watchdog.service" and "journalctl -xe" for de tails. Congratulations! LogicMonitor Collector has been installed successfully! [root@WS01UJEU1000009 ~]# systemctl status logicmonitor-watchdog.service ● logicmonitor-watchdog.service - LogicMonitor Watchdog Loaded: loaded (/etc/systemd/user/logicmonitor-watchdog.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Sun 2023-03-05 13:56:20 UTC; 1min 21s ago Process: 344458 ExecStopPost=/usr/local/logicmonitor/agent/bin/logicmonitor-watchdog stop true (code=exited, status=203/EXEC) Process: 344456 ExecStart=/usr/local/logicmonitor/agent/bin/logicmonitor-watchdog start true (code=exited, status=203/EXEC) Mar 05 13:56:20 WS01UJEU1000009 systemd[1]: Starting LogicMonitor Watchdog... Mar 05 13:56:20 WS01UJEU1000009 systemd[1]: logicmonitor-watchdog.service: Control process exited, code=exited status=203 Mar 05 13:56:20 WS01UJEU1000009 systemd[1]: logicmonitor-watchdog.service: Control process exited, code=exited status=203 Mar 05 13:56:20 WS01UJEU1000009 systemd[1]: logicmonitor-watchdog.service: Failed with result 'exit-code'. Mar 05 13:56:20 WS01UJEU1000009 systemd[1]: Failed to start LogicMonitor Watchdog.Solved372Views12likes2CommentsUsing a Dedicated Collector for each Windows Domain Controller?
We ran into trouble monitoring our Windows Domain Controllers because we want to use least privilege and we were only receiving ping and Host Status data. It showed “No data” for CPU, disks, etc. We used the information in the link “https://www.logicmonitor.com/support/monitoring/os-virtualization/monitoring-a-domain-controller-dc” and installed the collector on a DC using the local system account and set it to monitor itself. I am now receiving CPU, disk, etc. from that domain controller. It appears the only catch is that I cannot monitor other systems with that collector but that is OK for our situation. Are there others out there that are monitoring DCs using this method and if so, have you run into any trouble (performance, etc.)? If you are not using this method, how are you monitoring your DCs in Logic Monitor. THANK YOU very much for your assistance/opinions/guidance.Solved329Views14likes3CommentsStop collector or batshscript queued tasks from collector debug?
Is there any way to, from the collector debug or UI, kill any queued up tasks specific to an IP that the collector is monitoring? I have a device that is being over-polled, and we know why, but there were a bunch of tasks queued up that couldnt get through. I’ve put that device in a folder, and set that folder to not collect or alert on any of the datasources, so in THEORY I am thinking that we SHOULD no longer be sending any significant snmp traffic. However, in the past, I’ve sometimes experienced that tasks that get queued up or stuck in batchscript can sometimes just keep trying and stay stuck. So I’m wondering if there may be something I can do on the collector to specifically force it to drop any pending tasks for a specific resource. Thanks!Solved256Views5likes1CommentRaspberry Pi Collector Alternative
There still isn’t an ARM release of the Collector available, so it cannot be installed easily on a Raspberry Pi, but every now and then there’s someone who wants to put a collector on a very small, inexpensive computer in order to support a small number of network devices or other equipment in a remote site or for other reasons. Has anyone got a favorite intel-based single board or very inexpensive computer they’ve used for this?211Views8likes2CommentsHow many collectors do you have?
Hello, Our Logic Monitor environment is overloaded. What is the best practices to expand? We have currenty 64 collectors “All the same size” and our internal LM Support for the collectors is requesting 52 new collectors!! They are taking the approach to create collectors all the same size for 10,000 instances. I was thinking about other routes 1. bigger collectors if possible for 30,000 instances each may be... 2. minimize the number of instances by cleaning up what is not needed but I am not sure anybody will know We have an AZURE Collector VZPOHIALGCMON01 with 82,305 instances !!! I reviewed this Collector Capacity | LogicMonitor and apparenlty we could expand another way than the one selected !!! Any thoughts on this? Thanks, Dom156Views2likes2CommentsHost Status errors corrected by logging into Collector server.
Every night we receive “Host Status” messages on several servers on one collector. You cannot “!ping” to those servers from the Collector’s debug console. However, you can ping those servers that Logic Monitor reports as down. If I log into the collector, the Host Staus messages clear (only login, do not open anything). This is what is baffling us. Has anyone seen anything like this? Thank you very much for your help.145Views10likes1CommentScript Walkthrough - Automating Collector Installs
Let’s walk through the attached Python script that utilizes the LogicMonitor API. This script will automate a collector install for Linux. It will Create the Collector Object, Download the collector installer, give the collector executable permissions, and finally install and register the collector. Full documentation including examples for the LogicMonitor REST API can be fond in the below link https://www.logicmonitor.com/support/rest-api-developers-guide/ We have examples for most of the functions in the API on our support site. Using these examples, it’s possible to copy\paste only making minor changes to create a script for your needs. This example will explain how to do this as well as combine multiple example scripts together. Declaring the environment and classes. This can be mostly copied\pasted from the example templates. #!/bin/env python import requests import json import hashlib import base64 import time import hmac import commands This is the authentication setup. It’s easier than it looks. To get the AccessID and AccessKey, open the console and create a new or use an existing user. Under the API Tokens, press the + button to generate the tokens. The company name is the portal ie, mine is ‘lmjeffwoeber.logicmonitor.com’ so my company is 'lmjeffwoeber' #Account Info AccessId ='bB29823sN4MdwC9B3k3i' AccessKey ='P-6D)xH_76Q4+AS2-T67hZ%N3|Nc2]6LC4U647%5' Company = 'lmjeffwoeber' Now that we have our authentication setup we need to gather the data to put into our API call URL and create the collector object on the portal. This is from the example on the Add a Collector page https://www.logicmonitor.com/support/rest-api-developers-guide/collectors/add-a-collector/ Feel free to add or remove properties to the “data=’{" string to fit your environment, a complete list of properties can be found in the above link. #Create Collector Object #Request Info httpVerb ='POST' resourcePath = '/setting/collectors' queryParams = '' data = '{"description":"TestCollector1","backupAgentId":39}' #Construct URL url = 'https://'+ Company +'.logicmonitor.com/santaba/rest' + resourcePath +queryParams Next construct the URL, this can be mostly copied\pasted as it does not really change. #Get current time in milliseconds epoch = str(int(time.time() * 1000)) #Concatenate Request details requestVars = httpVerb + epoch + data + resourcePath #Construct signature signature = base64.b64encode(hmac.new(AccessKey,msg=requestVars,digestmod=hashlib.sha256).hexdigest()) #Construct headers auth = 'LMv1 ' + AccessId + ':' + signature + ':' + epoch headers = {'Content-Type':'application/json','Authorization':auth} This part executes the URL and the API will create the Collector Object #Make request response = requests.post(url, data=data, headers=headers) Next is the tricky part. We need the collector ID for the rest of the script so we have to extract that from the returned JSON file and add it to a local variable for later use. LogicMonitor uses the JSON format as payloads. You can read about parsing JSON files from http://docs.python-guide.org/en/latest/scenarios/json/ Lets use the script to walk through the parsing process. This is JSON snippet is what the Add Collector function will return. Response Body: { "status" : 200, "errmsg" : "OK", "data" : { "id" : 84, "createdOn" : 1486761412, "updatedOn" : 1486761412, "upTime" : 0, "watchdogUpdatedOn" : 1486761412, "status" : 0, The collectorID:# or '"id" : 84' is needed for the rest of the script. The jsonResponse = json.loads(response.content) is used to grab the JSON response from the above response function and define it to the local variable jsonResponse. This will give the script access to the returned JSON data. The JSON dictionaries needs to be specified to pull specific data, to accomplish this take a look at the "{", entries in the JSON snippet. These are the dictionaries. To simplify this, we need to place them in [ ] to pull the data out of the JSON file. In this case their is only the main body dictionary which does not need to be references and a "data" dictionary. To pull the value for the ID dictionary use the syntax ['data']['id'] as seen in the example below. #Parse response jsonResponse = json.loads(response.content) #The CollectorID is needed to download the installer deviceID=(jsonResponse['data']['id']) Now the ID number is assigned to the variable 'deviceID'. We are using the Collector ID for URLs so we need to convert this from a int to a string. Easy enough using the str() function #Converting the int to a str deviceIDstr=str(deviceID) #print(deviceIDstr) Now the string version of the collector ID is in the variable deviceIDstr and we can use that in the API URLs. The print function provides nice feedback for the end user so they can track what is happening. print"Create Collector Object ID:"+(deviceIDstr)+" success!" The first part is done and we have created a Collector Object on the portal and stored the Collector ID locally in a variable. Time to download the collector installer. The template for this section can be found on our support site https://www.logicmonitor.com/support/rest-api-developers-guide/collectors/downloading-a-collector-installer/ Declaring the environment and classes and setting up authentication can be skipped as it’s already done. Lets build the URL according to the example script. #Download Collector Installer #Request Info httpVerb ='GET' Next add the collector ID to the URL this can do this by adding in the deviceIDstr var directly in the resource path. #Adding the CollectorID to the URL resourcePath = '/setting/collectors/'+deviceIDstr+'/installers/Linux64' Any property found on the above link to the REST API Collector download can be set on the queryParams variable. The example is using collectorsize= and setting it to nano, as this is just a lab. #Specify size [nano|small|medium|large] queryParams = '?collectorSize=nano' data = '' Just in the case as the previous section, it's possible to copy\paste the construction of the URL as it’s mostly the same as the example. #Construct URL url = 'https://'+ Company +'.logicmonitor.com/santaba/rest' + resourcePath +queryParams #Get current time in milliseconds epoch = str(int(time.time() * 1000)) #Concatenate Request details requestVars = httpVerb + epoch + data + resourcePath #Construct signature signature = base64.b64encode(hmac.new(AccessKey,msg=requestVars,digestmod=hashlib.sha256).hexdigest()) #Construct headers auth = 'LMv1 ' + AccessId + ':' + signature + ':' + epoch headers = {'Content-Type':'application/json','Authorization':auth} #Make request response = requests.get(url, data=data, headers=headers) This part downloads the collector as “LogicMonitorSetup.bin” to the current working directory. #Print status and write body of response to a file print 'Response Status:',response.status_code file_ = open('LogicMonitorSetup.bin', 'w') file_.write(response.content) file_.close() The download is now complete, now we need to give the LogicMonitorSetup.bin file execute permissions and run it. I used the commands function feel free to use any preferred alternative, we are just running shell commands at this point. #Give execute perm to collector install and install with the silent option commands.getstatusoutput('chmod +x LogicMonitorSetup.bin') End user feedback print"adding execute permissions to the collector download" print"Starting collector install" Run the Setup.bin file with the silent option -y A full list of install options can be seen by running ./LogicMonitorSetup.bin -h commands.getstatusoutput('./LogicMonitorSetup.bin -y') print"Script Complete" And that's it! A new collector should be registered on the portal. -Jeff Below is a copy of the example script used for this post. #!/bin/env python import requests import json import hashlib import base64 import time import hmac import commands #Account Info AccessId ='j53939s54CP3Z9SUp6S5' AccessKey ='k[t2nP6-Srie[=M9Ju%-H8riy8Sww3Mp9j%kse5X' Company = 'lmjeffwoeber' #Create Collector Object #Request Info httpVerb ='POST' resourcePath = '/setting/collectors' queryParams = '' data = '{"description":"TestCollector1"}' #Construct URL url = 'https://'+ Company +'.logicmonitor.com/santaba/rest' + resourcePath +queryParams #Get current time in milliseconds epoch = str(int(time.time() * 1000)) #Concatenate Request details requestVars = httpVerb + epoch + data + resourcePath #Construct signature signature = base64.b64encode(hmac.new(AccessKey,msg=requestVars,digestmod=hashlib.sha256).hexdigest()) #Construct headers auth = 'LMv1 ' + AccessId + ':' + signature + ':' + epoch headers = {'Content-Type':'application/json','Authorization':auth} #Make request response = requests.post(url, data=data, headers=headers) #Parse response jsonResponse = json.loads(response.content) #The CollectorID is needed to download the installer deviceID=(jsonResponse['data']['id']) #Converting the int to a str deviceIDstr=str(deviceID) #print(deviceIDstr) print"Create Collector Object ID:"+(deviceIDstr)+" success!" #Download Collector Installer #Request Info httpVerb ='GET' #Adding the CollectorID to the URL resourcePath = '/setting/collectors/'+deviceIDstr+'/installers/Linux64' #Specify size [nano|small|medium|large] queryParams = '?collectorSize=nano' data = '' #Construct URL url = 'https://'+ Company +'.logicmonitor.com/santaba/rest' + resourcePath +queryParams #Get current time in milliseconds epoch = str(int(time.time() * 1000)) #Concatenate Request details requestVars = httpVerb + epoch + data + resourcePath #Construct signature signature = base64.b64encode(hmac.new(AccessKey,msg=requestVars,digestmod=hashlib.sha256).hexdigest()) #Construct headers auth = 'LMv1 ' + AccessId + ':' + signature + ':' + epoch headers = {'Content-Type':'application/json','Authorization':auth} #Make request response = requests.get(url, data=data, headers=headers) #Print status and write body of response to a file Print"Downloading Collector Installer" print 'Response Status:',response.status_code file_ = open('LogicMonitorSetup.bin', 'w') file_.write(response.content) file_.close() #Give execute perm to collector install and install with the silent option commands.getstatusoutput('chmod +x LogicMonitorSetup.bin') print"adding execute permissions to the collector download" print"Starting collector install" #-m bypasses mem check as my lab only has 1 gig of ram. Remove in production commands.getstatusoutput('./LogicMonitorSetup.bin -y -m') print"Script Complete"143Views1like1CommentBug early release Collector Update V34.500
I have updated some of our collectors to the early release V34.500. After the update, there were various alerts from the DataSource Citrix_XenApp_DatastoreStatus, which could no longer read any data. After a short error analysis and further tests with other collectors, I replaced the here-string in the PowerShell script with a normal string input: OOTB: # Get XenApp specific creds $XenAppUser = @' ##XENAPP.USER## '@ $XenAppPass = @' ##XENAPP.PASS## '@ After customization: # Get XenApp specific creds $XenAppUser = '##XENAPP.USER##' $XenAppPass = '##XENAPP.PASS##' The query then worked perfectly again. Has anyone else experienced this phenomenon in their environment?Solved141Views21likes5Comments