This is the PushToEmiGrabber grabber. It is used to push all or part of the configured grabbers data to another conkw instance, through the /emi endpoint. It is used to to send metrics from one to another conkw instance.
net.pieroxy.conkw.webapp.grabbers.PushToEmiGrabber{
"implementation":"net.pieroxy.conkw.webapp.grabbers.PushToEmiGrabber",
"name":"p2emi",
"config": {
"toExtract":["sys"],
"url":"http://localhost:12789/emi?ns=test_emi",
"prefix":"mygrabber",
"timeout":200
}
}
name this is a unique name for this grabber.toExtract this is the list of extractors to extract and send away. All metrics from every extractor will be prefixed by the extractor name.prefix this is a unique string used to prefix all metrics.url This is pointing to the conkw instance you want to send your metrics to. Needs to be a http or https url. Note that you have to specify the grabber name on the target conkw instance through the ns parameter.timeout is the timeout set to each requests, in milliseconds. The default value is 200. For systems in the same LAN it is more than enough. If the systems must go through a slow connection, you might want to increase this number.Let's take the totalCpuUsage metric of the sys grabber. With the above configuration, the metric will be pushed as mygrabber_sys_totalCpuUsage. That's the prefix, the extractor name and the actual metric name, all separated by underscores.
Every second, the PushToEmiGrabber will grab metrics from the configured grabbers and send them to the distant conkw instance in one http (or https) call. This allows potentially thousands of servers to report their health status to a central instance.
PushToEmiGrabber waits 1s +/-10ms to avoid having all instance push their metrics at the same time.