How to send server metrics data to statsd? - monitoring

Our monitoring stack is Grafana + InluxDB + statsD.
We use it for application monitoring.
We need to add server metrics (CPU, memory, network connections, etc...) to Grafana, so I'm guessing we'll need some agent to collect server metrics and pass to statsD.
Do you know of any agent that can do that? or any other way to implement this?

Probably the simplest option for you would be to switch over to using collectd https://collectd.org/, and replace statsd with the statsd plugin for collectd https://collectd.org/wiki/index.php/Plugin:StatsD

Check https://my-netdata.io.
It can monitor a ton of things, it is a statsd server by itself, it can visualize all metrics by itself and can push all metrics to graphite, opentsdb, prometheus, influxdb, etc.
Free and open source: GPL v3+.
EDIT: it also allows you to send statsd metrics from shell scripts: https://github.com/firehol/netdata/wiki/statsd#sending-statsd-metrics-from-shell-scripts

Related

What is the difference between statsd client and the statsd daemon?

I have an application that I wish to monitor graphically.
I am using this StatsD client. I am using Graphite as the backend. I have a question about the basic workflow:
We use the StatsD client in order to include metrics within our application. These metrics are then sent in the form of UDP packets (usually). Graphite (specifically Carbon within Graphite) captures these packets and stores them in the Whisper database as time-series data.
What exactly then, is the role of the StatsD daemon? I have written a working application using only the StatsD client and Graphite. Where am I missing the usage of StatsD daemon?
Had the same question, so I'm going to answer it here even thogh the post is 7 months old.
From what I could gather (as explained here), a StatsD Deamon is synonymous to a StatsD Server. In your case, it's Carbon/Graphite or maybe a StatsD specific component within your Graphite Stack.
In my company, for instance, we use the StatsD Beats Daemon within the ELK-Stack.

What is recommended solution for monitoring heterogeneous infrastructure?

I am looking for monitoring tool for the following use cases:
Collect basic metrics about virtual machine (cpu usage, memory usage, i/o, available space)
Extract metrics from SQL Server (probably running some queries)
Extract information from external service about processing i.e how many processing are currently running and for how long. I am thinking about writing python scripts, but don't know how to combine with monitoring tool
Have the ability to plot charts and manage alerts and it will nice to have ability to send not only mails, but send message to slack/ms teams.
I was thing about Prometheus, because it has wmi_exporter, node_exporter, sql exporter, alert manager with possibility to send notifications to multiple destinations, but I don't know what to do with this external service and python scripts.
Any suggestions?
Prometheus can definitely do what you say you need done. Some of it may not be trivial, but you can definitely fill in the blanks yourself.
E.g. you can get machine metrics basically out of the box by firing up a node_exporter and having it scraped by Prometheus, but I don't think it has e.g. information on all running processes. The latter might require you to write an agent/exporter: a simple web server that exposes metrics on /metrics; there exists a Python client library to help with that. Or have said processes (assuming they're your code) push metrics to a Pushgateway instead, if they're short lived batch jobs.
Oh, and for charts/dashboards you probably want Grafana, as Prometheus' abilities in that area are rather limited and Grafana integrates rather well with Prometheus.

Monitoring agent

I have a requirement where in I need to monitor some custom services on aws nodes and collect metrics in timeseries. There are specifically two use cases. One being the monitoring of hardware resources like cpu, mem, disk util etc and the other being monitoring service specific metrics.
While reading up I came across collectd as one of the open source option. However I wanted to know how I can use collectd to monitor service specific metrics. Does collectd expose APIs which the service can use to log the metrics and if yes how performant is it.
I am new to collectd & would like to know if there are any other open source options as well.
The collectd agent can monitor custom metrics using read plugins:
Exec plugin for custom metrics fetched with bash scripts
cURL-JSON for metrics published in JSON format via HTTP

Graphite Network interface monitoring

I'm trying to monitor my network usage with Graphite but I can't figure out how to do this, could you help me please?
In addition to this, I would like to monitor some other services, as nginx, mysql, etc,..
Thanks for your help!
Best.
Ofcourse there are multiple solutions possible. The solution I'm using is collectd. With collectd you can collect statistic data from plugins in rrd files. It has a lot of plugins like network, nginx and mysql.
It does not generate graphs by itself, but there are multiple ways to generate graphs. One of them is to send the collected data to graphite with the graphite plugin.

Capture / Monitor system data of application server in Graphite

I am using graphite server to capture my metrics data and bring down to graphs. I have 4 application servers which is load balancer setup. My aim is capture system data such as cpu usage, memory usage, disk load, etc., for all the 4 application servers. I setup an graphite environment in a separate server and i wanted to push the system data for all the applications servers to graphite and get it display as graphs. I don't know what needs to be done for feeding system data to graphite. My thinking was to install statsd in all application servers and feed the system data to graphite but looks like statsd does not support system data rather application data.
Can anyone help me to catch the right track. Thanks in advance.
Running collectd with a graphite agent would be an excellent start to gather the information your after.
There is an almost unlimited amount of ways to get your data into graphite.
You can find a list of tools that have known to work very well with graphite on the readthedocs.org page: http://graphite.readthedocs.org/en/0.9.10/tools.html
There is also an example script that gathers load average from the system in the carbon project: example-client.py

Resources