diff --git a/PLUGINS.md b/PLUGINS.md index c4436b0c1..b5d26ce6c 100644 --- a/PLUGINS.md +++ b/PLUGINS.md @@ -1,4 +1,4 @@ -Tivan is entirely plugin driven. This interface allows for operators to +Telegraf is entirely plugin driven. This interface allows for operators to pick and chose what is gathered as well as makes it easy for developers to create new ways of generating metrics. @@ -8,14 +8,14 @@ and submit new plugins. ## Guidelines * A plugin must conform to the `plugins.Plugin` interface. -* Tivan promises to run each plugin's Gather function serially. This means +* Telegraf promises to run each plugin's Gather function serially. This means developers don't have to worry about thread safety within these functions. * Each generated metric automatically has the name of the plugin that generated it prepended. This is to keep plugins honest. * Plugins should call `plugins.Add` in their `init` function to register themselves. See below for a quick example. -* To be available within Tivan itself, plugins must add themselves to the `github.com/influxdb/tivan/plugins/all/all.go` file. -* The `SampleConfig` function should return valid toml that describes how the plugin can be configured. This is include in `tivan -sample-config`. +* To be available within Telegraf itself, plugins must add themselves to the `github.com/influxdb/telegraf/plugins/all/all.go` file. +* The `SampleConfig` function should return valid toml that describes how the plugin can be configured. This is include in `telegraf -sample-config`. * The `Description` function should say in one line what this plugin does. ### Plugin interface @@ -75,7 +75,7 @@ func Gather(acc plugins.Accumulator) error { // simple.go -import "github.com/influxdb/tivan/plugins" +import "github.com/influxdb/telegraf/plugins" type Simple struct { Ok bool diff --git a/README.md b/README.md index f664f9016..ab8180729 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,20 @@ -# Tivan - A native agent for InfluxDB +# Telegraf - A native agent for InfluxDB ## Quickstart -* Build from source or download tivan (binaries forthcoming) -* Run `tivan -sample-config > tivan.toml` to create an initial configuration +* Build from source or download telegraf (binaries forthcoming) +* Run `telegraf -sample-config > telegraf.toml` to create an initial configuration * Edit the configuration to match your needs -* Run `tivan -config tivan.toml -test` to output one full measurement sample to STDOUT -* Run `tivan -config tivan.toml` to gather and send metrics to InfluxDB +* Run `telegraf -config telegraf.toml -test` to output one full measurement sample to STDOUT +* Run `telegraf -config telegraf.toml` to gather and send metrics to InfluxDB -## Tivan Options +## Telegraf Options -Tivan has a few options you can configure under the `agent` section of the config. If you don't see an `agent` section run `tivan -sample-config > tivan.toml` to create a valid initial configuration: +Telegraf has a few options you can configure under the `agent` section of the config. If you don't see an `agent` section run `telegraf -sample-config > telegraf.toml` to create a valid initial configuration: -* **hostname**: The hostname is passed as a tag. By default this should be set to the name of the machine running Tivan. You can override that behavior here. +* **hostname**: The hostname is passed as a tag. By default this should be set to the name of the machine running Telegraf. You can override that behavior here. * **interval**: How ofter to gather metrics. Uses a simple number + unit parser, ie "10s" for 10 seconds or "5m" for 5 minutes. -* **debug**: currently non-functional. Run `tivan -config tivan.toml -debug` to gather and send metrics to InfluxDB and to STDOUT for debugging purposes +* **debug**: currently non-functional. Run `telegraf -config telegraf.toml -debug` to gather and send metrics to InfluxDB and to STDOUT for debugging purposes ## Plugin Options diff --git a/accumulator.go b/accumulator.go index ebe227e46..8893642e0 100644 --- a/accumulator.go +++ b/accumulator.go @@ -1,4 +1,4 @@ -package tivan +package telegraf import ( "fmt" diff --git a/agent.go b/agent.go index 3ba6b69c8..7ac924f63 100644 --- a/agent.go +++ b/agent.go @@ -1,4 +1,4 @@ -package tivan +package telegraf import ( "fmt" @@ -10,7 +10,7 @@ import ( "time" "github.com/influxdb/influxdb/client" - "github.com/influxdb/tivan/plugins" + "github.com/influxdb/telegraf/plugins" ) type runningPlugin struct { diff --git a/agent_test.go b/agent_test.go index 6103b4eb8..8811fa810 100644 --- a/agent_test.go +++ b/agent_test.go @@ -1,4 +1,4 @@ -package tivan +package telegraf /* func TestAgent_DrivesMetrics(t *testing.T) { diff --git a/cmd/tivan/tivan.go b/cmd/telegraf/telegraf.go similarity index 83% rename from cmd/tivan/tivan.go rename to cmd/telegraf/telegraf.go index d77021bad..aa6a95138 100644 --- a/cmd/tivan/tivan.go +++ b/cmd/telegraf/telegraf.go @@ -8,8 +8,8 @@ import ( "os/signal" "strings" - "github.com/influxdb/tivan" - _ "github.com/influxdb/tivan/plugins/all" + "github.com/influxdb/telegraf" + _ "github.com/influxdb/telegraf/plugins/all" ) var fDebug = flag.Bool("debug", false, "show metrics as they're generated to stdout") @@ -24,30 +24,30 @@ func main() { flag.Parse() if *fVersion { - fmt.Printf("InfluxDB Tivan agent - Version %s\n", Version) + fmt.Printf("InfluxDB Telegraf agent - Version %s\n", Version) return } if *fSampleConfig { - tivan.PrintSampleConfig() + telegraf.PrintSampleConfig() return } var ( - config *tivan.Config + config *telegraf.Config err error ) if *fConfig != "" { - config, err = tivan.LoadConfig(*fConfig) + config, err = telegraf.LoadConfig(*fConfig) if err != nil { log.Fatal(err) } } else { - config = tivan.DefaultConfig() + config = telegraf.DefaultConfig() } - ag, err := tivan.NewAgent(config) + ag, err := telegraf.NewAgent(config) if err != nil { log.Fatal(err) } diff --git a/config.go b/config.go index 6deb2ee53..f3c75750f 100644 --- a/config.go +++ b/config.go @@ -1,4 +1,4 @@ -package tivan +package telegraf import ( "errors" @@ -8,7 +8,7 @@ import ( "strings" "time" - "github.com/influxdb/tivan/plugins" + "github.com/influxdb/telegraf/plugins" "github.com/naoina/toml" "github.com/naoina/toml/ast" ) @@ -211,12 +211,12 @@ type hasDescr interface { Description() string } -var header = `# Tivan configuration +var header = `# Telegraf configuration # If this file is missing an [agent] section, you must first generate a -# valid config with 'tivan -sample-config > tivan.toml' +# valid config with 'telegraf -sample-config > telegraf.toml' -# Tivan is entirely plugin driven. All metrics are gathered from the +# Telegraf is entirely plugin driven. All metrics are gathered from the # declared plugins. # Even if a plugin has no configuration, it must be declared in here @@ -224,7 +224,7 @@ var header = `# Tivan configuration # as a section with no variables. To deactivate a plugin, comment # out the name and any variables. -# Use 'tivan -config tivan.toml -test' to see what metrics a config +# Use 'telegraf -config telegraf.toml -test' to see what metrics a config # file would generate. # One rule that plugins conform to is wherever a connection string @@ -241,13 +241,13 @@ var header = `# Tivan configuration url = "http://10.20.2.4:8086" # required. # The target database for metrics. This database must already exist -database = "tivan" # required. +database = "telegraf" # required. -# username = "tivan" +# username = "telegraf" # password = "metricsmetricsmetricsmetrics" # Set the user agent for the POSTs (can be useful for log differentiation) -# user_agent = "tivan" +# user_agent = "telegraf" # tags = { "dc": "us-east-1" } # Tags can also be specified via a normal map, but only one form at a time: @@ -255,7 +255,7 @@ database = "tivan" # required. # [influxdb.tags] # dc = "us-east-1" -# Configuration for tivan itself +# Configuration for telegraf itself # [agent] # interval = "10s" # debug = false diff --git a/plugins/all/all.go b/plugins/all/all.go index 9cf3cd191..8acedb33f 100644 --- a/plugins/all/all.go +++ b/plugins/all/all.go @@ -1,8 +1,8 @@ package all import ( - _ "github.com/influxdb/tivan/plugins/mysql" - _ "github.com/influxdb/tivan/plugins/postgresql" - _ "github.com/influxdb/tivan/plugins/redis" - _ "github.com/influxdb/tivan/plugins/system" + _ "github.com/influxdb/telegraf/plugins/mysql" + _ "github.com/influxdb/telegraf/plugins/postgresql" + _ "github.com/influxdb/telegraf/plugins/redis" + _ "github.com/influxdb/telegraf/plugins/system" ) diff --git a/plugins/mysql/mysql.go b/plugins/mysql/mysql.go index 95c53909f..15b1af8c9 100644 --- a/plugins/mysql/mysql.go +++ b/plugins/mysql/mysql.go @@ -6,7 +6,7 @@ import ( "strings" _ "github.com/go-sql-driver/mysql" - "github.com/influxdb/tivan/plugins" + "github.com/influxdb/telegraf/plugins" ) type Mysql struct { diff --git a/plugins/mysql/mysql_test.go b/plugins/mysql/mysql_test.go index cbfe73353..0e9e94a23 100644 --- a/plugins/mysql/mysql_test.go +++ b/plugins/mysql/mysql_test.go @@ -4,7 +4,7 @@ import ( "strings" "testing" - "github.com/influxdb/tivan/testutil" + "github.com/influxdb/telegraf/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/plugins/postgresql/postgresql.go b/plugins/postgresql/postgresql.go index 0df8bae47..812d39750 100644 --- a/plugins/postgresql/postgresql.go +++ b/plugins/postgresql/postgresql.go @@ -3,7 +3,7 @@ package postgresql import ( "database/sql" - "github.com/influxdb/tivan/plugins" + "github.com/influxdb/telegraf/plugins" _ "github.com/lib/pq" ) diff --git a/plugins/postgresql/postgresql_test.go b/plugins/postgresql/postgresql_test.go index b9afe05c9..b11200e9f 100644 --- a/plugins/postgresql/postgresql_test.go +++ b/plugins/postgresql/postgresql_test.go @@ -3,7 +3,7 @@ package postgresql import ( "testing" - "github.com/influxdb/tivan/testutil" + "github.com/influxdb/telegraf/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/plugins/redis/redis.go b/plugins/redis/redis.go index fe53c72c1..2b56ac8c3 100644 --- a/plugins/redis/redis.go +++ b/plugins/redis/redis.go @@ -9,7 +9,7 @@ import ( "strings" "sync" - "github.com/influxdb/tivan/plugins" + "github.com/influxdb/telegraf/plugins" ) type Redis struct { diff --git a/plugins/redis/redis_test.go b/plugins/redis/redis_test.go index c8492d362..cab691d35 100644 --- a/plugins/redis/redis_test.go +++ b/plugins/redis/redis_test.go @@ -6,7 +6,7 @@ import ( "net" "testing" - "github.com/influxdb/tivan/testutil" + "github.com/influxdb/telegraf/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/plugins/system/cpu.go b/plugins/system/cpu.go index 41b16b534..e942ccb5e 100644 --- a/plugins/system/cpu.go +++ b/plugins/system/cpu.go @@ -3,7 +3,7 @@ package system import ( "fmt" - "github.com/influxdb/tivan/plugins" + "github.com/influxdb/telegraf/plugins" ) type CPUStats struct { diff --git a/plugins/system/disk.go b/plugins/system/disk.go index b19f226e0..cd5475962 100644 --- a/plugins/system/disk.go +++ b/plugins/system/disk.go @@ -3,7 +3,7 @@ package system import ( "fmt" - "github.com/influxdb/tivan/plugins" + "github.com/influxdb/telegraf/plugins" ) type DiskStats struct { diff --git a/plugins/system/docker.go b/plugins/system/docker.go index c939b5f51..9eab7cf52 100644 --- a/plugins/system/docker.go +++ b/plugins/system/docker.go @@ -3,7 +3,7 @@ package system import ( "fmt" - "github.com/influxdb/tivan/plugins" + "github.com/influxdb/telegraf/plugins" ) type DockerStats struct { diff --git a/plugins/system/memory.go b/plugins/system/memory.go index 890edd107..c835dc76d 100644 --- a/plugins/system/memory.go +++ b/plugins/system/memory.go @@ -3,7 +3,7 @@ package system import ( "fmt" - "github.com/influxdb/tivan/plugins" + "github.com/influxdb/telegraf/plugins" ) type MemStats struct { diff --git a/plugins/system/mock_PS.go b/plugins/system/mock_PS.go index 4731c6d50..17a4fc950 100644 --- a/plugins/system/mock_PS.go +++ b/plugins/system/mock_PS.go @@ -2,12 +2,12 @@ package system import "github.com/stretchr/testify/mock" -import "github.com/influxdb/tivan/plugins/system/ps/cpu" -import "github.com/influxdb/tivan/plugins/system/ps/disk" +import "github.com/influxdb/telegraf/plugins/system/ps/cpu" +import "github.com/influxdb/telegraf/plugins/system/ps/disk" -import "github.com/influxdb/tivan/plugins/system/ps/load" -import "github.com/influxdb/tivan/plugins/system/ps/mem" -import "github.com/influxdb/tivan/plugins/system/ps/net" +import "github.com/influxdb/telegraf/plugins/system/ps/load" +import "github.com/influxdb/telegraf/plugins/system/ps/mem" +import "github.com/influxdb/telegraf/plugins/system/ps/net" type MockPS struct { mock.Mock diff --git a/plugins/system/net.go b/plugins/system/net.go index b7dc3637a..ec419d9ee 100644 --- a/plugins/system/net.go +++ b/plugins/system/net.go @@ -4,7 +4,7 @@ import ( "fmt" "net" - "github.com/influxdb/tivan/plugins" + "github.com/influxdb/telegraf/plugins" ) type NetIOStats struct { @@ -18,7 +18,7 @@ func (_ *NetIOStats) Description() string { } var netSampleConfig = ` -# By default, tivan gathers stats from any up interface (excluding loopback) +# By default, telegraf gathers stats from any up interface (excluding loopback) # Setting interfaces will tell it to gather these explicit interfaces, # regardless of status. # diff --git a/plugins/system/ps.go b/plugins/system/ps.go index 0cbb1c9c6..f4e445dd2 100644 --- a/plugins/system/ps.go +++ b/plugins/system/ps.go @@ -5,14 +5,14 @@ import ( "strings" dc "github.com/fsouza/go-dockerclient" - "github.com/influxdb/tivan/plugins" - "github.com/influxdb/tivan/plugins/system/ps/common" - "github.com/influxdb/tivan/plugins/system/ps/cpu" - "github.com/influxdb/tivan/plugins/system/ps/disk" - "github.com/influxdb/tivan/plugins/system/ps/docker" - "github.com/influxdb/tivan/plugins/system/ps/load" - "github.com/influxdb/tivan/plugins/system/ps/mem" - "github.com/influxdb/tivan/plugins/system/ps/net" + "github.com/influxdb/telegraf/plugins" + "github.com/influxdb/telegraf/plugins/system/ps/common" + "github.com/influxdb/telegraf/plugins/system/ps/cpu" + "github.com/influxdb/telegraf/plugins/system/ps/disk" + "github.com/influxdb/telegraf/plugins/system/ps/docker" + "github.com/influxdb/telegraf/plugins/system/ps/load" + "github.com/influxdb/telegraf/plugins/system/ps/mem" + "github.com/influxdb/telegraf/plugins/system/ps/net" ) type DockerContainerStat struct { diff --git a/plugins/system/ps/cpu/cpu_darwin.go b/plugins/system/ps/cpu/cpu_darwin.go index 01edb83f1..c5c0ddc02 100644 --- a/plugins/system/ps/cpu/cpu_darwin.go +++ b/plugins/system/ps/cpu/cpu_darwin.go @@ -24,7 +24,7 @@ import ( "strings" "unsafe" - common "github.com/influxdb/tivan/plugins/system/ps/common" + common "github.com/influxdb/telegraf/plugins/system/ps/common" ) // sys/resource.h diff --git a/plugins/system/ps/cpu/cpu_freebsd.go b/plugins/system/ps/cpu/cpu_freebsd.go index 11c22a2f4..a7798c556 100644 --- a/plugins/system/ps/cpu/cpu_freebsd.go +++ b/plugins/system/ps/cpu/cpu_freebsd.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - common "github.com/influxdb/tivan/plugins/system/ps/common" + common "github.com/influxdb/telegraf/plugins/system/ps/common" ) // sys/resource.h diff --git a/plugins/system/ps/cpu/cpu_linux.go b/plugins/system/ps/cpu/cpu_linux.go index 2c9ff007e..c68bfd868 100644 --- a/plugins/system/ps/cpu/cpu_linux.go +++ b/plugins/system/ps/cpu/cpu_linux.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - common "github.com/influxdb/tivan/plugins/system/ps/common" + common "github.com/influxdb/telegraf/plugins/system/ps/common" ) func CPUTimes(percpu bool) ([]CPUTimesStat, error) { diff --git a/plugins/system/ps/cpu/cpu_windows.go b/plugins/system/ps/cpu/cpu_windows.go index f9df31e1a..071d366c9 100644 --- a/plugins/system/ps/cpu/cpu_windows.go +++ b/plugins/system/ps/cpu/cpu_windows.go @@ -8,7 +8,7 @@ import ( "time" "unsafe" - common "github.com/influxdb/tivan/plugins/system/ps/common" + common "github.com/influxdb/telegraf/plugins/system/ps/common" ) // TODO: Get percpu diff --git a/plugins/system/ps/disk/disk_darwin.go b/plugins/system/ps/disk/disk_darwin.go index f9ebc2a27..cbd94bdab 100644 --- a/plugins/system/ps/disk/disk_darwin.go +++ b/plugins/system/ps/disk/disk_darwin.go @@ -6,7 +6,7 @@ import ( "syscall" "unsafe" - "github.com/influxdb/tivan/plugins/system/ps/common" + "github.com/influxdb/telegraf/plugins/system/ps/common" ) func DiskPartitions(all bool) ([]DiskPartitionStat, error) { diff --git a/plugins/system/ps/disk/disk_freebsd.go b/plugins/system/ps/disk/disk_freebsd.go index 910ca7ae0..5193f3568 100644 --- a/plugins/system/ps/disk/disk_freebsd.go +++ b/plugins/system/ps/disk/disk_freebsd.go @@ -9,7 +9,7 @@ import ( "syscall" "unsafe" - common "github.com/influxdb/tivan/plugins/system/ps/common" + common "github.com/influxdb/telegraf/plugins/system/ps/common" ) const ( diff --git a/plugins/system/ps/disk/disk_linux.go b/plugins/system/ps/disk/disk_linux.go index 37b97fc4f..d70685257 100644 --- a/plugins/system/ps/disk/disk_linux.go +++ b/plugins/system/ps/disk/disk_linux.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - common "github.com/influxdb/tivan/plugins/system/ps/common" + common "github.com/influxdb/telegraf/plugins/system/ps/common" ) const ( diff --git a/plugins/system/ps/disk/disk_test.go b/plugins/system/ps/disk/disk_test.go index 6ed9b891a..04776b1d8 100644 --- a/plugins/system/ps/disk/disk_test.go +++ b/plugins/system/ps/disk/disk_test.go @@ -5,7 +5,7 @@ import ( "runtime" "testing" - "github.com/influxdb/tivan/plugins/system/ps/common" + "github.com/influxdb/telegraf/plugins/system/ps/common" ) func TestDisk_usage(t *testing.T) { diff --git a/plugins/system/ps/disk/disk_windows.go b/plugins/system/ps/disk/disk_windows.go index 70d983962..34341accd 100644 --- a/plugins/system/ps/disk/disk_windows.go +++ b/plugins/system/ps/disk/disk_windows.go @@ -9,7 +9,7 @@ import ( "time" "unsafe" - common "github.com/influxdb/tivan/plugins/system/ps/common" + common "github.com/influxdb/telegraf/plugins/system/ps/common" ) var ( diff --git a/plugins/system/ps/docker/docker_linux.go b/plugins/system/ps/docker/docker_linux.go index 265ab8afc..51f3bc9ca 100644 --- a/plugins/system/ps/docker/docker_linux.go +++ b/plugins/system/ps/docker/docker_linux.go @@ -9,8 +9,8 @@ import ( "strconv" "strings" - "github.com/influxdb/tivan/plugins/system/ps/common" - "github.com/influxdb/tivan/plugins/system/ps/cpu" + "github.com/influxdb/telegraf/plugins/system/ps/common" + "github.com/influxdb/telegraf/plugins/system/ps/cpu" ) // GetDockerIDList returnes a list of DockerID. diff --git a/plugins/system/ps/docker/docker_notlinux.go b/plugins/system/ps/docker/docker_notlinux.go index fa19d886f..ec7fc3d8d 100644 --- a/plugins/system/ps/docker/docker_notlinux.go +++ b/plugins/system/ps/docker/docker_notlinux.go @@ -5,8 +5,8 @@ package docker import ( "encoding/json" - "github.com/influxdb/tivan/plugins/system/ps/common" - "github.com/influxdb/tivan/plugins/system/ps/cpu" + "github.com/influxdb/telegraf/plugins/system/ps/common" + "github.com/influxdb/telegraf/plugins/system/ps/cpu" ) // GetDockerIDList returnes a list of DockerID. diff --git a/plugins/system/ps/host/host_darwin.go b/plugins/system/ps/host/host_darwin.go index bcbb773c5..753e9af68 100644 --- a/plugins/system/ps/host/host_darwin.go +++ b/plugins/system/ps/host/host_darwin.go @@ -13,7 +13,7 @@ import ( "strings" "unsafe" - common "github.com/influxdb/tivan/plugins/system/ps/common" + common "github.com/influxdb/telegraf/plugins/system/ps/common" ) func HostInfo() (*HostInfoStat, error) { diff --git a/plugins/system/ps/host/host_freebsd.go b/plugins/system/ps/host/host_freebsd.go index e2ca7e781..6c06dc622 100644 --- a/plugins/system/ps/host/host_freebsd.go +++ b/plugins/system/ps/host/host_freebsd.go @@ -13,7 +13,7 @@ import ( "strings" "unsafe" - common "github.com/influxdb/tivan/plugins/system/ps/common" + common "github.com/influxdb/telegraf/plugins/system/ps/common" ) const ( diff --git a/plugins/system/ps/host/host_linux.go b/plugins/system/ps/host/host_linux.go index 9aab8204c..d3b12669e 100644 --- a/plugins/system/ps/host/host_linux.go +++ b/plugins/system/ps/host/host_linux.go @@ -14,7 +14,7 @@ import ( "syscall" "unsafe" - common "github.com/influxdb/tivan/plugins/system/ps/common" + common "github.com/influxdb/telegraf/plugins/system/ps/common" ) type LSB struct { diff --git a/plugins/system/ps/host/host_windows.go b/plugins/system/ps/host/host_windows.go index 97f310c98..788130910 100644 --- a/plugins/system/ps/host/host_windows.go +++ b/plugins/system/ps/host/host_windows.go @@ -8,8 +8,8 @@ import ( "strings" "time" - common "github.com/influxdb/tivan/plugins/system/ps/common" - process "github.com/influxdb/tivan/plugins/system/ps/process" + common "github.com/influxdb/telegraf/plugins/system/ps/common" + process "github.com/influxdb/telegraf/plugins/system/ps/process" ) var ( diff --git a/plugins/system/ps/load/load_darwin.go b/plugins/system/ps/load/load_darwin.go index 2de2df367..4e6931cd1 100644 --- a/plugins/system/ps/load/load_darwin.go +++ b/plugins/system/ps/load/load_darwin.go @@ -5,7 +5,7 @@ package load import ( "strconv" - common "github.com/influxdb/tivan/plugins/system/ps/common" + common "github.com/influxdb/telegraf/plugins/system/ps/common" ) func LoadAvg() (*LoadAvgStat, error) { diff --git a/plugins/system/ps/load/load_freebsd.go b/plugins/system/ps/load/load_freebsd.go index 770adca51..8b1191d77 100644 --- a/plugins/system/ps/load/load_freebsd.go +++ b/plugins/system/ps/load/load_freebsd.go @@ -5,7 +5,7 @@ package load import ( "strconv" - common "github.com/influxdb/tivan/plugins/system/ps/common" + common "github.com/influxdb/telegraf/plugins/system/ps/common" ) func LoadAvg() (*LoadAvgStat, error) { diff --git a/plugins/system/ps/load/load_windows.go b/plugins/system/ps/load/load_windows.go index 232fbcf10..440674148 100644 --- a/plugins/system/ps/load/load_windows.go +++ b/plugins/system/ps/load/load_windows.go @@ -3,7 +3,7 @@ package load import ( - common "github.com/influxdb/tivan/plugins/system/ps/common" + common "github.com/influxdb/telegraf/plugins/system/ps/common" ) func LoadAvg() (*LoadAvgStat, error) { diff --git a/plugins/system/ps/mem/mem_darwin.go b/plugins/system/ps/mem/mem_darwin.go index 37160bc5a..5d2ff7e3e 100644 --- a/plugins/system/ps/mem/mem_darwin.go +++ b/plugins/system/ps/mem/mem_darwin.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - common "github.com/influxdb/tivan/plugins/system/ps/common" + common "github.com/influxdb/telegraf/plugins/system/ps/common" ) func getPageSize() (uint64, error) { diff --git a/plugins/system/ps/mem/mem_freebsd.go b/plugins/system/ps/mem/mem_freebsd.go index 68bdb7b00..aa83a246d 100644 --- a/plugins/system/ps/mem/mem_freebsd.go +++ b/plugins/system/ps/mem/mem_freebsd.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - common "github.com/influxdb/tivan/plugins/system/ps/common" + common "github.com/influxdb/telegraf/plugins/system/ps/common" ) func VirtualMemory() (*VirtualMemoryStat, error) { diff --git a/plugins/system/ps/mem/mem_linux.go b/plugins/system/ps/mem/mem_linux.go index ab98b8651..a0505b5f5 100644 --- a/plugins/system/ps/mem/mem_linux.go +++ b/plugins/system/ps/mem/mem_linux.go @@ -7,7 +7,7 @@ import ( "strings" "syscall" - common "github.com/influxdb/tivan/plugins/system/ps/common" + common "github.com/influxdb/telegraf/plugins/system/ps/common" ) func VirtualMemory() (*VirtualMemoryStat, error) { diff --git a/plugins/system/ps/mem/mem_windows.go b/plugins/system/ps/mem/mem_windows.go index d40bfd845..b43c85c16 100644 --- a/plugins/system/ps/mem/mem_windows.go +++ b/plugins/system/ps/mem/mem_windows.go @@ -6,7 +6,7 @@ import ( "syscall" "unsafe" - common "github.com/influxdb/tivan/plugins/system/ps/common" + common "github.com/influxdb/telegraf/plugins/system/ps/common" ) var ( diff --git a/plugins/system/ps/net/net_darwin.go b/plugins/system/ps/net/net_darwin.go index c6a392df0..a9843fea3 100644 --- a/plugins/system/ps/net/net_darwin.go +++ b/plugins/system/ps/net/net_darwin.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - "github.com/influxdb/tivan/plugins/system/ps/common" + "github.com/influxdb/telegraf/plugins/system/ps/common" ) func NetIOCounters(pernic bool) ([]NetIOCountersStat, error) { diff --git a/plugins/system/ps/net/net_freebsd.go b/plugins/system/ps/net/net_freebsd.go index 15cc77daa..7dbc1053d 100644 --- a/plugins/system/ps/net/net_freebsd.go +++ b/plugins/system/ps/net/net_freebsd.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - "github.com/influxdb/tivan/plugins/system/ps/common" + "github.com/influxdb/telegraf/plugins/system/ps/common" ) func NetIOCounters(pernic bool) ([]NetIOCountersStat, error) { diff --git a/plugins/system/ps/net/net_linux.go b/plugins/system/ps/net/net_linux.go index 7535495e5..15a4d26de 100644 --- a/plugins/system/ps/net/net_linux.go +++ b/plugins/system/ps/net/net_linux.go @@ -6,7 +6,7 @@ import ( "strconv" "strings" - common "github.com/influxdb/tivan/plugins/system/ps/common" + common "github.com/influxdb/telegraf/plugins/system/ps/common" ) // NetIOCounters returnes network I/O statistics for every network diff --git a/plugins/system/ps/net/net_windows.go b/plugins/system/ps/net/net_windows.go index 57188f7e2..3ca8421c6 100644 --- a/plugins/system/ps/net/net_windows.go +++ b/plugins/system/ps/net/net_windows.go @@ -8,7 +8,7 @@ import ( "syscall" "unsafe" - common "github.com/influxdb/tivan/plugins/system/ps/common" + common "github.com/influxdb/telegraf/plugins/system/ps/common" ) var ( diff --git a/plugins/system/ps/process/process.go b/plugins/system/ps/process/process.go index 555bef7b8..e2374aa75 100644 --- a/plugins/system/ps/process/process.go +++ b/plugins/system/ps/process/process.go @@ -5,7 +5,7 @@ import ( "runtime" "time" - cpu "github.com/influxdb/tivan/plugins/system/ps/cpu" + cpu "github.com/influxdb/telegraf/plugins/system/ps/cpu" ) type Process struct { diff --git a/plugins/system/ps/process/process_darwin.go b/plugins/system/ps/process/process_darwin.go index 5e118c62c..dc98b03ac 100644 --- a/plugins/system/ps/process/process_darwin.go +++ b/plugins/system/ps/process/process_darwin.go @@ -10,9 +10,9 @@ import ( "syscall" "unsafe" - common "github.com/influxdb/tivan/plugins/system/ps/common" - cpu "github.com/influxdb/tivan/plugins/system/ps/cpu" - net "github.com/influxdb/tivan/plugins/system/ps/net" + common "github.com/influxdb/telegraf/plugins/system/ps/common" + cpu "github.com/influxdb/telegraf/plugins/system/ps/cpu" + net "github.com/influxdb/telegraf/plugins/system/ps/net" ) // copied from sys/sysctl.h diff --git a/plugins/system/ps/process/process_freebsd.go b/plugins/system/ps/process/process_freebsd.go index 8c1a1ec64..80cf16128 100644 --- a/plugins/system/ps/process/process_freebsd.go +++ b/plugins/system/ps/process/process_freebsd.go @@ -7,9 +7,9 @@ import ( "encoding/binary" "unsafe" - common "github.com/influxdb/tivan/plugins/system/ps/common" - cpu "github.com/influxdb/tivan/plugins/system/ps/cpu" - net "github.com/influxdb/tivan/plugins/system/ps/net" + common "github.com/influxdb/telegraf/plugins/system/ps/common" + cpu "github.com/influxdb/telegraf/plugins/system/ps/cpu" + net "github.com/influxdb/telegraf/plugins/system/ps/net" ) // MemoryInfoExStat is different between OSes diff --git a/plugins/system/ps/process/process_linux.go b/plugins/system/ps/process/process_linux.go index 41f3f10b6..558de41bb 100644 --- a/plugins/system/ps/process/process_linux.go +++ b/plugins/system/ps/process/process_linux.go @@ -11,10 +11,10 @@ import ( "strings" "syscall" - common "github.com/influxdb/tivan/plugins/system/ps/common" - cpu "github.com/influxdb/tivan/plugins/system/ps/cpu" - host "github.com/influxdb/tivan/plugins/system/ps/host" - net "github.com/influxdb/tivan/plugins/system/ps/net" + common "github.com/influxdb/telegraf/plugins/system/ps/common" + cpu "github.com/influxdb/telegraf/plugins/system/ps/cpu" + host "github.com/influxdb/telegraf/plugins/system/ps/host" + net "github.com/influxdb/telegraf/plugins/system/ps/net" ) const ( diff --git a/plugins/system/ps/process/process_test.go b/plugins/system/ps/process/process_test.go index 30bb3c840..4999b6ef7 100644 --- a/plugins/system/ps/process/process_test.go +++ b/plugins/system/ps/process/process_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - "github.com/influxdb/tivan/plugins/system/ps/common" + "github.com/influxdb/telegraf/plugins/system/ps/common" ) func testGetProcess() Process { diff --git a/plugins/system/ps/process/process_windows.go b/plugins/system/ps/process/process_windows.go index 831195640..1c6b5d74b 100644 --- a/plugins/system/ps/process/process_windows.go +++ b/plugins/system/ps/process/process_windows.go @@ -11,9 +11,9 @@ import ( "github.com/shirou/w32" - common "github.com/influxdb/tivan/plugins/system/ps/common" - cpu "github.com/influxdb/tivan/plugins/system/ps/cpu" - net "github.com/influxdb/tivan/plugins/system/ps/net" + common "github.com/influxdb/telegraf/plugins/system/ps/common" + cpu "github.com/influxdb/telegraf/plugins/system/ps/cpu" + net "github.com/influxdb/telegraf/plugins/system/ps/net" ) const ( diff --git a/plugins/system/system.go b/plugins/system/system.go index 281b6dac2..f3c3bc7e8 100644 --- a/plugins/system/system.go +++ b/plugins/system/system.go @@ -1,6 +1,6 @@ package system -import "github.com/influxdb/tivan/plugins" +import "github.com/influxdb/telegraf/plugins" type SystemStats struct { ps PS diff --git a/plugins/system/system_test.go b/plugins/system/system_test.go index 7f6b605d5..83242020a 100644 --- a/plugins/system/system_test.go +++ b/plugins/system/system_test.go @@ -3,13 +3,13 @@ package system import ( "testing" - "github.com/influxdb/tivan/plugins/system/ps/cpu" - "github.com/influxdb/tivan/plugins/system/ps/disk" - "github.com/influxdb/tivan/plugins/system/ps/docker" - "github.com/influxdb/tivan/plugins/system/ps/load" - "github.com/influxdb/tivan/plugins/system/ps/mem" - "github.com/influxdb/tivan/plugins/system/ps/net" - "github.com/influxdb/tivan/testutil" + "github.com/influxdb/telegraf/plugins/system/ps/cpu" + "github.com/influxdb/telegraf/plugins/system/ps/disk" + "github.com/influxdb/telegraf/plugins/system/ps/docker" + "github.com/influxdb/telegraf/plugins/system/ps/load" + "github.com/influxdb/telegraf/plugins/system/ps/mem" + "github.com/influxdb/telegraf/plugins/system/ps/net" + "github.com/influxdb/telegraf/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/release.sh b/release.sh index c6a0474c9..6e9b4bf96 100755 --- a/release.sh +++ b/release.sh @@ -2,14 +2,14 @@ VERSION="0.9.b1" -echo "Building Tivan version $VERSION" +echo "Building Telegraf version $VERSION" mkdir -p pkg build() { echo -n "=> $1-$2: " - GOOS=$1 GOARCH=$2 go build -o pkg/tivan-$1-$2 -ldflags "-X main.Version $VERSION" ./cmd/tivan/tivan.go - du -h pkg/tivan-$1-$2 + GOOS=$1 GOARCH=$2 go build -o pkg/telegraf-$1-$2 -ldflags "-X main.Version $VERSION" ./cmd/telegraf/telegraf.go + du -h pkg/telegraf-$1-$2 } build "darwin" "amd64" diff --git a/tivan.toml b/telegraf.toml similarity index 88% rename from tivan.toml rename to telegraf.toml index a5ee89f6c..c43e575b3 100644 --- a/tivan.toml +++ b/telegraf.toml @@ -1,9 +1,9 @@ -# Tivan configuration +# Telegraf configuration # If this file is missing an [agent] section, you must first generate a -# valid config with 'tivan -sample-config > tivan.toml' +# valid config with 'telegraf -sample-config > telegraf.toml' -# Tivan is entirely plugin driven. All metrics are gathered from the +# Telegraf is entirely plugin driven. All metrics are gathered from the # declared plugins. # Even if a plugin has no configuration, it must be declared in here @@ -11,7 +11,7 @@ # as a section with no variables. To deactivate a plugin, comment # out the name and any variables. -# Use 'tivan -config tivan.toml -test' to see what metrics a config +# Use 'telegraf -config telegraf.toml -test' to see what metrics a config # file would generate. # One rule that plugins conform to is wherever a connection string @@ -28,13 +28,13 @@ url = "http://10.20.2.4:8086" # required. # The target database for metrics. This database must already exist -database = "tivan" # required. +database = "telegraf" # required. -# username = "tivan" +# username = "telegraf" # password = "metricsmetricsmetricsmetrics" # Set the user agent for the POSTs (can be useful for log differentiation) -# user_agent = "tivan" +# user_agent = "telegraf" # tags = { "dc": "us-east-1" } # Tags can also be specified via a normal map, but only one form at a time: @@ -42,7 +42,7 @@ database = "tivan" # required. # [influxdb.tags] # dc = "us-east-1" -# Configuration for tivan itself +# Configuration for telegraf itself # [agent] # interval = "10s" # debug = false @@ -83,7 +83,7 @@ servers = ["localhost"] # Read metrics about network interface usage [net] -# By default, tivan gathers stats from any up interface (excluding loopback) +# By default, telegraf gathers stats from any up interface (excluding loopback) # Setting interfaces will tell it to gather these explicit interfaces, # regardless of status. # diff --git a/testdata/influx.toml b/testdata/influx.toml index f29c48c80..fc5d3c493 100644 --- a/testdata/influx.toml +++ b/testdata/influx.toml @@ -7,7 +7,7 @@ debug = true url = "http://localhost:8086" username = "root" password = "root" -database = "tivan" +database = "telegraf" tags = { dc = "us-phx-1" } [redis]