New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

logagent-js

Package Overview
Dependencies
Maintainers
2
Versions
133
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

logagent-js - npm Package Compare versions

Comparing version 1.1.48 to 1.1.49

84

bin/logagent.js

@@ -35,4 +35,7 @@ #!/bin/sh

var https = require('https')
var http = require('http')
// limit number of socket connections to Logsene
https.globalAgent.maxSockets = 20
// limit number of socket connections to Logsene
http.globalAgent.maxSockets = 10000
var prettyjson = require('prettyjson')

@@ -192,3 +195,3 @@ var LogAnalyzer = require('../lib/index.js')

res.end('<html><head><link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"</head><body><div class="alert alert-danger" role="alert">Error: Missing Logsene Token ' +
req.url + '. Please use /LOGSENE_TOKEN. More info: <ul><li><a href="https://github.com/sematext/logagent-js#logagent-as-heroku-log-drain">Heroku Log Drain for Logsene</a> </li><li><a href="https://www.sematext.com/logsene/">Logsene Log Management by Sematext</a></li></ul></div></body><html>')
req.url + '. Please use /LOGSENE_TOKEN. More info: <ul><li><a href="https://github.com/sematext/logagent-js#logagent-as-heroku-log-drain">Heroku Log Drain for Logsene</a> </li><li><a href="https://www.sematext.com/logsene/">Logsene Log Management by Sematext</a></li></ul></div></body><html>')
return

@@ -206,8 +209,18 @@ }

}
parseLine(line, argv.n || 'heroku', function (err, data) {
if (data) {
data.headers = req.headers
}
getLoggerForToken(token, 'heroku')(err, data)
})
try {
parseLine(body, argv.n || 'heroku', function (err, data) {
if (data) {
parseLine(data.message, 'undefined', function (e, d) {
if (d) {
Object.keys(d).forEach(function (key) {
data[key] = d[key]
})
}
getLoggerForToken(token, 'heroku')(err, data)
})
}
})
} catch (unknownError) {
console.log(new Date() + ': ' + unknownError + ' ' + unknownError.stack)
}
})

@@ -217,3 +230,3 @@ res.end('ok\n')

} catch (err) {
console.error(err)
console.error(new Date() + ': ' + err)
}

@@ -252,3 +265,3 @@ }

res.end('<html><head><link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"</head><body><div class="alert alert-danger" role="alert">Error: Missing Logsene Token ' +
req.url + '. Please use /LOGSENE_TOKEN. More info: <ul><li><a href="https://github.com/sematext/logagent-js">CloudFoundry Log Drain for Logsene</a> </li><li><a href="https://www.sematext.com/logsene/">Logsene Log Management by Sematext</a></li></ul></div></body><html>')
req.url + '. Please use /LOGSENE_TOKEN. More info: <ul><li><a href="https://github.com/sematext/logagent-js">CloudFoundry Log Drain for Logsene</a> </li><li><a href="https://www.sematext.com/logsene/">Logsene Log Management by Sematext</a></li></ul></div></body><html>')
return

@@ -261,9 +274,20 @@ }

req.on('end', function () {
parseLine(body, argv.n || 'cloudfoundry', function (err, data) {
if (data) {
data.headers = req.headers
}
getLoggerForToken(token, 'cloudfoundry')(err, data)
})
res.end('ok')
try {
parseLine(body, argv.n || 'cloudfoundry', function (err, data) {
if (data) {
parseLine(data.message, 'undefined', function (e, d) {
if (d) {
Object.keys(d).forEach(function (key) {
data[key] = d[key]
})
}
getLoggerForToken(token, 'cloudfoundry')(err, data)
})
}
})
res.end()
} catch (unknownError) {
console.log(unknownError.stack)
res.end()
}
})

@@ -359,2 +383,5 @@ }

function parseLine (line, sourceName, cbf) {
if (!line && cbf) {
return cbf(new Error('empty line passed to parseLine()'))
}
bytes += line.length

@@ -392,2 +419,16 @@ count++

function printStats () {
var now = new Date().getTime()
var duration = now - begin
var throughput = count / (duration / 1000)
var throughputBytes = (bytes / 1024 / 1024) / (duration / 1000)
begin = now
count = 0
bytes = 0
console.error(duration + ' ms ' + count + ' lines parsed. ' + throughput.toFixed(0) + ' lines/s ' + throughputBytes.toFixed(3) + ' MB/s - empty lines: ' + emptyLines)
console.error('Heap Used: ' + (process.memoryUsage().heapUsed / (1024 * 1024)) + ' MB')
console.error('Heap Total: ' + (process.memoryUsage().heapTotal / (1024 * 1024)) + ' MB')
console.error('Memory RSS: ' + (process.memoryUsage().rss / (1024 * 1024)) + ' MB')
}
function terminate (reason) {

@@ -397,11 +438,5 @@ if (argv.heroku && reason !== 'exitWorker') {

}
var duration = new Date().getTime() - begin
var throughput = count / (duration / 1000)
var throughputBytes = (bytes / 1024 / 1024) / (duration / 1000)
if (argv.s) {
console.error(duration + ' ms ' + count + ' lines parsed. ' + throughput.toFixed(0) + ' lines/s ' + throughputBytes.toFixed(3) + ' MB/s - empty lines: ' + emptyLines)
console.error('Heap Used: ' + (process.memoryUsage().heapUsed / (1024 * 1024)) + ' MB')
console.error('Heap Total: ' + (process.memoryUsage().heapTotal / (1024 * 1024)) + ' MB')
console.error('Memory RSS: ' + (process.memoryUsage().rss / (1024 * 1024)) + ' MB')
printStats()
}

@@ -421,2 +456,5 @@ setTimeout(function () {

function cli () {
if (argv.print_stats) {
setInterval(printStats, Number(argv.print_stats) * 1000)
}
if (argv['rtail-web-port']) {

@@ -423,0 +461,0 @@ console.log('loading rtail')

@@ -35,3 +35,3 @@ [![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy?template=https://github.com/sematext/logagent-js) - [read more](http://blog.sematext.com/2016/02/18/how-to-ship-heroku-logs-to-logsene-managed-elk-stack/)

## Processing
- logagent-js applies the patterns defined in ```patterns.yml' to all logs to create structured output from plain text lines. Patterns are defined for input sources with regular expressions. The parsed logs can be post-processed with node.js transform function e.g. to enrich data or perform complex parser operations.
- logagent-js applies the patterns defined in ```patterns.yml``` to all logs to create structured output from plain text lines. Patterns are defined for input sources with regular expressions. The parsed logs can be post-processed with node.js transform function e.g. to enrich data or perform complex parser operations.
- GeoIP lookups for IP adress fields, including download and update of the GeoIP lite database from Maxmind

@@ -74,2 +74,2 @@

- Blog: [blog.sematext.com](http://blog.sematext.com)
- Homepage: [www.sematext.com](http://www.sematext.com)
- Homepage: [www.sematext.com](http://www.sematext.com)

@@ -115,3 +115,3 @@ ## Preparation: Install Node.js

```
Now you can see your logs in Logsene, define Alert-Queries or use Kibana 4 for Dashboards.
Now you can see your logs in Logsene, define Alert-Queries or use Kibana for Dashboards.

@@ -118,0 +118,0 @@ 3. Scale logagent-js service on Heroku

{
"name": "logagent-js",
"version": "1.1.48",
"version": "1.1.49",
"description": "Smart log parser written in Node",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -5,3 +5,3 @@ {

"location": "/",
"text": "- \nread more\n\n\nlogagent-js\n\n\nSmart Log Parser and Log Shipper written in Node. \n\n\nFeatures\n\n\nThis project contains a library and patterns for log parsing and cli tools and installers to use logagent-js as log shipper with following features: \n\n\nParser\n\n\n\n\nlog format detection and intelligent pattern matching \n\n\npattern library included \n\n\nrecognition of Date and Number fields\n\n\neasy to extend with custom patterns and JS transform functions\n\n\nreplace sensitive data with SHA-1 hash codes\n\n\nGeoIP lookup with automatic GeoIP db updates (maxmind geopip-lite files)\n\n\n\n\nCommand Line Tool\n\n\n\n\nlog format converter (e.g. text to JSON, line delimited JSON or YAML) \n\n\n\n\nLog shipper for \nLogsene\n\n\n\n\n\n\nincluding cli, launchd (Mac OS X), upstart and systemd (Linux) service installer\n\n\n\n\ndisk buffer for failed inserts during network outage\n\n\n\n\nInputs\n\n\n\n\nStandart input (stdin) taking the output stream from any Linux cli tool\n\n\npatterns are applied to each incomming text lines, including support for multi-line patters, e.g. for Java Stack Traces and JSON parser. \n\n\nSyslog Server (UDP) - reception of Syslog messages via UDP. The parser is applied to the message field. \n\n\nHeroku Log Drain\n\n\nCloudFoundry Log Drain\n\n\n\n\nProcessing\n\n\n\n\nlogagent-js applies the patterns defined in ```patterns.yml' to all logs to create structured output from plain text lines. Patterns are defined for input sources with regular expressions. The parsed logs can be post-processed with node.js transform function e.g. to enrich data or perform complex parser operations. \n\n\nGeoIP lookups for IP adress fields, including download and update of the GeoIP lite database from Maxmind\n\n\n\n\nSecurity\n\n\n\n\nMasking sensitive data - Logagent can relace field content with SHA-1 hash codes to mask sensitive data. The advantage of hash codes is that data is still searchable when you hash the original value before you start a search. In addtion it is possible to exclude the original log line from shipping to avoid that sensitive data gets shipped in the field \"originalLogLine\".\n\n\nShipping logs to Logsene is done via https by default \n\n\nSupport of proxy servers if the logging server is behind a firewall\n\n\n\n\nReliable log shipping with disk buffer\n\n\nLogagent stores parsed logs to disk in case the network connection to the Elasticsearch API fails. Logagent retries to ship the logs later, when the network or Elasticsearch server is available again. \n\n\nOutputs\n\n\n\n\nbulk inserts to \nLogsene\n / Elasticsearch API\n\n\nJSON, line delimited JSON and YML to stadard output \n\n\n\n\nDeployment options\n\n\n\n\nDeployable as system service: systemd, upstart (Linux) launchd (Mac OS X)setups \n\n\nDocker Container to receive logs via syslog\n\n\nDeployement to Heroku as Heroku Log drain\n\n\n\n\nAPI\n\n\n\n\nNode.js module to integrate parsers into Node.js programs\n\n\nlogagent-js is part of \nSPM for Docker\n to parse Container Logs\n\n\n\n\nRelated packages\n\n\n\n\nSematext Agent for Docker\n - collects metrics, events and logs from Docker API and CoreOS. Logagent-js is a component of sematext-agent-docker. More Information: \nInnovative Docker Log Management\n\n\nLogsene-CLI\n - Enables searching Logsene log entries from the command-line. \n\n\nSPM Agent for Node.js\n - collects performance metrics for Node and io.js applications\n\n\nCustom Metrics\n - Custom Metrics for SPM \n\n\nWinston-Logsene\n - Logging for Node.js - Winston transport layer for Logsene\n\n\n\n\nSupport\n\n\n\n\nTwitter: \n@sematext\n\n\nBlog: \nblog.sematext.com\n\n\nHomepage: \nwww.sematext.com",
"text": "- \nread more\n\n\nlogagent-js\n\n\nSmart Log Parser and Log Shipper written in Node. \n\n\nFeatures\n\n\nThis project contains a library and patterns for log parsing and cli tools and installers to use logagent-js as log shipper with following features: \n\n\nParser\n\n\n\n\nlog format detection and intelligent pattern matching \n\n\npattern library included \n\n\nrecognition of Date and Number fields\n\n\neasy to extend with custom patterns and JS transform functions\n\n\nreplace sensitive data with SHA-1 hash codes\n\n\nGeoIP lookup with automatic GeoIP db updates (maxmind geopip-lite files)\n\n\n\n\nCommand Line Tool\n\n\n\n\nlog format converter (e.g. text to JSON, line delimited JSON or YAML) \n\n\n\n\nLog shipper for \nLogsene\n\n\n\n\n\n\nincluding cli, launchd (Mac OS X), upstart and systemd (Linux) service installer\n\n\n\n\ndisk buffer for failed inserts during network outage\n\n\n\n\nInputs\n\n\n\n\nStandart input (stdin) taking the output stream from any Linux cli tool\n\n\npatterns are applied to each incomming text lines, including support for multi-line patters, e.g. for Java Stack Traces and JSON parser. \n\n\nSyslog Server (UDP) - reception of Syslog messages via UDP. The parser is applied to the message field. \n\n\nHeroku Log Drain\n\n\nCloudFoundry Log Drain\n\n\n\n\nProcessing\n\n\n\n\nlogagent-js applies the patterns defined in \npatterns.yml\n to all logs to create structured output from plain text lines. Patterns are defined for input sources with regular expressions. The parsed logs can be post-processed with node.js transform function e.g. to enrich data or perform complex parser operations. \n\n\nGeoIP lookups for IP adress fields, including download and update of the GeoIP lite database from Maxmind\n\n\n\n\nSecurity\n\n\n\n\nMasking sensitive data - Logagent can relace field content with SHA-1 hash codes to mask sensitive data. The advantage of hash codes is that data is still searchable when you hash the original value before you start a search. In addtion it is possible to exclude the original log line from shipping to avoid that sensitive data gets shipped in the field \"originalLogLine\".\n\n\nShipping logs to Logsene is done via https by default \n\n\nSupport of proxy servers if the logging server is behind a firewall\n\n\n\n\nReliable log shipping with disk buffer\n\n\nLogagent stores parsed logs to disk in case the network connection to the Elasticsearch API fails. Logagent retries to ship the logs later, when the network or Elasticsearch server is available again. \n\n\nOutputs\n\n\n\n\nbulk inserts to \nLogsene\n / Elasticsearch API\n\n\nJSON, line delimited JSON and YML to stadard output \n\n\n\n\nDeployment options\n\n\n\n\nDeployable as system service: systemd, upstart (Linux) launchd (Mac OS X)setups \n\n\nDocker Container to receive logs via syslog\n\n\nDeployement to Heroku as Heroku Log drain\n\n\n\n\nAPI\n\n\n\n\nNode.js module to integrate parsers into Node.js programs\n\n\nlogagent-js is part of \nSPM for Docker\n to parse Container Logs\n\n\n\n\nRelated packages\n\n\n\n\nSematext Agent for Docker\n - collects metrics, events and logs from Docker API and CoreOS. Logagent-js is a component of sematext-agent-docker. More Information: \nInnovative Docker Log Management\n\n\nLogsene-CLI\n - Enables searching Logsene log entries from the command-line. \n\n\nSPM Agent for Node.js\n - collects performance metrics for Node and io.js applications\n\n\nCustom Metrics\n - Custom Metrics for SPM \n\n\nWinston-Logsene\n - Logging for Node.js - Winston transport layer for Logsene\n\n\n\n\nSupport\n\n\n\n\nTwitter: \n@sematext\n\n\nBlog: \nblog.sematext.com\n\n\nHomepage: \nwww.sematext.com",
"title": "Features and Overview"

@@ -36,3 +36,3 @@ },

"location": "/#processing",
"text": "logagent-js applies the patterns defined in ```patterns.yml' to all logs to create structured output from plain text lines. Patterns are defined for input sources with regular expressions. The parsed logs can be post-processed with node.js transform function e.g. to enrich data or perform complex parser operations. GeoIP lookups for IP adress fields, including download and update of the GeoIP lite database from Maxmind",
"text": "logagent-js applies the patterns defined in patterns.yml to all logs to create structured output from plain text lines. Patterns are defined for input sources with regular expressions. The parsed logs can be post-processed with node.js transform function e.g. to enrich data or perform complex parser operations. GeoIP lookups for IP adress fields, including download and update of the GeoIP lite database from Maxmind",
"title": "Processing"

@@ -77,3 +77,3 @@ },

"location": "/installation/",
"text": "Preparation: Install Node.js\n\n\nOfficial Node.js \ndownloads and instructions\n.\nE.g. for Debian/Ubuntu:\n\n\ncurl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -\nsudo apt-get install -y nodejs\n\n\n\n\nLogagnet command line tool with npm\n\n\nnpm i -g logagent-js\n# Test to ship your logs to Logsene, parsed with timestamps - output on console in YAML format (-y)\nlogagent -y /var/log/*.log\n\n\n\n\nLinux or Mac OS X service for Logsene\n\n\n\n\nGet a free account at \nsematext.com/spm\n \n\n\ncreate a Logsene App\n to obtain an App Token for \nLogsene\n \n\n\nInstall logagnet as system service\nLogagent detects the init system and installs systemd or upstart service scripts. \nOn Mac OS X it creates a launchd service. Simply run:\n\n\n\n\nnpm i logagent-js -g # install logagent package globally\nsudo logagent-setup LOGSENE_TOKEN\n\n\n\n\nThe setup script generates a configuraton file in \n/etc/sematext/logagent.conf\n.\nThis file includes the CLI parameters for logagent running as service.\nThe default settings ship all logs from \n`/var/log/**/*.log\n to Logsene. \n\n\nLocation of service scripts:\n- upstart: /etc/init/logagent.conf\n- systemd: /etc/systemd/system/logagent.service\n- launchd: /Library/LaunchDaemons/com.sematext.logagent.plist\n\n\nStart/stop service: \n- upstart: \nservice logagent stop/start\n\n- systemd: \nsystemctl stop/start logagent\n\n- lauchnchd: \nlaunchctl start/stop com.sematext.logagent\n\n\nDocker - receive logs via syslog\n\n\nBuild the image and start logagent with the LOGSENE_TOKEN\n\n\ngit clone https://github.com/sematext/logagent-js.git\ncd logagent-js\ndocker build -t logagent . \ndocker run -p 514:514/udp -e LOGSENE_TOKEN=YOUR_LOGSENE_TOKEN -d --name logagent --restart=always logagent\n\n\n\n\nRun your container with syslog driver\n\n\nexport $DOCKER_HOSTNAME=192.168.99.100\ndocker run --log-driver=syslog --log-opt syslog-address=udp://$DOCKER_HOSTNAME:514 --log-opt tag=\n{{.ImageName}}#{{.Name}}#{{.ID}}\n -p 9003:80 -d nginx\ncurl $DOCKER_HOSTNAME:9003\n\n\n\n\nContainer Options\n\n- Pass a custom pattern file\n\n\n-v $PWD/patterns.yml:/patterns.yml -e PATTERN_FILE=/patterns.yml\n\n\n\n\n\n\nSet any CLI option\ne.g. print logs in YML format to console (default is \"-s\" - silent)\n\n\n\n\n-e LOGAGENT_OPTIONS=\n-y\n\n\n\n\n\nTo view realtime logs in the Web Browser with rtail, simply add the options for rtail and open the http port for rtail-server UI. Please note: \nrtail UI might be slow for high log volumes\n\n\nexport LOGAGENT_OPTIONS=\n-s --rtail-host $HOSTNAME --rtail-web-port 80 --rtail-port 9999\n\ndocker run -p 8080:80 -p 514:514/udp -e LOGAGENT_OPTIONS -e LOGSENE_TOKEN=YOUR_LOGSENE_TOKEN -d --name logagent --restart=always logagent\n\n\n\n\n\n\nSet Node.js Memory limits\n\n\n\n\n-e NODE_OPTIONS=\n--max-old-space-size=200\n\n\n\n\n\nPlease note \nSematext Agent Docker\n might be of interest if you like to collect logs, events and metrics from Docker. \n\n\nInstall logagent as Heroku log drain\n\n\nHeroku\n can forward logs to a \nLog Drain\n \n\n\nheroku drain:add --app HerokuAppName URL \n\n\n\n\nTo receive Heroku logs, logagent-js can be deployed to Heroku. It acts as HTTPS log drain. \n\n\n\n\nGet a free account \napps.sematext.com\n \n\n\nCreate a \nLogsene\n App to obtain the Logsene Token\n\n\nDeploy logagent-js to Heroku \n\n\n\n\n or use the following commands:\n\n\ngit clone https://github.com/sematext/logagent-js.git\n cd logagent-js\n heroku login \n heroku create\n git push heroku master\n\n4. Add the the log drain.\n\n The URL format is https://loggerAppName.herokuapps.com/LOGSENE_TOKEN\n Use following command, using the dynamically given name from \"heroku create\".\n\n\nexport LOGSENE_TOKEN=YOUR_LOGSENE_TOKEN\n heroku drains:add --app YOUR_HEROKU_MAIN_APPLICATION `heroku info -s | grep web-url | cut -d= -f2`$LOGSENE_TOKEN\n\nNow you can see your logs in Logsene, define Alert-Queries or use Kibana 4 for Dashboards. \n\n\n\n\nScale logagent-js service on Heroku\n\n\n\n\nIn case of high log volume, scale logagent-js on demand using \n\n\nheroku scale web=3",
"text": "Preparation: Install Node.js\n\n\nOfficial Node.js \ndownloads and instructions\n.\nE.g. for Debian/Ubuntu:\n\n\ncurl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -\nsudo apt-get install -y nodejs\n\n\n\n\nLogagnet command line tool with npm\n\n\nnpm i -g logagent-js\n# Test to ship your logs to Logsene, parsed with timestamps - output on console in YAML format (-y)\nlogagent -y /var/log/*.log\n\n\n\n\nLinux or Mac OS X service for Logsene\n\n\n\n\nGet a free account at \nsematext.com/spm\n \n\n\ncreate a Logsene App\n to obtain an App Token for \nLogsene\n \n\n\nInstall logagnet as system service\nLogagent detects the init system and installs systemd or upstart service scripts. \nOn Mac OS X it creates a launchd service. Simply run:\n\n\n\n\nnpm i logagent-js -g # install logagent package globally\nsudo logagent-setup LOGSENE_TOKEN\n\n\n\n\nThe setup script generates a configuraton file in \n/etc/sematext/logagent.conf\n.\nThis file includes the CLI parameters for logagent running as service.\nThe default settings ship all logs from \n`/var/log/**/*.log\n to Logsene. \n\n\nLocation of service scripts:\n- upstart: /etc/init/logagent.conf\n- systemd: /etc/systemd/system/logagent.service\n- launchd: /Library/LaunchDaemons/com.sematext.logagent.plist\n\n\nStart/stop service: \n- upstart: \nservice logagent stop/start\n\n- systemd: \nsystemctl stop/start logagent\n\n- lauchnchd: \nlaunchctl start/stop com.sematext.logagent\n\n\nDocker - receive logs via syslog\n\n\nBuild the image and start logagent with the LOGSENE_TOKEN\n\n\ngit clone https://github.com/sematext/logagent-js.git\ncd logagent-js\ndocker build -t logagent . \ndocker run -p 514:514/udp -e LOGSENE_TOKEN=YOUR_LOGSENE_TOKEN -d --name logagent --restart=always logagent\n\n\n\n\nRun your container with syslog driver\n\n\nexport $DOCKER_HOSTNAME=192.168.99.100\ndocker run --log-driver=syslog --log-opt syslog-address=udp://$DOCKER_HOSTNAME:514 --log-opt tag=\n{{.ImageName}}#{{.Name}}#{{.ID}}\n -p 9003:80 -d nginx\ncurl $DOCKER_HOSTNAME:9003\n\n\n\n\nContainer Options\n\n- Pass a custom pattern file\n\n\n-v $PWD/patterns.yml:/patterns.yml -e PATTERN_FILE=/patterns.yml\n\n\n\n\n\n\nSet any CLI option\ne.g. print logs in YML format to console (default is \"-s\" - silent)\n\n\n\n\n-e LOGAGENT_OPTIONS=\n-y\n\n\n\n\n\nTo view realtime logs in the Web Browser with rtail, simply add the options for rtail and open the http port for rtail-server UI. Please note: \nrtail UI might be slow for high log volumes\n\n\nexport LOGAGENT_OPTIONS=\n-s --rtail-host $HOSTNAME --rtail-web-port 80 --rtail-port 9999\n\ndocker run -p 8080:80 -p 514:514/udp -e LOGAGENT_OPTIONS -e LOGSENE_TOKEN=YOUR_LOGSENE_TOKEN -d --name logagent --restart=always logagent\n\n\n\n\n\n\nSet Node.js Memory limits\n\n\n\n\n-e NODE_OPTIONS=\n--max-old-space-size=200\n\n\n\n\n\nPlease note \nSematext Agent Docker\n might be of interest if you like to collect logs, events and metrics from Docker. \n\n\nInstall logagent as Heroku log drain\n\n\nHeroku\n can forward logs to a \nLog Drain\n \n\n\nheroku drain:add --app HerokuAppName URL \n\n\n\n\nTo receive Heroku logs, logagent-js can be deployed to Heroku. It acts as HTTPS log drain. \n\n\n\n\nGet a free account \napps.sematext.com\n \n\n\nCreate a \nLogsene\n App to obtain the Logsene Token\n\n\nDeploy logagent-js to Heroku \n\n\n\n\n or use the following commands:\n\n\ngit clone https://github.com/sematext/logagent-js.git\n cd logagent-js\n heroku login \n heroku create\n git push heroku master\n\n4. Add the the log drain.\n\n The URL format is https://loggerAppName.herokuapps.com/LOGSENE_TOKEN\n Use following command, using the dynamically given name from \"heroku create\".\n\n\nexport LOGSENE_TOKEN=YOUR_LOGSENE_TOKEN\n heroku drains:add --app YOUR_HEROKU_MAIN_APPLICATION `heroku info -s | grep web-url | cut -d= -f2`$LOGSENE_TOKEN\n\nNow you can see your logs in Logsene, define Alert-Queries or use Kibana for Dashboards. \n\n\n\n\nScale logagent-js service on Heroku\n\n\n\n\nIn case of high log volume, scale logagent-js on demand using \n\n\nheroku scale web=3",
"title": "Installation"

@@ -103,3 +103,3 @@ },

"location": "/installation/#install-logagent-as-heroku-log-drain",
"text": "Heroku can forward logs to a Log Drain heroku drain:add --app HerokuAppName URL To receive Heroku logs, logagent-js can be deployed to Heroku. It acts as HTTPS log drain. Get a free account apps.sematext.com Create a Logsene App to obtain the Logsene Token Deploy logagent-js to Heroku or use the following commands: git clone https://github.com/sematext/logagent-js.git\n cd logagent-js\n heroku login \n heroku create\n git push heroku master \n4. Add the the log drain. \n The URL format is https://loggerAppName.herokuapps.com/LOGSENE_TOKEN\n Use following command, using the dynamically given name from \"heroku create\". export LOGSENE_TOKEN=YOUR_LOGSENE_TOKEN\n heroku drains:add --app YOUR_HEROKU_MAIN_APPLICATION `heroku info -s | grep web-url | cut -d= -f2`$LOGSENE_TOKEN \nNow you can see your logs in Logsene, define Alert-Queries or use Kibana 4 for Dashboards. Scale logagent-js service on Heroku In case of high log volume, scale logagent-js on demand using heroku scale web=3",
"text": "Heroku can forward logs to a Log Drain heroku drain:add --app HerokuAppName URL To receive Heroku logs, logagent-js can be deployed to Heroku. It acts as HTTPS log drain. Get a free account apps.sematext.com Create a Logsene App to obtain the Logsene Token Deploy logagent-js to Heroku or use the following commands: git clone https://github.com/sematext/logagent-js.git\n cd logagent-js\n heroku login \n heroku create\n git push heroku master \n4. Add the the log drain. \n The URL format is https://loggerAppName.herokuapps.com/LOGSENE_TOKEN\n Use following command, using the dynamically given name from \"heroku create\". export LOGSENE_TOKEN=YOUR_LOGSENE_TOKEN\n heroku drains:add --app YOUR_HEROKU_MAIN_APPLICATION `heroku info -s | grep web-url | cut -d= -f2`$LOGSENE_TOKEN \nNow you can see your logs in Logsene, define Alert-Queries or use Kibana for Dashboards. Scale logagent-js service on Heroku In case of high log volume, scale logagent-js on demand using heroku scale web=3",
"title": "Install logagent as Heroku log drain"

@@ -106,0 +106,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc