Skip to content

blind-oracle/nginx-influxdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

nginx-influxdb

This small utility receives syslog messages (access log) from nginx over UDP, parses them and sends to InfluxDB (or telegraf) over UDP. You can use telegraf's logparser plugin instead, but this is more handy i think.

You should use the following nginx configuration:

map $status $metrics {
    ~^[23]  1;
    default 0;
}

log_format collector '$msec|$remote_addr|$scheme|$request_method|$host|$request_uri|$status|$request_time|$bytes_sent|$server_protocol|$completed|$tcpinfo_rtt|$tcpinfo_rttvar|$tcpinfo_snd_cwnd|$tcpinfo_rcv_space';
access_log syslog:server=1.1.1.1:514,tag=nginx collector if=$metrics;

About

Converts nginx access logs to influxdb metrics on the fly

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages