Skip to content

blocknative/td-agent-service-monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

td-agent-service-monitor

Usage

Enable td-agent Monitoring Agent by adding these lines to your td-agent configuration file

<source>
  @type monitor_agent
  bind 0.0.0.0
  port 24220
</source>

Start getting updates in node.js

const tdAgentServiceMonitor = require('td-agent-service-monitor')
const callback = (ServiceStatus) => { /* do something with ServiceStatus */ }
const config = { callback }
tdAgentServiceMonitor.start(config)

Stop updates

tdAgentServiceMonitor.stop()

More config options

option description default
host monitor-agent port '0.0.0.0'
port monitor-agent port '24220'
checkInterval interval in ms to check td-agent 10000
callback function to call with td-agent ServiceStatus no op

ServiceStatus

{
  alive: Boolean, // did monitor-agent respond?
  plugins: Plugin[] // see https://docs.fluentd.org/input/monitor_agent#output-example
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published