ContributionsMost RecentMost LikesSolutionsRe: Node.js external scripting on new datasource Alright, I had some time to get this setup. Installed node and npm packages on the collector that is monitoring a specific resource. I uploaded the script via the new datasource and it appeared here/usr/local/logicmonitor/agent/local/bin, I am able to run "nodecompliance-count.js" in that directory and it works. Adding the script name "compliance-count.js" to linux/unix script and then parameters "node" is still giving me the same error. I don't think adding "node" to the linux/unix script box will work, it couldnt find the external script. /usr/local/logicmonitor/agent/local/bin/compliance-count.js: 1: Syntax error: word unexpected (expecting ")") Re: Node.js external scripting on new datasource That makes sense, I will give that a try and let you know. Thanks! Re: Node.js external scripting on new datasource I just tried"node compliance-count.js" within the datasource and I get the same syntax error. Re: Node.js external scripting on new datasource Locally on my laptop or another system that has node installed with a few npm packages. I would run it locally like this "node compliance-count.js". This is on a new datasource and then selecting upload script file. I tried adding "node" as a parameter. cleaned up script below const axios = require('axios'); const https = require('https'); const _ = require('lodash'); const usKEY = 'theapikey' const us_auth = { username: usKEY, password: '' } const agent = new https.Agent({ rejectUnauthorized: false }); axios.get("https://x.x.x.x/api/v1/system/active-users?number=400", {auth: us_auth, httpsAgent: agent}) .then(function (response) { const usData = response.data['active-users']["active-user-records"]["active-user-record"]; const allFiltered = _.filter(usData, {'endpoint-security-status': 'Not Compliant\nPassed Policies: \nFailed Policies: Crowdstrike\nEliminated Roles: '}); console.log(allFiltered) console.log(allFiltered.length) }) Node.js external scripting on new datasource Hi All, Has anyone had success with uploading a node.js/javascript script into a new datasource for data collection? I have a very simple script that does an API call and I'm just saving the length of an array I get back in the response. How does an LM collector handle this script with NPM packages? I'm getting syntax errors after testing the script within the new datasource, the script works find locally. Re: LogicMonitor collectors running vulnerable version of Log4j are affected by "Log4shell" CVE-2021-44228 vulnerability? 1 hour ago, alan said: Has anyone been able to confirm log4j has updated to 2.17? Linux collectors on 31.002 are still showing 2.13 jars. My mistake, was using the locate command and didn't realize the locate DB does not automatically update. log4j is at 2.17 after the linux collector update. Re: LogicMonitor collectors running vulnerable version of Log4j are affected by "Log4shell" CVE-2021-44228 vulnerability? Just now, Mosh said: Hi @alan, where are you seeing JARs for 2.13? /usr/local/logicmonitor/agent/lib/log4j-1.2-api-2.13.2.jar /usr/local/logicmonitor/agent/lib/log4j-api-2.13.2.jar /usr/local/logicmonitor/agent/lib/log4j-core-2.13.2.jar Re: LogicMonitor collectors running vulnerable version of Log4j are affected by "Log4shell" CVE-2021-44228 vulnerability? Has anyone been able to confirm log4j has updated to 2.17? Linux collectors on 31.002 are still showing 2.13 jars.
Top ContributionsNode.js external scripting on new datasourceRe: LogicMonitor collectors running vulnerable version of Log4j are affected by "Log4shell" CVE-2021-44228 vulnerability?Re: LogicMonitor collectors running vulnerable version of Log4j are affected by "Log4shell" CVE-2021-44228 vulnerability?Re: LogicMonitor collectors running vulnerable version of Log4j are affected by "Log4shell" CVE-2021-44228 vulnerability?Re: Node.js external scripting on new datasourceRe: Node.js external scripting on new datasourceRe: Node.js external scripting on new datasourceRe: Node.js external scripting on new datasource