Custom collectors
agent = require("agent")
time = require("time")
def customeCollectorImpl(ctx):
# output a message to agent's console
log.debug("some message")
# push a message to IC log receiever
ctx.pushLogMessage(
log = { # required
"mathod": "POST", # application data
"status:" "OK", # ...
},
tags = { # optional parameters
}
)
custom = agent.collector.custom(
impl = customCollectorImpl, # required
scrapePeriod = time.second * 15, # optional, by default 15 seconds
)