-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new plugin: nginx_plus #3214
new plugin: nginx_plus #3214
Changes from 7 commits
0f772a3
02eb8cd
74374cb
079ff75
579952e
5987e64
c95dad2
6bfc295
f3d0931
f965bca
767fd53
33fe1f0
c84861a
b19a1da
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
# Telegraf Plugin: nginx_plus | ||
|
||
### Configuration: | ||
|
||
``` | ||
# Read Nginx Plus' advanced status information | ||
[[inputs.nginx_plus]] | ||
## An array of Nginx status URIs to gather stats. | ||
urls = ["http://localhost/status"] | ||
``` | ||
|
||
### Measurements & Fields: | ||
|
||
- nginx_processes | ||
- respawned | ||
- nginx_connections | ||
- accepted | ||
- dropped | ||
- active | ||
- idle | ||
- nginx_ssl | ||
- handshakes | ||
- handshakes_failed | ||
- session_reuses | ||
- nginx_requests | ||
- total | ||
- current | ||
- nginx_upstream | ||
- keepalive | ||
- zombies | ||
- nginx_upstream_peer | ||
- requests | ||
- unavail | ||
- healthchecks_checks | ||
- header_time | ||
- response_time | ||
- state | ||
- active | ||
- downstart | ||
- healthchecks_last_passed | ||
- weight | ||
- responses_1xx | ||
- responses_2xx | ||
- responses_3xx | ||
- responses_4xx | ||
- responses_5xx | ||
- received | ||
- selected | ||
- healthchecks_fails | ||
- healthchecks_unhealthy | ||
- backup | ||
- responses_total | ||
- sent | ||
- fails | ||
- downtime | ||
|
||
|
||
### Tags: | ||
|
||
- nginx_processes, nginx_connections, nginx_ssl, nginx_requests | ||
- server | ||
- port | ||
- host | ||
|
||
- nginx_upstream | ||
- host | ||
- upstream | ||
- server | ||
- port | ||
|
||
- nginx_upstream_peer | ||
- id | ||
- host | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't list host since it is added globally by Telegraf (depending on config). |
||
- upstream | ||
- server | ||
- port | ||
- serverAddress | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be |
||
|
||
### Example Output: | ||
|
||
Using this configuration: | ||
``` | ||
[[inputs.nginx_plus]] | ||
## An array of Nginx Plus status URIs to gather stats. | ||
urls = ["http://localhost/status"] | ||
``` | ||
|
||
When run with: | ||
``` | ||
./telegraf -config telegraf.conf -input-filter nginx_plus -test | ||
``` | ||
|
||
It produces: | ||
``` | ||
* Plugin: inputs.nginx_plus, Collection 1 | ||
> nginx_processes,server=localhost,port=12021,host=word.local respawned="0xc420075538" 1504922954000000000 | ||
> nginx_connections,server=localhost,port=12021,host=word.local accepted=4458727685i,dropped=10138424i,active=10256i,idle=29390i 1504922954000000000 | ||
> nginx_ssl,server=localhost,port=12021,host=word.local handshakes=0i,handshakes_failed=0i,session_reuses=0i 1504922954000000000 | ||
> nginx_requests,host=word.local,server=localhost,port=12021 total=147885504244i,current=10019i 1504922954000000000 | ||
> nginx_upstream,host=word.local,upstream=dataserver80,server=localhost,port=12021 zombies=0i,keepalive=0i 1504922954000000000 | ||
> nginx_upstream_peer,id=0,server=localhost,port=12021,host=word.local,upstream=dataserver80,serverAddress=10.10.102.181:80 responses_5xx=27831i,healthchecks_unhealthy=1i,downtime=484817i,healthchecks_last_passed=true,responses_1xx=0i,active=22i,requests=2620930i,responses_total=2620652i,fails=4i,downstart=0i,state="up",responses_4xx=16i,healthchecks_checks=14133i,selected="0xc4201b22e8",response_time=95i,responses_2xx=2592805i,weight=1i,responses_3xx=0i,sent=3802831967i,received=536695496i,unavail=4i,healthchecks_fails=27i,header_time=94i,backup=false 1504922954000000000 | ||
``` | ||
|
||
### Reference material | ||
|
||
Structures for Nginx Plus have been built based on history of | ||
[status module documentation](http://nginx.org/en/docs/http/ngx_http_status_module.html) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lets move this up to the first section, and mention that you need a commercial license to have access to this module. |
||
|
||
Subsequent versions of status response structure available here: | ||
|
||
- [version 1](http://web.archive.org/web/20130805111222/http://nginx.org/en/docs/http/ngx_http_status_module.html) | ||
|
||
- [version 2](http://web.archive.org/web/20131218101504/http://nginx.org/en/docs/http/ngx_http_status_module.html) | ||
|
||
- version 3 - not available | ||
|
||
- [version 4](http://web.archive.org/web/20141218170938/http://nginx.org/en/docs/http/ngx_http_status_module.html) | ||
|
||
- [version 5](http://web.archive.org/web/20150414043916/http://nginx.org/en/docs/http/ngx_http_status_module.html) | ||
|
||
- [version 6](http://web.archive.org/web/20150918163811/http://nginx.org/en/docs/http/ngx_http_status_module.html) | ||
|
||
- [version 7](http://web.archive.org/web/20161107221028/http://nginx.org/en/docs/http/ngx_http_status_module.html) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danielnelson should these be renamed to
nginx_plus_<measurement>
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it should be easy for anyone to change the prefix with
name_override
if they prefer the shorter name.