forked from influxdata/telegraf
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixup some disk usage reporting, make it reflect df
fixes influxdata#513
- Loading branch information
Showing
5 changed files
with
114 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Example Input Plugin | ||
|
||
The example plugin gathers metrics about example things | ||
|
||
### Configuration: | ||
|
||
``` | ||
# Description | ||
[[inputs.example]] | ||
# SampleConfig | ||
``` | ||
|
||
### Measurements & Fields: | ||
|
||
<optional description> | ||
|
||
- measurement1 | ||
- field1 (type, unit) | ||
- field2 (float, percent) | ||
- measurement2 | ||
- field3 (integer, bytes) | ||
|
||
### Tags: | ||
|
||
- All measurements have the following tags: | ||
- tag1 (optional description) | ||
- tag2 | ||
- measurement2 has the following tags: | ||
- tag3 | ||
|
||
### Example Output: | ||
|
||
Give an example `-test` output here | ||
|
||
``` | ||
$ ./telegraf -config telegraf.conf -input-filter example -test | ||
measurement1,tag1=foo,tag2=bar field1=1i,field2=2.1 1453831884664956455 | ||
measurement2,tag1=foo,tag2=bar,tag3=baz field3=1i 1453831884664956455 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Disk Input Plugin | ||
|
||
The disk input plugin gathers metrics about disk usage. | ||
|
||
Note that `used_percent` is calculated by doing `used / (used + free)`, _not_ | ||
`used / total`, which is how the unix `df` command does it. See | ||
https://en.wikipedia.org/wiki/Df_(Unix) for more details. | ||
|
||
### Configuration: | ||
|
||
``` | ||
# Read metrics about disk usage by mount point | ||
[[inputs.disk]] | ||
# By default, telegraf gather stats for all mountpoints. | ||
# Setting mountpoints will restrict the stats to the specified mountpoints. | ||
# mount_points = ["/"] | ||
``` | ||
|
||
### Measurements & Fields: | ||
|
||
- disk | ||
- free (integer, bytes) | ||
- total (integer, bytes) | ||
- used (integer, bytes) | ||
- used_percent (float, percent) | ||
- inodes_free (integer, files) | ||
- inodes_total (integer, files) | ||
- inodes_used (integer, files) | ||
|
||
### Tags: | ||
|
||
- All measurements have the following tags: | ||
- fstype (filesystem type) | ||
- path (mount point path) | ||
|
||
### Example Output: | ||
|
||
``` | ||
% ./telegraf -config ~/ws/telegraf.conf -input-filter disk -test | ||
* Plugin: disk, Collection 1 | ||
> disk,fstype=hfs,path=/ free=398407520256i,inodes_free=97267461i,inodes_total=121847806i,inodes_used=24580345i,total=499088621568i,used=100418957312i,used_percent=20.131039916242397 1453832006274071563 | ||
> disk,fstype=devfs,path=/dev free=0i,inodes_free=0i,inodes_total=628i,inodes_used=628i,total=185856i,used=185856i,used_percent=100 1453832006274137913 | ||
> disk,fstype=autofs,path=/net free=0i,inodes_free=0i,inodes_total=0i,inodes_used=0i,total=0i,used=0i,used_percent=0 1453832006274157077 | ||
> disk,fstype=autofs,path=/home free=0i,inodes_free=0i,inodes_total=0i,inodes_used=0i,total=0i,used=0i,used_percent=0 1453832006274169688 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters