parkerd / statsd-zabbix-backend Goto Github PK
View Code? Open in Web Editor NEWSend data from StatsD to Zabbix
License: MIT License
Send data from StatsD to Zabbix
License: MIT License
Hello there,
It seems that StatsD handles multilevel parameters this way: traefik.entrypoint.request.duration[mean][90]
.
According to the documentation of Zabbix, it should be given in the format [key1,key2]
. The example above would end up like this: traefik.entrypoint.request.duration[mean,90]
It is therefore not possible to create one of this value in Zabbix.
Hi, @parkerd
I appreciate all your work on this module, and I'd like to use it in production environments at my company. However, the lack of an explicit provided license would preclude me from doing so.
Could you please provide a license with the module?
Thanks!
Hi,
I'm trying to integrate 2 beautiful projects - https://github.com/domnikl/statsd-php with the statsd-zabbix-backend.
In my php, I'm trying to send gauge to the statsd.
Here is how it looks like:
$logstashLength = rand(100,1000);
$connection = new \Domnikl\Statsd\Connection\Socket('localhost', 8125);
$statsd = new \Domnikl\Statsd\Client($connection, "redis.subdomain_domain_com");
$statsd->gauge('length', $logstashLength);
Here is how the value is stored in the mysql-backend:
Here is how the value is displayed in the statsd log:
5 Aug 10:37:47 - statsd.bad lines[total] 1407227867 0
statsd.bad lines[avg] 1407227867 0
statsd.packets received[total] 1407227867 1
statsd.packets received[avg] 1407227867 0.1
subdomain_domain_com length 1407227867 245
So, to catch the value on the zabbix side, currently I need to declare the host "subdomain_domain_com" and the attribute called "length".
My question - why zabbix backend doesn't convert the "_" to "." , as it did with the logstash values?
As soon as I would update my php to:
$logstashLength = rand(100,1000);
$connection = new \Domnikl\Statsd\Connection\Socket('localhost', 8125);
$statsd = new \Domnikl\Statsd\Client($connection, "redis.subdomain.domain.com");
$statsd->gauge('length', $logstashLength);
I receive the next in the logs:
5 Aug 10:48:36 - statsd.bad lines[total] 1407228517 0
statsd.bad lines[avg] 1407228517 0
statsd.packets received[total] 1407228517 1
statsd.packets received[avg] 1407228517 0.1
redis.subdomain.domain.com.length undefined 1407228517 169
What should I do in php to receive the correct hosname (with dots) during the zabbix export?
Regards,
Hi,
Currently I'm using the zabbix backend, and it works fine, but I want to send the same information to the other zabbix entity.
Is there any way to perform this? (I think there would be the problems with the configuration fields)
Any advice?
Regards,
Hello,
in the following fork : https://github.com/syncp/statsd-zabbix-backend there is a creation of zabbix item on the fly. I think it coulmd be interesting to look at it and merge it?
Hi, I was trying to setup statsd with this plugin and hit small issue.
Looks like by default plugin sends wrong data format to zabbix. I made logging move verbose so here is output when plugin is just running without any external data:
30 Jun 15:14:53 - statsd.bad lines[total] 1404141293 0
statsd.bad lines[avg] 1404141293 0
statsd.packets received[total] 1404141293 0
statsd.packets received[avg] 1404141293 0
statsd.timestamp lag 1404141293 0
30 Jun 15:14:53 - /usr/bin/zabbix_sender: zabbix_sender [32]: DEBUG: answer [{
"response":"success",
"info":"processed: 0; failed: 5; total: 5; seconds spent: 0.000061"}]
statsd version is v0.7.1
zabbix_sender version is:
zabbix_sender --version
Zabbix Sender v2.2.2 (revision 42525) (12 February 2014)
Compilation time: Feb 16 2014 23:34:44
Is it some issue in my configuration? Or is plugin outdated?
Thanks!
Please publish current version that uses the node-zabbix-sender
to npm.
Spent quite some time debugging to realize the difference.
Thanks
Hi there, in my logstash config I have the next:
statsd {
type => "apache-access"
increment => "apache_status_%{response}"
host => "127.0.0.1"
}
My Zabbix item is configured this way:
And here is what the statsd debug shows:
It looks like it sends the averages, not the exact name. Should it be like that?
Mysql statsd backend shows the next:
While I don't see any data in my zabbix.
How should I name the variable in the logstash config and in Zabbix so I would receive the information ?
Am I configured the hostname in Zabbix correctly?
Regards,
Hello,
Trying to use statsd-zabbix-backend, but the statsd exits after some time:
root@ip-10-75-22-83 ~/statsd # sudo nodejs stats.js config.js
6 Jun 14:43:03 - reading config file: config.js
6 Jun 14:43:03 - server is up
6 Jun 14:43:03 - DEBUG: Loading backend: statsd-zabbix-backend
6 Jun 14:43:07 - DEBUG: foo:1|c
6 Jun 14:43:13 - statsd.bad lines[total] 1402058593 0
statsd.bad lines[avg] 1402058593 0
statsd.packets received[total] 1402058593 1
statsd.packets received[avg] 1402058593 0.1
foo undefined[total] 1402058593 1
foo undefined[avg] 1402058593 0.1
6 Jun 14:43:13 - statsd.bad lines[total] 1402058593 0
statsd.bad lines[avg] 1402058593 0
statsd.packets received[total] 1402058593 0
statsd.packets received[avg] 1402058593 0
foo undefined[total] 1402058593 0
foo undefined[avg] 1402058593 0
statsd.timestamp lag 1402058593 -10
/root/statsd/node_modules/statsd-zabbix-backend/lib/zabbix.js:37
throw error;
^
Error: Command failed:
at ChildProcess.exithandler (child_process.js:637:15)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Socket.<anonymous> (child_process.js:956:11)
at Socket.EventEmitter.emit (events.js:95:17)
at Pipe.close (net.js:466:12)
My zabbixSender path is correct.
The output which proc.exec returns:
processed: 0; failed: 4; total: 4; seconds spent: 0.000112
Before that I've used zabbix_sender as logstash output and the items were getting zabbix server, so there is the high probability that it's working.
The line which it tries to execute is:
/usr/bin/zabbix_sender -T -i - -z 148.251.141.49 -p 10051
When I run it in my terminal it just executes, without any errors:
Any thoughts?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.