Compare commits

...

4199 Commits

Author SHA1 Message Date
dom 49701ffb05 add rss feed title 2020-06-06 21:24:46 +02:00
dom 65d8f2d0e4 add ablility to build new version with docker 2020-06-06 21:16:55 +02:00
dom 28cf69cc4b Merge latest version from github 2020-06-06 17:21:53 +02:00
Steven Soroka 62302a0f37
Update CHANGELOG.md 2020-06-05 18:46:58 -04:00
Steven Soroka 7ba226a00b
fix issue with stream parser blocking when data is in buffer (#7631) 2020-06-05 18:30:25 -04:00
Steven Soroka 741ea839d2
add support for streaming processors (#7634) 2020-06-05 10:43:43 -04:00
David Reimschussel b99e3bc63d Update changelog 2020-06-05 08:42:13 -06:00
reimda 49caba9b2f
Add tags to snmp_trap input for context name and engine ID (#7633)
Add tags for the context name and engine ID
2020-06-05 08:35:14 -06:00
Daniel Nelson 6f931c9834
Clarify use of multiple mqtt broker servers 2020-06-04 14:43:32 -07:00
kauppine 36316ee8f2
Add SNMPv3 trap support to snmp_trap input plugin (#7294)
Extend snmp_trap input plugin to support SNMPv3 traps. MD5 and SHA1 authentication protocols are supported, and DES, AES, AES192, AES256, AES192c and AES256c privacy protocols are supported.
2020-06-04 15:19:47 -06:00
Yarmo Mackenbach aa8cefedda
Add support for Solus distribution to maintainer scripts (#7585) 2020-06-02 23:20:45 -07:00
Simon Knittel af8093e00e
Fix typo in queue depth example of diskio plugin (#7613) 2020-06-02 23:11:13 -07:00
Yamagishi Kazutoshi 1e7f714b2b
Add support for env variables to shim config (#7603) 2020-06-02 09:29:57 -04:00
Daniel Nelson f27b709efa
Update changelog 2020-06-01 17:12:22 -07:00
Daniel Nelson 4e93b87085
Add support for once mode; run processors and aggregators during test (#7474) 2020-06-01 15:26:20 -07:00
kelseiv 573f144607
Update AGGREGATORS_AND_PROCESSORS.md (#7599) 2020-05-29 15:32:46 -07:00
Daniel Nelson 13da5e0802
Add github.com/inabagumi/twitter-telegraf-plugin to list of external plugins 2020-05-28 15:45:08 -07:00
Nicolas Filotto 430854f6de
Fix segmentation violation on connection failed (#7593) 2020-05-28 11:05:57 -07:00
David Reimschussel d7bb4a931b Update changelog 2020-05-27 15:43:26 -06:00
reimda 71b0b96241
Add processor to look up service name by port (#7540) 2020-05-27 15:42:59 -06:00
Steven Soroka a438678d5b
make sure parse error includes offending text (#7561) 2020-05-27 14:58:58 -04:00
Daniel Nelson 7b06624885
Update docs for newrelic output 2020-05-27 11:52:21 -07:00
hsinghkalsi 580ac61cf7
Add newrelic output plugin (#7019) 2020-05-27 11:24:49 -07:00
Daniel Nelson 7b33ef011a
Update changelog 2020-05-26 15:52:53 -07:00
Nicolas Filotto 7ef1d53551
Allow collection of HTTP Headers in http_response input (#7405) 2020-05-26 15:52:13 -07:00
Daniel Nelson 40fdafe193
Update changelog 2020-05-26 15:49:36 -07:00
Daniel Nelson d27f676091
Update to Go 1.14.3 with testing using 1.13.11 (#7564) 2020-05-26 15:40:25 -07:00
Daniel Nelson bdbf57576a
Update changelog 2020-05-26 14:18:53 -07:00
Harshit Bansal 092059c066
Exclude csv_timestamp_column and csv_measurement_column from fields (#7572) 2020-05-26 14:16:48 -07:00
Steven Soroka 2561aac6ef
fix go version check (#7562) 2020-05-26 16:11:02 -04:00
Daniel Nelson 5345ad529d
Update changelog 2020-05-26 12:20:08 -07:00
Harshit Bansal 22c0bdb38c
Fix the typo in `gcc_pu_fraction` to `gc_cpu_fraction` (#7573) 2020-05-26 12:18:24 -07:00
Daniel Nelson f9a110f407
Update changelog 2020-05-26 12:08:31 -07:00
Anton Aksola ad97b744a3
Fix numeric to bool conversion in converter (#7579)
A type switch case with multiple conditions causes the value to remain as
interface which causes toBool to always return true for any numeric values.
2020-05-26 12:07:24 -07:00
Daniel Nelson f91d0833fb
Add defaults processor to readme/changelog 2020-05-22 11:49:34 -07:00
Jeff Registre a7674b707b
Add defaults processor to set default field values (#7370) 2020-05-22 11:44:13 -07:00
Daniel Nelson e6f06457ce
Update changelog 2020-05-22 11:09:22 -07:00
Daniel Nelson a6010b8276
Update changelog 2020-05-22 00:12:03 -07:00
raul-te 4d071bed24
Add option to disable mongodb cluster status (#7515)
It can be expensive to compute these metrics. In particular, when
retrieveing the amount of jumbo chunks, an index is not being used and
consequently the query triggers an expensive COLLSCAN. For big
databases, this query has negative impact on the cluster performance.
2020-05-22 00:11:00 -07:00
Daniel Nelson 130403c0c9
Update changelog 2020-05-22 00:07:27 -07:00
Josh Soref f975b94404
Fix typos in sqlserver input (#7524) 2020-05-22 00:05:10 -07:00
Daniel Nelson a4459bd57a
Use updated clock package to resolve test failures (#7516) 2020-05-21 23:39:37 -07:00
Steven Soroka d4e9fd15ce
fix randomly failing CI test (#7514) 2020-05-21 16:53:07 -04:00
Daniel Nelson 58ad64a43b
Update changelog 2020-05-20 17:35:36 -07:00
debu99 f10c8ff92d
Add cluster state integer to mongodb input (#7489) 2020-05-20 17:34:50 -07:00
Daniel Nelson c3a54f4fb8
Update changelog 2020-05-20 17:16:01 -07:00
ihard 94c75b51a8
Add configurable separator graphite serializer and output (#7545) 2020-05-20 17:15:18 -07:00
Daniel Nelson 10560e5a10
Update changelog 2020-05-20 17:00:11 -07:00
denzilribeiro 5280023abe
Fix instance name resolution in performance counter query (#7526) 2020-05-20 16:55:37 -07:00
Daniel Nelson 89f924639c
Set 1.14.3 release date 2020-05-19 12:08:13 -07:00
Daniel Nelson 7681469cd5
Update changelog 2020-05-19 11:59:00 -07:00
Daniel Nelson edd8338180
Close HTTP2 connections on timeout in influxdb outputs (#7517) 2020-05-19 11:53:10 -07:00
Daniel Nelson 443ac6df23
Fix negative value parsing in impi_sensor input (#7541) 2020-05-19 11:20:29 -04:00
Josh Soref bf1eb291f2
Fix assorted spelling mistakes (#7507) 2020-05-15 15:43:32 -07:00
Max Greenwald f74824eecb
Fix documentation of percent_packet_loss field (#7510) 2020-05-14 13:39:00 -07:00
Samantha Wang d2831d73ab
Update docs for execd plugins (#7465) 2020-05-14 11:19:19 -04:00
Daniel Nelson 68b936c9f0
Update procstat pid_tag documentation 2020-05-14 00:48:05 -07:00
Josh Soref 2c56d6de81
Fix spelling errors in comments and documentation (#7492) 2020-05-14 00:41:58 -07:00
Daniel Nelson c78045c13f
Update changelog 2020-05-13 12:09:37 -07:00
Pontus Rydin 23756077a4
Add truncate_tags setting to wavefront output (#7503) 2020-05-13 12:02:39 -07:00
Daniel Nelson bb86ee0085
Update changelog 2020-05-12 14:02:21 -07:00
Darin Fisher 670277f785
Add authentication support to the http_response input plugin (#7491) 2020-05-12 14:01:17 -07:00
Daniel Nelson a78de9c5f0
Update changelog 2020-05-12 12:57:41 -07:00
reimda 934f6af99f
Handle multiple metrics with the same timestamp in dedup processor (#7439) 2020-05-12 12:56:35 -07:00
Daniel Nelson 47e1cdc0ee
Update changelog 2020-05-12 12:24:31 -07:00
Kostiantyn Nemchenko 00ad5baa19
Add additional fields to mongodb input (#7321)
New metrics include:
- assertions
- database operations
- documents/index keys usage
- replication
- tcmalloc memory management
- storage
- version
2020-05-12 11:31:54 -07:00
Daniel Nelson 6a9e879d71
Update changelog 2020-05-11 11:37:20 -07:00
Harshit Bansal 568cb8e64c
Add integer support to enum processor (#7483) 2020-05-11 11:36:21 -07:00
Alex Heylin 134c84f45d
Fix typo in Windows service description (#7486)
Co-authored-by: Alex Heylin <alexh@gmal.co.uk>
2020-05-11 12:20:02 -04:00
Daniel Nelson 48b8357f01
Update changelog 2020-05-07 17:19:46 -07:00
Rich Y f076b6c115
Add field creation to date processor and integer unix time support (#7464) 2020-05-07 17:19:03 -07:00
Daniel Nelson f14b3759d4
Update changelog 2020-05-07 11:26:42 -07:00
Giovanni Luisotto db0d950b3a
Add cpu query to sqlserver input (#7359) 2020-05-07 11:25:03 -07:00
Daniel Nelson 607038c652
Update changelog 2020-05-06 12:03:16 -07:00
Daniel Nelson fd76c8bf21
Rework plugin tickers to prevent drift and spread write ticks (#7390) 2020-05-06 11:59:16 -07:00
Daniel Nelson c8dbf13fc1
Update changelog 2020-05-06 11:40:59 -07:00
Daniel Nelson 283a16316a
Update datadog output documentation (#7467) 2020-05-06 11:25:21 -07:00
i-prudnikov 0924ad2668
Use docker log timestamp as metric time (#7434) 2020-05-06 11:20:44 -07:00
Steven Soroka 022ff63d29
fix issue with execd-multiline influx line protocol (#7463) 2020-05-05 17:43:45 -04:00
Alex Samorukov f25936b796
Add information about HEC JSON format limitations and workaround (#7459) 2020-05-05 11:12:21 -07:00
Giovanni Luisotto 53c86890af
Rename measurement to sqlserver_volume_space (#7457) 2020-05-05 10:56:03 -07:00
Steven Soroka cc927357a4
shim improvements for docs, clean quit, and slow readers (#7452) 2020-05-05 10:14:57 -04:00
Daniel Nelson 8ee12d07a1
Update changelog 2020-05-04 16:27:03 -07:00
Daniel Nelson d16485e1a3
Fix gzip support in socket_listener with tcp sockets (#7446) 2020-05-04 16:26:05 -07:00
Daniel Nelson f351e6a68f
Update changelog 2020-05-04 16:25:20 -07:00
Daniel Nelson 973aec42b3
Remove debug fields from spunkmetric serializer (#7455) 2020-05-04 16:21:32 -07:00
Samantha Wang 145bad6194
Fix filepath processor link in changelog (#7454) 2020-05-04 15:35:10 -07:00
Steven Soroka b73a232a6a
Support Go execd plugins with shim (#7283) 2020-05-04 14:09:10 -04:00
Daniel Nelson 7a5690cd36
Update changelog 2020-05-01 11:23:25 -07:00
Andrés Álvarez b1ae81bb75
Add filepath processor plugin (#7418) 2020-05-01 11:21:41 -07:00
William Austin 59acbd4f13
Add ContentEncoder to socket_writer for datagram sockets (#7417) 2020-04-30 13:21:34 -07:00
Steven Soroka 07c6b78c8f
Sflow rework (#7253) 2020-04-29 17:28:55 -04:00
Daniel Nelson a0679c5427
Update changelog 2020-04-29 11:33:46 -07:00
presslab-us e1b2ebe06d
Use same timestamp for all objects in arrays in the json parser (#7412) 2020-04-29 11:32:19 -07:00
Daniel Nelson 3163771778
Set 1.14.2 release date 2020-04-28 14:59:07 -07:00
Daniel Nelson 59aa0a3349
Update changelog 2020-04-28 14:54:18 -07:00
Daniel Nelson cf3d48bb68
Allow CR and FF inside of string fields and fix parser panic (#7427) 2020-04-28 14:42:37 -07:00
Daniel Nelson 476a899a1a
Fix typo in name of gc_cpu_fraction field (#7425) 2020-04-28 14:41:44 -07:00
Daniel Nelson b77dac9fdf
Run create database query once per database (#7333) 2020-04-28 13:41:59 -07:00
Daniel Nelson c4e9f72936
Ignore fields with NaN or Inf floats in the JSON serializer (#7426) 2020-04-28 13:41:25 -07:00
Pierrick Brossin 7ee776d67a
Fix interfaces with pointers (#7411) 2020-04-27 11:52:24 -04:00
Daniel Nelson be1dc49ad9
Document distinction between file and tail inputs (#7353) 2020-04-24 16:40:08 -07:00
Daniel Nelson 795750a7a0
Update changelog 2020-04-24 13:40:37 -07:00
Len Smith d915f7c7d6
Fix shard indices reporting in elasticsearch input (#7332) 2020-04-24 13:38:58 -07:00
Daniel Nelson f89381851e
Update changelog 2020-04-24 13:37:14 -07:00
Mark Drayton 1bb436e8a8
Fix string to int64 conversion for SNMP input (#7407) 2020-04-24 13:35:59 -07:00
timhallinflux 8957032790
Update nvidia-smi README for Windows users (#7399) 2020-04-23 17:20:35 -07:00
Daniel Nelson 277b4d2fc4
Update changelog 2020-04-23 15:39:34 -07:00
Jesper Brix Rosenkilde 8ab555129d
Extract target as a tag for each rule in iptables input (#7391) 2020-04-23 15:38:31 -07:00
Daniel Nelson c8b9cb4087
Update changelog 2020-04-22 16:18:00 -07:00
Daniel Nelson 2799302142
Fix dimension limit on azure_monitor output (#7336) 2020-04-22 16:16:22 -07:00
Daniel Nelson 0858b779c6
Update changelog 2020-04-22 16:00:55 -07:00
Daniel Nelson 5a30c9816e
Use new higher per request limit for cloudwatch GetMetricData (#7335) 2020-04-22 15:53:01 -07:00
Daniel Nelson 552ead3af5
Update changelog 2020-04-21 16:30:30 -07:00
hydro-b 4db9e8a968
Add support for MDS and RGW sockets to ceph input (#6915) 2020-04-21 16:29:43 -07:00
Daniel Nelson 4903facddb
Update changelog 2020-04-21 13:56:14 -07:00
Daniel Nelson 702946b5cf
Add option to save retention policy as tag in influxdb_listener (#7356) 2020-04-21 13:54:39 -07:00
Daniel Nelson b2ec7973df
Update changelog 2020-04-21 13:46:57 -07:00
Giovanni Luisotto 82c9f0f7f8
Trim instance tag in the sqlserver performance counters query (#7351) 2020-04-21 13:42:35 -07:00
Daniel Nelson 2d61669cfd
Update changelog 2020-04-21 11:31:45 -07:00
Pontus Rydin d0db0e8f0a
Fix vSphere 6.7 missing data issue (#7233) 2020-04-21 11:30:29 -07:00
Daniel Nelson d1f109b316
Update modbus readme 2020-04-21 11:27:35 -07:00
Daniel Nelson c7797cc3c4
Update changelog 2020-04-21 11:23:19 -07:00
Sven Rebhan 1006c65587
Add retry when slave is busy to modbus input (#7271) 2020-04-21 11:21:27 -07:00
Steven Soroka 050ed9e61e
fix issue with closing flush signal channel (#7384) 2020-04-21 13:33:47 -04:00
Daniel Nelson a4eb9c2205
Use the product token for the user agent in more locations (#7378) 2020-04-21 10:02:18 -07:00
Steven Soroka c9a3b697b8 Update changelog 2020-04-20 14:59:46 -04:00
Daniel Nelson 49c915541e
Update changelog 2020-04-20 11:56:17 -07:00
anilkun 1568932457
Update github.com/aws/aws-sdk-go (#7373)
Fix cloudwatch metric writing when imdsv1 is disabled.
2020-04-20 11:54:27 -07:00
Steven Soroka 819481b195
add support for SIGUSR1 to trigger flush (#7366) 2020-04-20 13:49:10 -04:00
Steven Soroka 6c72c645a2
add another grok example for custom timestamps (#7367) 2020-04-20 13:18:12 -04:00
Pierrick Brossin 52a3f5d404
Fibaro input: for battery operated devices, add battery level scraping (#7319) 2020-04-20 10:58:50 -04:00
Daniel Nelson 73ef0bcba2
Deprecate logparser input and recommend tail input as replacement (#7352) 2020-04-16 13:07:03 -07:00
Daniel Nelson 3380471e18
Adjust heading level in the filtering examples to allow linking 2020-04-15 10:51:31 -07:00
Daniel Nelson 03819ba9ec
Set 1.14.1 release date 2020-04-14 13:58:48 -07:00
Daniel Nelson 413ec7bbd7
Update changelog 2020-04-14 12:32:29 -07:00
M0rdecay 27f09758ba
Add reading bearer token from a file to http input (#7304) 2020-04-14 12:31:26 -07:00
Daniel Nelson 0fa92a686e
Update changelog 2020-04-14 12:19:43 -07:00
Daniel Nelson eb8d805370
Fix exclude database and retention policy tags is shared (#7323) 2020-04-14 12:15:35 -07:00
Daniel Nelson 48f5da7e33
Fix status path when using globs in phpfpm (#7324) 2020-04-14 12:14:49 -07:00
Daniel Nelson aab5800aac
Regenerate telegraf.conf 2020-04-13 12:46:03 -07:00
reimda 9413291064
Fix error in docs about exclude_retention_policy_tag (#7311) 2020-04-13 12:44:03 -07:00
Daniel Nelson f4fa64170e
Update changelog 2020-04-13 11:33:59 -07:00
Daniel Nelson 0479f399f9
Update changelog 2020-04-13 11:20:23 -07:00
Daniel Nelson 3dab845040
Fix Name field in template processor (#7258) 2020-04-13 10:57:48 -07:00
Andrés Álvarez cc6c77f301
Deploy telegraf configuration as a "non config" file (#7250) 2020-04-09 14:27:59 -04:00
Andrés Álvarez df145c7e56
Fix export timestamp not working for prometheus on v2 (#7289) 2020-04-06 16:21:01 -04:00
Giovanni Luisotto c56596dec2
Sql Server - Disk Space Measurement (#7214) 2020-04-06 11:53:54 -04:00
Russ Savage 73911d00f1
Add series cardinality warning to sflow readme (#7285) 2020-04-03 12:52:23 -07:00
Daniel Nelson 71a67ef227
Improve documentation for the Metric interface (#7256) 2020-04-03 10:11:41 -07:00
Daniel Nelson fb0fee0fbb
Update permission docs on postfix input (#7255) 2020-04-03 10:09:24 -07:00
kelseiv 6445e775cf
Document kapacitor_alert and kapacitor_cluster measurements (#7278) 2020-04-02 18:24:10 -07:00
Daniel Nelson c083c1f64d
Update changelog 2020-03-31 12:56:53 -07:00
denzilribeiro ccefc42711
Add OPTION RECOMPILE for perf reasons due to temp table (#7242) 2020-03-31 12:54:22 -07:00
Daniel Nelson 8ff2645550
Update changelog 2020-03-31 11:31:09 -07:00
Ilya Antipov 0cad343de7
Support multiple templates for graphite serializers (#7136) 2020-03-31 11:30:21 -07:00
Daniel Nelson 218fbc41b9
Update changelog 2020-03-30 13:31:33 -07:00
Sven Rebhan 3650d74de2
Add possibility to specify measurement per register (#7231) 2020-03-30 13:30:42 -07:00
Daniel Nelson 9a1c26d6cc
Add limit to number of undelivered lines to read ahead in tail (#7210) 2020-03-27 15:40:08 -07:00
Daniel Nelson 608e818645
Add docs for how to handle errors in check-deps script (#7243) 2020-03-27 15:39:32 -07:00
Daniel Nelson f3ee1d86df
Update changelog 2020-03-26 17:06:27 -07:00
Sven Rebhan f882b8f94f
Add support for 64-bit integer types to modbus input (#7225) 2020-03-26 17:05:43 -07:00
Daniel Nelson cb42f610f4
Set 1.14.0 release date 2020-03-26 12:01:44 -07:00
Daniel Nelson cd1cd54e06
Update changelog 2020-03-24 17:03:31 -07:00
dbutler-starry 124735af2e
Apply ping deadline to dns lookup (#7140) 2020-03-24 17:02:23 -07:00
Daniel Nelson 83925c9960
Update changelog 2020-03-24 14:22:03 -07:00
Programmer19 715e991186
Add ability to specify HTTP Headers in http_listener_v2 which will added as tags (#7223) 2020-03-24 14:20:46 -07:00
Asgaut Eng c12c55da96
Fix 'nil' file created by Makefile on Windows (#7224)
The /dev/null device on Windows is a virtual file named "nul" not "nil".
This fix works under both cmd.exe and Powershell.
2020-03-24 14:18:03 -07:00
Daniel Nelson 9b9a84964b
Update changelog 2020-03-23 16:17:04 -07:00
Denis Pershin 4c59de9023
Add additional concurrent transaction information (#7193) 2020-03-23 16:14:56 -07:00
AnastasiyaRagozina 3e1c7a8948
Add commands stats to mongodb input plugin (#6905) 2020-03-23 12:33:10 -07:00
Daniel Nelson ba138b8f5b
Update changelog 2020-03-23 11:34:39 -07:00
Harshit Bansal a907edc1f3
Fix url encoding of job names in jenkins input plugin (#7211) 2020-03-23 11:33:06 -07:00
Daniel Nelson 1d697dd323
Update next_version on master to 1.15.0 2020-03-18 16:21:48 -07:00
Daniel Nelson 6a2d35956c
Update etc/telegraf.conf 2020-03-18 16:15:15 -07:00
Daniel Nelson 2a45781697
Fix datastore_include option in vsphere input readme 2020-03-18 16:13:14 -07:00
Daniel Nelson ccdd3cd245
Update github.com/prometheus/client_golang to latest (#7200) 2020-03-18 16:09:53 -07:00
Daniel Nelson e376228a1a
Update etc/telegraf.conf 2020-03-18 15:32:02 -07:00
Daniel Nelson 4e28e5721b
Update google.cloud.go to latest (#7199) 2020-03-18 15:30:49 -07:00
Daniel Nelson 9fbf288518
Remove init checks for valid label and field selectors (#7198)
Importing k8s.io/klog starts a long running goroutine at init time.
2020-03-18 13:48:29 -07:00
Daniel Nelson f11a2f80c4
Fix s2geo import 2020-03-18 13:04:42 -07:00
Daniel Nelson 35ef2559d3
Fix s2geo documentation and code to reflect current plugin name 2020-03-18 12:28:02 -07:00
Daniel Nelson ffaa9467a5
Update changelog and readme 2020-03-18 12:16:05 -07:00
Daniel Nelson cc92d4aba7
Add sFlow input plugin (#7188) 2020-03-18 12:12:24 -07:00
Daniel Nelson 56a7ff574c
Adjust dedup processor description 2020-03-17 18:46:52 -07:00
Daniel Nelson 78fb879aa7
Update readme and changelog 2020-03-17 18:39:08 -07:00
igomura 0038205266
Add dedup processor (#6792) 2020-03-17 15:53:03 -07:00
Daniel Nelson f6ea2598e5
Update changelog 2020-03-17 12:58:20 -07:00
Steven Barth 064247a345
Add support for GNMI DecimalVal type (#7173) 2020-03-17 12:56:51 -07:00
David Reimschussel 9d7f56052e Update changelog 2020-03-17 11:39:36 -06:00
Steven Soroka 6ce0660cee
Update to the latest gopsutil (#7185) 2020-03-17 13:22:11 -04:00
reimda ef2bff2916
Set headers on influxdb_listener ping URL (#7182) 2020-03-17 11:03:27 -06:00
Steven Soroka 4162599081
Remove dep from contribution guidelines (#7180) 2020-03-16 19:24:02 -04:00
Steven Soroka fcb038d352
update docker files for go modules. Closes #7170 (#7179) 2020-03-16 19:21:21 -04:00
Steven Soroka dafd08c0ca add docker to bug report instructions 2020-03-16 19:17:49 -04:00
Steven Soroka c78e4b449c
fix broken test on mac (#7181) 2020-03-16 19:07:39 -04:00
Daniel Nelson 222dce49f0
Update changelog 2020-03-16 13:47:58 -07:00
Harshit Bansal a612a4d85f
Add option for explicitly including queries in sqlserver input plugin (#7150) 2020-03-16 13:46:42 -07:00
Daniel Nelson 87f60ccf87
Update changelog 2020-03-16 13:45:34 -07:00
Giovanni Luisotto 20d45d651c
Fix schedulers query compatibility with pre SQL-2016 (#7144) 2020-03-16 13:36:31 -07:00
denzilribeiro 0a75dea70d
Add Database IO Tempdb per Azure DB and fix PerfmonV2 collection for on-prem (#7163) 2020-03-16 13:32:30 -07:00
Daniel Nelson 9508bbdf29
Update eventhub_consumer README. 2020-03-16 13:21:53 -07:00
Daniel Nelson 1b187b173d
Update changelog 2020-03-16 12:37:44 -07:00
Daniel Nelson 79aad9f06a
Rename eventhub -> eventhub_consumer 2020-03-16 12:15:18 -07:00
R290 f69b639aa9
Add Azure IoT Hub / Event Hub input plugin (#6928) 2020-03-16 10:54:21 -07:00
Daniel Nelson 2a465cc687
Use merge=union driver for go.sum 2020-03-16 10:02:49 -07:00
M0rdecay da9f19ca9d
Allow using name_* modificators for output plugins (#7174) 2020-03-13 15:04:23 -07:00
Daniel Nelson d8b66b69d5
Mention metric filtering in csv parser docs 2020-03-13 14:30:27 -07:00
Daniel Nelson d5df7666d8
Update changelog 2020-03-12 17:01:07 -07:00
Tim Hughes e6f0644128
Add Arista LANZ consumer input plugin (#4112) 2020-03-12 16:45:35 -07:00
Steven Soroka 42804b7c56
fix issue with ping input in windows. Closes #7088 (#7157) 2020-03-11 18:03:11 -04:00
Daniel Nelson 389723c08a
Update changelog, readme, licenses 2020-03-10 15:47:05 -07:00
Daniel Nelson fe4ff3a3be
Move s2_geo processor to directory with same name 2020-03-10 15:46:46 -07:00
alespour c5234b365a
Add s2_geo processor plugin (#7087) 2020-03-10 15:39:06 -07:00
Samantha Wang 0be6275495
Add versioning to example readme (#7152) 2020-03-10 18:31:59 -04:00
Daniel Nelson eb063d0cc7
Update changelog 2020-03-10 15:22:19 -07:00
Daniel Nelson c7146be2f2
Add support for setting retention policy using tag (#7141) 2020-03-10 15:20:03 -07:00
Daniel Nelson c50b02e58d
Fix internal metrics for output split into multiple lines (#7119) 2020-03-10 15:19:32 -07:00
Steven Soroka 64fecfa19e
fix inputs.postgresql panic in posgres 12 (#7151) 2020-03-10 17:06:29 -04:00
Steven Soroka 3bc53558a4
fix concurrency panic in ntpq input. Closes #7101 (#7143) 2020-03-10 16:48:30 -04:00
Steven Soroka c31ba94bb8
modbus to support scaling int32 and float32-ieee (#7148) 2020-03-10 16:46:36 -04:00
Daniel Nelson 755ff25502
Update changelog 2020-03-10 13:44:09 -07:00
Daniel Nelson b6de4da41f
Add topic tag options to kafka output (#7142) 2020-03-10 13:38:26 -07:00
Daniel Nelson 41f39f5f59
Update changelog 2020-03-10 12:47:26 -07:00
Giovanni Luisotto 1601a06915
Fix several issues with DatabaseIO query in sqlserver input (#7103) 2020-03-10 12:44:54 -07:00
Daniel Nelson a9d1726f99
Update changelog 2020-03-10 12:09:19 -07:00
Harshit Bansal 134af0fe4b
Fix log rotation to use actual file size instead of bytes written (#7133) 2020-03-10 12:07:42 -07:00
Harshit Bansal 1ce56f8b59
Document port specification in postgres input plugins (#7132) 2020-03-10 12:02:50 -07:00
Steven Soroka dfa4d1bf8e
update list of dependencies (#7147) 2020-03-10 10:50:38 -04:00
Steven Soroka 830a922a41 fix deps 2020-03-10 10:21:23 -04:00
Steven Soroka a76d10a44e sort lines 2020-03-10 09:59:37 -04:00
Steven Soroka 595c8b6075 update list of dependencies 2020-03-10 09:47:26 -04:00
Steven Soroka 874804a2ad update changelog 2020-03-09 18:46:55 -04:00
Kevin Lin d35290ac7e
plugins/inputs: New input for Wireguard server (#6367) 2020-03-09 18:34:43 -04:00
Daniel Nelson 318a963a89
Check license of dependencies file for changes (#7108) 2020-03-09 14:47:28 -07:00
Daniel Nelson 1eca315e15
Update changelog 2020-03-09 14:14:00 -07:00
Daniel Nelson ca65d52c9a
Add support for converting tag or field to measurement in converter processor (#7049) 2020-03-09 14:08:38 -07:00
Russ Savage 898487b2da
Fix typo in salesforce readme (#7120) 2020-03-05 18:07:28 -08:00
Daniel Nelson 7b03a6f4ab
Update stackdriver plugins to reflect new product naming (#7098) 2020-03-05 10:36:36 -08:00
Daniel Nelson 561bb3df2e
Fix spelling error in the SNMP field example (#7118) 2020-03-05 10:16:49 -08:00
Daniel Nelson 3817aafdcb
Update clickhouse docs with renamed source tag 2020-03-04 14:46:27 -08:00
Daniel Nelson 6edd57ea87
Rename clickhouse user to username 2020-03-04 14:44:37 -08:00
Daniel Nelson bffd57aa58
Update readme and changelog 2020-03-04 14:42:50 -08:00
Daniel Nelson e4caa347a2
Add ClickHouse input plugin (#6441) 2020-03-04 14:20:46 -08:00
David Reimschussel b6892378a0 Update changelog 2020-03-04 11:30:07 -07:00
reimda a0276385b1
Refactor InfluxDB listener (#6974)
Use streaming parser in InfluxDB listener
2020-03-04 11:13:44 -07:00
josephpeacock ab8438dcc6
Add threaded parsing in statsd input plugin (#6922) 2020-03-03 14:47:33 -08:00
Daniel Nelson f04d84994d
Update changelog 2020-03-02 18:52:22 -08:00
mg03 dd1ace73b0
Add label and field selectors to prometheus input k8s discovery (#6969) 2020-03-02 18:51:31 -08:00
Daniel Nelson 69554cd92e
Update changelog 2020-03-02 12:04:32 -08:00
Felix Edelmann 32d80d2a08
Add non-cumulative histogram (#7071) 2020-03-02 10:59:19 -08:00
Daniel Nelson a6dc099be4
Update changelog 2020-02-28 14:48:27 -08:00
Andre Nathan 88216eb4d2
Allow globs in FPM unix socket paths (#7089) 2020-02-28 14:47:04 -08:00
Steven Soroka a34180459a Close stdin on exit in execd input 2020-02-28 13:58:56 -05:00
Jan Graichen a20e6953d2
Add an exec daemon plugin (#4424) 2020-02-28 13:46:03 -05:00
Rick van de Loo 0103691eb6
Fix typo in exec input readme (#7086) 2020-02-26 09:33:24 -08:00
Daniel Nelson f91261d7fe
Add basic benchmark for influx serializer reader (#7078) 2020-02-25 18:58:23 -08:00
Daniel Nelson 1301cbce0a
Update changelog 2020-02-25 16:37:29 -08:00
Joao Gilberto Magalhães de16279d72
Add RabbitMQ slave_nodes and synchronized_slave_nodes metrics (#7084) 2020-02-25 16:36:06 -08:00
Daniel Nelson 9d601d6d78
Set 1.13.4 release date 2020-02-25 12:51:56 -08:00
Daniel Nelson 608891c405
Update changelog 2020-02-25 12:21:09 -08:00
Anthony Arnaud 8c99dc7b5e
Use the same timestamp per call if no time is provided (#7063) 2020-02-25 12:19:28 -08:00
Daniel Nelson 9f8a73426d
Update changelog 2020-02-25 12:10:49 -08:00
Daniel Nelson 8acf276afe
Use Go 1.13.8 to build official packages (#7079) 2020-02-25 12:05:44 -08:00
Daniel Nelson f263b7ce59
Update changelog 2020-02-25 10:43:02 -08:00
Steven Soroka 2e32f894b6
Fix inconsistency with input error counting (#7077) 2020-02-25 10:40:29 -08:00
Daniel Nelson fc2486f24c
Update changelog 2020-02-24 16:32:58 -08:00
donvipre b127254cca
Add additional tags and fields to apcupsd (#7065)
- new tags:
  - model
- new metrics:
  - battery_date
  - nominal_input_voltage
  - nominal_battery_voltage
  - nominal_power
  - firmware
2020-02-24 16:32:09 -08:00
Daniel Nelson eb29f46721
Update changelog 2020-02-24 16:01:27 -08:00
Daniel Nelson b5e0577d6b
Use add time for prometheus expiration calculation (#7056) 2020-02-24 15:53:16 -08:00
Daniel Nelson e9e4f2c354
Update changelog 2020-02-21 11:13:03 -08:00
Giovanni Luisotto 413ca898be
Fix perf counters collection on named instances in sqlserver input (#7060) 2020-02-21 11:11:50 -08:00
Daniel Nelson 3a9062394a
Update changelog 2020-02-20 14:31:25 -08:00
R.I.Pienaar 79ff743064
Add support for credentials file to nats_consumer and nats output (#7022) 2020-02-20 14:30:04 -08:00
Steven Soroka 82a358b910
testing circle ci for mac (#7054) 2020-02-20 17:23:13 -05:00
Daniel Nelson cf0667264a
Update changelog 2020-02-20 10:47:03 -08:00
Daniel Nelson 2e48a3b45a
Update github.com/safchain/ethtool (#7052) 2020-02-20 10:45:59 -08:00
James Buchan cd2a77a95b
Remove duplicate loop in net_response plugin (#7055) 2020-02-20 13:31:41 -05:00
Steven Soroka 5023df08d8
resolves issues where failed api calls lead to obscure errors (#7051) 2020-02-19 21:46:08 -05:00
Daniel Nelson 3058308d38
Update changelog 2020-02-19 12:37:08 -08:00
prashanthjbabu 59a506ae4a
Add process created_at time to procstat input (#7039) 2020-02-19 11:57:07 -08:00
MikaelUrankar 740e30a96d
Update gopsutil to add support for freebsd/arm64 (#7031) 2020-02-19 11:54:19 -08:00
Daniel Nelson 3f7198fca5
Update changelog 2020-02-18 17:32:18 -08:00
Steven Barth 0a1373765e
Fix dash to underscore replacement when handling embedded tags in Cisco MDT (#7035)
Currently configuring embedded_tags for cisco_telemetry_mdt input
requires an unusual mix of - and _, i.e. one needs to specify e.g.
Cisco-IOS-XR-wdsysmon-fd-oper:system-monitoring/cpu-utilization/process_cpu/process-id
for it to work correctly. Additionally, tags created might still contain
dashes against convention.

This fix creates correctly formatted tags with underscores instead of
dashes and unifies the configuration parameter to expect either dashes
or underscores, so old configurations are still valid.
2020-02-18 17:31:39 -08:00
Steven Soroka 8b3bd2585d
Fix issues with failing tests on darwin (#7042) 2020-02-18 16:13:53 -08:00
Atakan Özceviz 397a04aa32
Fix typo in http_response readme (#7036) 2020-02-18 14:30:56 -08:00
Daniel Nelson 88a89634d8
Update changelog 2020-02-14 15:37:46 -08:00
Daniel Nelson 784266a301
Update jenkins readme 2020-02-14 15:36:58 -08:00
vikkyomkar e056097cb4
Add new fields for Jenkins Total and Busy executors (#6957) 2020-02-14 14:04:54 -08:00
Daniel Nelson 07a7b70f97
Update changelog 2020-02-12 21:17:27 -08:00
Daniel Nelson cb192c85b2
Update pgbouncer readme 2020-02-12 21:15:59 -08:00
Daniel Nelson cb2c26a332
Fix support with pgbouncer <1.9 2020-02-12 21:15:29 -08:00
Mark Fletcher 6c839a33a4
Fix pgbouncer input when used with newer pgbouncer versions (#6820) 2020-02-12 20:53:11 -08:00
Daniel Nelson e3bc546a46
Add release note regarding Windows Vista support 2020-02-12 17:37:35 -08:00
Daniel Nelson 68678755de
Update changelog 2020-02-12 17:37:35 -08:00
Quanah Gibson-Mount e082c8d800
Add support for MDB database information to openldap input (#6993) 2020-02-12 17:33:48 -08:00
Alvaro Olmedo Rodriguez e122bc7503
Fix units in redis documentation (#7016) 2020-02-12 09:43:44 -08:00
Antonio Garcia 9d97ed22e6
Fix float conversion and startup connection issue in modbus input (#7002) 2020-02-10 16:54:33 -08:00
Daniel Nelson c681eb3524
Fix issue number in changelog 2020-02-10 14:24:23 -08:00
Daniel Nelson c1eb0c8501
Update changelog 2020-02-10 14:23:29 -08:00
Daniel Nelson 5b8c71e61a
Search for chronyc only when chrony input plugin is enabled (#7005) 2020-02-10 14:22:07 -08:00
Daniel Nelson d3b89ec51f
Update changelog 2020-02-10 14:20:03 -08:00
Daniel Nelson 0710cc7488
Parse NaN values from summary types in prometheus input (#6997) 2020-02-10 14:18:29 -08:00
Daniel Nelson d46f94112c
Use require in cisco mdt tests to avoid follow on errors (#6984) 2020-02-06 14:18:42 -08:00
Daniel Nelson 5f2f2ff33d
Update readme and changelog for template processor 2020-02-06 13:34:36 -08:00
RobMalvern 15d0166922
Add template processor (#6494) 2020-02-06 12:40:03 -08:00
Daniel Nelson 62ffd7172f
Update changelog 2020-02-04 17:33:57 -08:00
Manthan Sharma ae22db4b81
Add support for titlecase transformation to strings processor (#6982) 2020-02-04 17:32:41 -08:00
Daniel Nelson 0cc71dbd51
Document the behavior of an unset routing key (#6983) 2020-02-04 16:40:00 -08:00
David Reimschussel e51d9a3575 Set 1.13.3 release date 2020-02-04 16:36:17 -07:00
David Reimschussel 4991fcb281 Update changelog 2020-02-04 16:27:44 -07:00
Daniel Nelson e8d9add2d1
Expire metrics on query in addition to on add (#6981)
Ensures that expired metrics are removed even when no new data is sent
to the output.
2020-02-04 16:12:23 -07:00
Daniel Nelson 8792a5fd5e
Exclude processors and aggregators from minimal config example 2020-02-04 13:54:11 -08:00
Antonio Garcia bbb8858c1d
Delete .README.md.swp (#6980) 2020-02-04 10:36:02 -08:00
Daniel Nelson bc09c21f6e
Update changelog 2020-02-03 18:53:59 -08:00
Daniel Nelson c9a3887501
Update to github.com/safchain/ethtool@latest (#6975) 2020-02-03 18:52:08 -08:00
Daniel Nelson 40ef7fe4d1
Update changelog 2020-02-03 18:24:43 -08:00
Daniel Nelson adb156c185
Remove quantile example from aggregators docs
Avoid confusion since we don't yet have an aggregator for quantiles.
2020-02-03 18:13:45 -08:00
Daniel Nelson 38bc81e746
Fix atomic usage in tests (#6964) 2020-01-31 14:14:44 -08:00
SirishaGopigiri 6cac2fb388
Improve monit http client transport mock (#6955) 2020-01-31 15:09:09 -07:00
Asgaut Eng 9823952597
Fix duplicate TrackingIDs returned (#6960)
There is a small chance the newTrackingID() function in tracking.go
will return the same id to multiple simultaneous callers.
The function must return the value returned by atomic.AddUint64()
to be safe.
2020-01-31 12:03:54 -08:00
Daniel Nelson ede9bc520b
Update readme and changelog 2020-01-29 02:50:11 -08:00
Antonio Garcia 9389099820
Add modbus input plugin (#6154) 2020-01-29 02:18:58 -08:00
Daniel Nelson 99da6f4883
Remove dep dependency information (#6937) 2020-01-27 23:18:23 -08:00
David Reimschussel 9d214ae291 Update changelog 2020-01-24 12:01:13 -07:00
victornet c6b8947c15 Add counters for merged reads and writes to diskio input. 2020-01-24 11:57:47 -07:00
Daniel Nelson 4929ad1e6e
Update changelog 2020-01-23 15:47:33 -08:00
AnastasiyaRagozina cb50fadc20 Add replica set tag to mongodb input (#6914) 2020-01-23 15:46:23 -08:00
Daniel Nelson 5d9cecaa02
Update changelog 2020-01-23 15:36:25 -08:00
Daniel Nelson bbe2d12e7e
Update kibana docs 2020-01-23 15:33:13 -08:00
vikkyomkar bc3429ed48 Add compatibility for Kibana 6.4 and later (#6923) 2020-01-23 12:08:16 -08:00
Daniel Nelson fb1b29cc20
Update changelog 2020-01-22 15:29:21 -08:00
Daniel Nelson 9243ae9f51
Add udp internal metrics for the statsd input (#6921) 2020-01-22 15:28:41 -08:00
Daniel Nelson ec35f07770
Update monit docs and update changelog/readme 2020-01-22 15:27:54 -08:00
SirishaGopigiri 9fd400c9ac Add input plugin for monit (#6850) 2020-01-22 14:45:18 -08:00
Daniel Nelson 9747fa7f07
Update changelog 2020-01-21 17:11:50 -08:00
James Beckett 916f39d285 Add server_name override for x509_cert plugin (#6917) 2020-01-21 17:06:58 -08:00
Daniel Nelson 6a982da8b0
Set release date for 1.13.2 2020-01-21 11:00:37 -08:00
Daniel Nelson 4c79a68544
Update changelog 2020-01-21 10:49:51 -08:00
Daniel Nelson c6f8b273c0
Allow a user defined field to be used as the graylog short_message (#6700) 2020-01-21 10:49:01 -08:00
Daniel Nelson ebebfd9573
Update changelog 2020-01-21 10:12:59 -08:00
Daniel Nelson c6519c7793
Hook up json_strict option with default of true (#6909) 2020-01-21 10:10:02 -08:00
Daniel Nelson 5f1f4b9e8d
Use Go modules for dependency management (#6912) 2020-01-16 14:38:06 -08:00
Daniel Nelson 17c165391b
Update documentation for infiniband plugin 2020-01-16 13:56:23 -08:00
Will Furnell 182104f95e Add a new input plugin for InfiniBand card/port statistics (#6631) 2020-01-16 12:51:33 -08:00
Daniel Nelson 93f149f126
Update changelog 2020-01-16 12:17:06 -08:00
Pontus Rydin c7b7336da3 Exclude resources by inventory path in vsphere input (#6859) 2020-01-16 12:14:00 -08:00
Daniel Nelson d7b3f1f4ea
Document workaround for truncated powershell output (#6910) 2020-01-15 19:29:50 -08:00
Daniel Nelson ca47606613
Update changelog 2020-01-15 15:28:10 -08:00
Daniel Nelson f6b302621e
Do not add invalid timestamps to kafka messages (#6908) 2020-01-15 15:26:50 -08:00
like-inspur 68925ed1ef Change description for config dns_lookup (#6902) 2020-01-14 18:35:48 -08:00
Daniel Nelson 6d96f359b4
Update changelog 2020-01-14 17:06:34 -08:00
ryan-peck 1b4aad2ccd Change logic to allow recording of device fields when attributes is false (#6638) 2020-01-14 17:05:28 -08:00
Pontus Rydin fc57012629 Deprecated force_discovery_on_init flag in vsphere input (#6861) 2020-01-14 16:30:43 -08:00
Daniel Nelson fdf871f679
Update changelog 2020-01-14 16:27:57 -08:00
Daniel Nelson 8d647c4ebf
Fix URL agent address form with udp in snmp input (#6899) 2020-01-14 16:26:44 -08:00
Daniel Nelson 0693748c35
Show default port in consul sample config 2020-01-14 16:24:14 -08:00
Daniel Nelson d9113c5fdb
Update changelog 2020-01-14 15:17:11 -08:00
Daniel Nelson e8c4efb572
Add date offset and timezone options to date processor (#6886) 2020-01-14 15:16:27 -08:00
Dennis Hoppe 5f2ed4ce4f Remove tabs to fix indentation (#6896) 2020-01-14 12:30:03 -08:00
Daniel Nelson 8f14187e9a
Update changelog 2020-01-13 15:17:08 -08:00
Pontus Rydin 78a7978ea8 Add custom attributes for all resource types in vsphere input (#6884) 2020-01-13 15:15:55 -08:00
Daniel Nelson b908059326
Update changelog 2020-01-13 10:50:53 -08:00
Benjamin Schweizer 875bd7743b Only parse certificate blocks in x509_cert input (#6893) 2020-01-13 10:49:14 -08:00
Daniel Nelson a93eda95e1
Update changelog 2020-01-10 12:44:44 -08:00
Daniel Nelson 0cee84fa6a
Warn without error when processes input is started on Windows (#6891) 2020-01-10 12:43:28 -08:00
Daniel Nelson 949ac7471f
Update changelog 2020-01-09 17:53:18 -08:00
vikkyomkar 1b1d78b8dd Add source and port tags to jenkins_job metrics (#6844) 2020-01-09 17:52:26 -08:00
Daniel Nelson 7faf05023d
Update Warp10 docs and uint64 and timestamp handling (#6885) 2020-01-09 13:57:14 -08:00
Aurélien HÉBERT ce02bebf30 Add output plugin for Warp10 (#1923) 2020-01-09 11:29:16 -08:00
Daniel Nelson 07b75c57fe
Update changelog 2020-01-08 18:19:16 -08:00
Ross Lodge 6f9f0b7f01 Add latency stats to mongo input (#6733) 2020-01-08 18:18:12 -08:00
Daniel Nelson 695678c4a5
Update changelog 2020-01-08 18:10:44 -08:00
denzilribeiro 1df88dd22b Add RBPEX stats collection, DBName for perfmon, proper type for resource stats (#6869) 2020-01-08 17:55:37 -08:00
Daniel Nelson c1456a718e
Update changelog 2020-01-08 12:58:14 -08:00
Daniel Nelson bc576134bb
Set release date for 1.13.1 2020-01-08 11:06:04 -08:00
Daniel Nelson f571f2392a
Update changelog 2020-01-08 10:58:02 -08:00
Daniel Nelson 1498f8addf
Add cardinality tips to FAQ and sqlserver input (#6852) 2020-01-08 10:52:58 -08:00
Daniel Nelson 73488eb61c
Use last path element as field key if path fully specified (#6848) 2020-01-08 10:52:36 -08:00
Daniel Nelson 69d9c10572
Update example telegraf.conf 2020-01-08 10:50:40 -08:00
Daniel Nelson 5f52b9538d
Fix indention in merge sample config 2020-01-08 10:48:06 -08:00
Samantha Wang d62ff1d25c Update merge aggregator config file in README.md (#6805) 2020-01-08 10:46:01 -08:00
Thomas Mohaupt 5b92477603 Fix error in pivot processor docs (#6856) 2020-01-06 15:54:49 -08:00
Daniel Nelson b0398c9a8f
Update changelog 2020-01-03 11:43:19 -08:00
Daniel Nelson 0cf94cfe54
Report rabbitmq_node measurement and return on gather error (#6819) 2020-01-03 11:38:20 -08:00
Daniel Nelson 7e498ede6d
Update github.com/kardianos/service to 1.0.0 (#6849) 2020-01-03 11:37:30 -08:00
Xiaoyu Lee 8e04221fb7 Fix link to uwsgi input (#6851) 2020-01-03 10:58:15 -08:00
Daniel Nelson eb272f450a
Update changelog 2020-01-02 16:39:45 -08:00
Daniel Nelson 2486006495
Add kafka SASL version control to kafka_consumer (#6350) 2020-01-02 16:27:26 -08:00
Daniel Nelson 1edb73916f
Improve suricata input unit test debugging (#6815) 2020-01-02 16:26:48 -08:00
Daniel Nelson 318d8134cf
Update changelog 2020-01-02 16:17:16 -08:00
Daniel Nelson 8831651799
Show platform not supported warning only on plugin creation (#6801) 2020-01-02 16:15:48 -08:00
Daniel Nelson 25e1636775
Fix race condition in logparser tests (#6825) 2020-01-02 16:14:32 -08:00
Daniel Nelson a5ef34f6e2
Update changelog 2019-12-30 13:54:00 -08:00
Jonathan Hurter 01e31e9d53 Invalidate diskio cache if the metadata mtime has changed (#6835) 2019-12-30 13:52:03 -08:00
Daniel Nelson dd67a1c764
Update changelog 2019-12-30 11:46:39 -08:00
Giovanni Luisotto 3d8940e69b Encode query hash fields as hex strings in sqlserver input (#6818) 2019-12-30 11:45:46 -08:00
Daniel Nelson c325c94a96
Rewrite documentation for snmp input (#6802) 2019-12-30 11:33:32 -08:00
Daniel Nelson f035d44fe1
Update changelog 2019-12-27 15:51:09 -08:00
Daniel Nelson 8b73625492
Fix panic on connection loss with undelivered messages (#6806) 2019-12-27 15:48:45 -08:00
Daniel Nelson ef7fd9d030
Update changelog 2019-12-26 10:17:52 -08:00
Brad Vernon 40311dcd7a Fix missing config fields in prometheus serializer (#6823) 2019-12-26 10:15:25 -08:00
Daniel Nelson 2f943e97b7
Update changelog 2019-12-17 16:58:57 -08:00
Bugagazavr b380c65c15 Add support for new nginx plus api endpoints (#6508) 2019-12-17 16:58:06 -08:00
Daniel Nelson 17a84ab4b4
Update changelog 2019-12-17 16:51:11 -08:00
Enno Lohmeier 697963e8cc Expose unbound-control config file option (#6770) 2019-12-17 16:50:00 -08:00
David Reimschussel 644f2ad847 Update changelog 2019-12-17 15:23:51 -07:00
reimda 99279e6461
Convert snmp_trap_test.go to table test (#6803)
Add a test for v1 generic trap.  Add missing leading period in v1 generic trap oid.
2019-12-17 15:12:42 -07:00
maurorappa 2beb79969a Sort alphabetically the output of the plugin listing commands (#6810) 2019-12-17 12:44:17 -08:00
Daniel Nelson cb915a5c5a
Update changelog 2019-12-12 15:03:08 -08:00
Daniel Nelson e6a87cd52e
Update kubernetes sample config and readme 2019-12-12 15:01:50 -08:00
LinaLinn f79ba10ab3 Add ability to collect pod labels to Kubernetes input (#6764) 2019-12-12 14:14:37 -08:00
Daniel Nelson 4fbba13622
Update changelog 2019-12-12 13:58:44 -08:00
gescheit debb5e4fa6 Add use_sudo option to ipmi_sensor input (#6798) 2019-12-12 13:56:28 -08:00
chuckbarkertech 94fc769e0b Fix ServerProperty query stops working on Azure after failover (#6794) 2019-12-12 13:16:41 -08:00
Ram Gopinathan 1aee98f064 Add missing basic auth credentials to haproxy readme (#6796) 2019-12-12 12:38:00 -08:00
Daniel Nelson dde70118c0
Set 1.13.0 release date 2019-12-12 11:09:40 -08:00
Daniel Nelson d6f2857c2b
Update sample config 2019-12-12 11:05:31 -08:00
reimda a7a639f6a3 Fix off by one bug in snmp trap v1 generic trap field (#6797) 2019-12-12 10:54:44 -08:00
reimda cae701c54b Interpret SNMP v1 traps as described in RFC 2576 3.1 (#6793) 2019-12-11 14:29:18 -08:00
Daniel Nelson 7cc3507f22
Update changelog 2019-12-11 11:44:07 -08:00
Ben Hymans 4def7cc5e1 Add option to control collecting global variables to mysql input (#6790) 2019-12-11 11:42:54 -08:00
Daniel Speichert 98585a1853 Set TrimLeadingSpace when TrimSpace is on in csv parser (#6773) 2019-12-11 11:25:35 -08:00
reimda 61fbc68279 Add documentation about listening on port < 1024 (#6785) 2019-12-11 10:23:51 -08:00
Daniel Nelson 05cefe61bd
Document --service-display-name flag for Windows service 2019-12-10 13:13:03 -08:00
Daniel Nelson 7cfde0cf4d
Update changelog 2019-12-10 13:01:53 -08:00
Daniel Nelson aabc7e7d4f
Replace colon chars in prometheus output labels with metric_version=1 (#6781) 2019-12-10 12:59:16 -08:00
Daniel Nelson eb00f41905
Use actual database name in db creation failed log (#6780) 2019-12-10 12:58:59 -08:00
Daniel Nelson 5034af7af2
Update changelog 2019-12-09 12:24:11 -08:00
Daniel Nelson faca80fd00
Fix unix socket dial arguments in uwsgi input (#6769) 2019-12-09 12:15:27 -08:00
Daniel Nelson f0b0295e3c
Override github.com/satori/go.uuid revision for transitive deps (#6768)
While there has been a workaround in place for some time, this change is
being made to reduce confusion around if Telegraf is affected by
https://github.com/satori/go.uuid/issues/73
2019-12-06 17:22:11 -08:00
Daniel Nelson 613d0dbd16
Build packages with Go 1.13.5 (#6767) 2019-12-06 17:10:59 -08:00
likerj 3e46768578 Update supported environment variables (#6747) 2019-12-06 16:43:39 -08:00
Daniel Nelson b54af02a9a
Update changelog 2019-12-05 17:18:09 -08:00
Ross Lodge e6c57e7df4 Add page_faults for mongodb wired tiger (#6732) 2019-12-05 16:38:51 -08:00
Daniel Nelson 1f5be2bac7
Add minimum system requirements to readme 2019-12-04 17:16:00 -08:00
Daniel Nelson d0db03b8f3
Add troubleshooting command for Windows to temp input 2019-12-04 14:32:54 -08:00
Daniel Nelson eeb4690686
Fix prometheus histogram and summary merging (#6756) 2019-12-04 13:41:33 -08:00
Daniel Nelson 48f9f22f33
Document that json tag_keys are not saved as fields. 2019-12-03 16:43:05 -08:00
Daniel Nelson a58db9e447
Increment package versions 2019-12-03 14:59:50 -08:00
Daniel Nelson cc9a8cd1c6
Remove non-existent field from net_response readme 2019-12-03 14:57:40 -08:00
Daniel Nelson 1f7b68a2b2
Allow colons in the prometheus metric name (#6751) 2019-12-03 13:34:00 -08:00
Daniel Nelson 09f9b70354
Update changelog 2019-12-03 12:52:32 -08:00
Daniel Nelson 5d502bb605
Update sample config 2019-12-03 12:45:53 -08:00
Daniel Nelson 317c823bfc
Set message timestamp to the metric time in kafka output (#6746) 2019-12-03 11:48:53 -08:00
Daniel Nelson cdb00d6fe7
Add base64decode operation to string processor (#6740) 2019-12-03 11:48:02 -08:00
Daniel Nelson add8332990
Accept any media type in the prometheus input (#6745) 2019-12-03 11:47:31 -08:00
Daniel Nelson 9814817f90
Update to gopsutil v2.19.11 (#6741) 2019-12-03 11:47:02 -08:00
Daniel Nelson 03de92b962
Remove trailing underscore trimming from json flattener (#6744) 2019-12-03 11:46:29 -08:00
Daniel Nelson 4feef67c21
Update changelog 2019-12-03 11:44:03 -08:00
Daniel Nelson 63b047c91a
Fix ping skips remaining hosts after dns lookup error (#6743) 2019-12-03 11:27:33 -08:00
Daniel Nelson cf78f4e11e
Log mongodb oplog auth errors at debug level (#6742) 2019-12-03 11:26:51 -08:00
Daniel Nelson 1b25a9c910
Remove debug print statement 2019-12-02 20:03:25 -08:00
Daniel Nelson 88ab29ed63
Update changelog 2019-12-02 16:31:36 -08:00
Benjamin Schweizer 6839e5573c Add new "systemd_units" input plugin (#4532) 2019-12-02 16:05:50 -08:00
Ross Lodge fd2e9889ac Add node type tag to mongodb input (#6731) 2019-12-02 11:19:14 -08:00
pertu 6175d17969 Add uptime_ns field to mongodb input (#6669) 2019-12-02 11:16:00 -08:00
Kevin Lin 906027c39b Support resolution of symlinks in filecount input (#6735) 2019-12-02 11:06:36 -08:00
Chris Goller 03a6910689 perf(inputs/influxdb_listener): benchmark serving writes (#6673)
* perf(inputs/influxdb_listener): benchmark serving writes

* chore(inputs/influxdb_listener): remove stray comment
2019-12-02 11:49:04 -07:00
Samantha Wang 3595cb8b72 Update Telegraf README.md (#6718) 2019-11-27 18:02:40 -08:00
Daniel Nelson 10dd367faa
Update changelog and dependency licences 2019-11-27 11:00:28 -08:00
Enno Lohmeier e04bb1e07f Support partition assignement strategy configuration in kafka_consumer (#6688) 2019-11-27 10:54:29 -08:00
Daniel Nelson c58f0debb1
Update changelog 2019-11-26 17:32:37 -08:00
Daniel Nelson 10db774db3
Add prometheus round trip unit tests (#6720) 2019-11-26 17:31:36 -08:00
Daniel Nelson 80c5edd48e
Add prometheus serializer and use it in prometheus output (#6703) 2019-11-26 15:46:31 -08:00
Eric Kincl 8f71bbaa48 Add link to VMWare vCenter Converter API Reference (#6719) 2019-11-26 15:36:53 -08:00
Daniel Nelson a1424d78ba
Update changelog 2019-11-26 10:06:32 -08:00
Yong Wen Chua 6eb21978e6 Add additional tags for x509 Input Plugin (#6686) 2019-11-26 10:04:55 -08:00
Samantha Wang e061376846
docs(readme): Update to Amazon ECS
Update ECS to amazon ECS
2019-11-26 08:54:39 -08:00
Daniel Nelson b8d3f896ce
Update changelog 2019-11-25 15:39:36 -08:00
Jonathan Negrin c53d53826d Allow multiple certificates per file in x509_cert input (#6695) 2019-11-25 15:38:57 -08:00
Daniel Nelson c16b760a26
Update changelog 2019-11-25 15:36:12 -08:00
Daniel Nelson cbe7d33bd4
Add SReclaimable and SUnreclaim to mem input (#6716) 2019-11-25 15:31:22 -08:00
Daniel Nelson 6d94798fd6
Update changelog and readme 2019-11-25 11:58:19 -08:00
reimda cec1bdce90 Add snmp_trap input plugin (#6629) 2019-11-25 11:56:21 -08:00
Marc Ruiz 4e8aa8ad1b Fix README.md and improve example config description (#6707) 2019-11-22 10:32:39 -08:00
Daniel Nelson c3e3236bab
Update changelog 2019-11-21 18:39:22 -08:00
Marc Ruiz c7af10b159 Add high resolution metrics support to CloudWatch output (#6689) 2019-11-21 18:37:33 -08:00
Daniel Nelson a193f527f0
Update changelog 2019-11-21 18:13:44 -08:00
Nick Neisen 32d1e71a7e Add decoding and tests to socket_listener (#6660) 2019-11-21 18:11:17 -08:00
Daniel Nelson a000ad3553
Update changelog and readme 2019-11-21 11:33:47 -08:00
Remi Frenay 23b6deee22 Add synproxy input plugin (#5683) 2019-11-21 11:26:59 -08:00
Adrián López acfdc5576c Add clone processor to all.go (#6697) 2019-11-21 10:36:48 -08:00
Daniel Nelson f800d91dc8
Update changelog 2019-11-21 00:09:27 -08:00
Vishwanath 12ecdaba5b Add prometheus metric_version = 2 and url tag configurable (#5767) 2019-11-20 20:53:57 -08:00
David Reimschussel c12a403042 Update changelog 2019-11-20 13:33:11 -07:00
Daniel Nelson 8e0eb5a7db Add support for sending HTTP Basic Auth in influxdb input (#6668) 2019-11-20 13:20:48 -07:00
Daniel Nelson 70ff63060a
Set 1.12.6 release date 2019-11-19 12:32:03 -08:00
Daniel Nelson 16decd5f50
Update changelog 2019-11-19 12:28:07 -08:00
alan7yg a66b6729e9 Fix panic in mongodb input if ShardStats is nil (#6680) 2019-11-19 10:52:48 -08:00
Daniel Nelson 7ff6ec1963
Update changelog 2019-11-18 12:39:43 -08:00
Lance O'Connor bc8769ba24 Add Splunk MultiMetric support (#6640) 2019-11-18 12:38:34 -08:00
Daniel Nelson 169ba2ecc4
Update changelog 2019-11-18 10:28:27 -08:00
Daniel Nelson 9f05163c53
Fix interface option with method = native in ping input (#6667) 2019-11-18 10:27:31 -08:00
Daniel Nelson e8d6d445f4
Update changelog 2019-11-18 10:25:15 -08:00
Daniel Nelson 1700cfb1c7
Use nanosecond precision in docker_log input (#6663) 2019-11-18 10:24:22 -08:00
Daniel Nelson a9ec5fc209
Update changelog 2019-11-15 18:55:55 -08:00
Daniel Nelson 7a90ddd1b8
Log no metrics found at debug level in cloudwatch input (#6665) 2019-11-15 18:52:55 -08:00
Daniel Nelson 122ec0fa39
Build the nats input on freebsd when cgo is enabled (#6658) 2019-11-13 14:45:56 -08:00
Nick Neisen 0c918b099b Add source and port tags to jenkins plugin (#6641) 2019-11-13 13:38:33 -08:00
dbaltor 48c271640c Upgrade Azure/go-autorest to 13.0.0 (#6656) 2019-11-13 13:37:05 -08:00
Daniel Nelson 9211ec633e
Update changelog 2019-11-13 13:01:25 -08:00
Nick Neisen 20bb673a0e Add a nameable file tag to file input plugin (#6650) 2019-11-13 13:00:41 -08:00
Daniel Nelson 4f4063ba01
Update changelog 2019-11-13 12:58:51 -08:00
陈方舟 fa2f0fff4e Fix influxdb output serialization on connection closed (#6621) 2019-11-13 12:56:01 -08:00
Daniel Nelson 9a2b3bc917
Update changelog 2019-11-12 16:45:03 -08:00
dbutler-starry 2156a6242e Add support for per output flush jitter (#6603) 2019-11-12 16:43:39 -08:00
Daniel Nelson 2a8735d1c6
Add missing testdata directory 2019-11-12 16:41:46 -08:00
Daniel Nelson a686645bf3
Update changelog 2019-11-12 16:40:39 -08:00
Daniel Nelson b71a387ca2
Add additional nvidia-smi examples as testcases 2019-11-12 16:13:58 -08:00
Greg 2cf5116d14 Update nvidia-smi input to use xml (#6639) 2019-11-12 16:12:15 -08:00
Daniel Nelson 55b78a5f66
Fix spelling mistake in mqtt_consumer docs 2019-11-12 14:11:42 -08:00
Daniel Nelson 898c20c01e
Don't log if no error in mongodb input 2019-11-12 13:44:57 -08:00
Daniel Nelson 7717375bc9
Set 1.12.5 release date in changelog 2019-11-12 12:28:41 -08:00
Daniel Nelson f41fbef182
Update changelog 2019-11-12 12:08:54 -08:00
Daniel Nelson bcf1bcf318
Fix metric creation when node is offline in jenkins input (#6627) 2019-11-12 11:59:11 -08:00
Daniel Nelson ce3ae58ad9
Fix uptime_ns calculation when container has been restarted (#6649) 2019-11-12 11:58:13 -08:00
Daniel Nelson d858d82a85
Fix known mysql type conversion issues (#6647) 2019-11-12 11:55:53 -08:00
Daniel Nelson eb93dab70b
Update changelog 2019-11-12 11:50:36 -08:00
pertu e2fde882c7 Fix mongodb total_created field naming (#6643) 2019-11-12 11:45:09 -08:00
Daniel Nelson 8cba5941be
Skip logging when logfile is unset (#6648) 2019-11-11 17:03:03 -08:00
Daniel Nelson 58df6f6c94
Update changelog 2019-11-08 12:13:34 -08:00
Lyle Hanson 4d08f2f404 Use 1h or 3h rain values as appropriate (#6593) 2019-11-08 12:10:16 -08:00
Daniel Nelson 6fd1453942
Update changelog 2019-11-08 12:02:17 -08:00
Phil Preston d9ddd95b3c Add ethtool input plugin (#5865) 2019-11-08 11:55:37 -08:00
Daniel Nelson 6cbaf890d9
Use github.com/gofrs/uuid 2.1.0 (#6636) 2019-11-07 17:39:19 -08:00
Daniel Nelson 6014a26467
Use latest golang.org/x/crypto (#6635) 2019-11-07 17:23:42 -08:00
Daniel Nelson e33766cc0d
Update changelog 2019-11-07 16:31:17 -08:00
Daniel Nelson 0e6500669a
Add missing ServerProperties query to sqlserver input docs (#6625) 2019-11-07 16:29:45 -08:00
Daniel Nelson 74a8ebda9e
Use github.com/miekg/dns 1.0.10 (#6632) 2019-11-07 15:12:53 -08:00
Daniel Nelson 23c43fc310
Use gopkg.in/ldap.v3 3.1.0 (#6567) 2019-11-07 11:07:45 -08:00
Daniel Nelson 80e93af25b
Add gomock to dependency licenses 2019-11-07 11:00:31 -08:00
Daniel Nelson b98f4dc97b
Update changelog 2019-11-07 10:57:32 -08:00
Felix Maurer 378c570c06 Add support for SNMP over TCP (#5870) 2019-11-07 10:56:51 -08:00
Daniel Nelson b4a712969e
Update changelog 2019-11-06 17:33:53 -08:00
Nick Neisen 8d52f5a4b2 Change no metric error message to debug level (#6630) 2019-11-06 17:32:56 -08:00
Daniel Nelson e4170339b1
Document alias option on output, processor, aggregator plugins 2019-11-06 16:05:11 -08:00
Daniel Nelson 803e1a48aa
Update changelog 2019-11-06 13:39:09 -08:00
David McKay 284c7fc404 Add bearer token defaults for Kubernetes plugins (#6356) 2019-11-06 13:37:48 -08:00
The Dale 6881c64431 Add punctuation to CONFIGURATION.md (#6600) 2019-11-05 15:50:07 -08:00
Daniel Nelson dd258e6782
Update changelog 2019-11-05 11:58:10 -08:00
Giovanni Luisotto ba579819a0 Add missing character replacement to sql_instance tag (#6610) 2019-11-05 11:56:48 -08:00
Daniel Nelson 042fa53db8
Update changelog 2019-11-05 10:37:00 -08:00
Greg f0a578492a Fix incorrect results in ping plugin (#6581) 2019-11-05 10:34:18 -08:00
Scott Anderson 9efc37606f Add descriptions for kapacitor input metrics (#6505) 2019-10-24 16:45:59 -07:00
Daniel Nelson 2754a484f9
Document memory_usage field in procstat input 2019-10-24 11:13:52 -07:00
Daniel Nelson 8461631703
Update changelog 2019-10-23 17:27:28 -07:00
Daniel Nelson 3770923ce3
Update rabbitmq input readme 2019-10-23 17:26:31 -07:00
Jacques Heunis 8b3a8d1113 Add gathering of RabbitMQ federation link metrics (#6283) 2019-10-23 17:08:19 -07:00
Daniel Nelson 1761e25c96
Update changelog 2019-10-23 15:37:29 -07:00
David McKay 47a708ec99 Remove usage of deprecated v1beta API endpoints (#6543) 2019-10-23 15:35:37 -07:00
Daniel Nelson 988e036641
Update changelog 2019-10-23 14:09:28 -07:00
David McKay a9a0d4048a Add strict mode to JSON parser (#6536) 2019-10-23 14:06:39 -07:00
Daniel Nelson 41d6a1a787
Set 1.12.4 release date in changelog 2019-10-23 12:57:11 -07:00
Daniel Nelson e3839697b1
Update changelog 2019-10-23 12:52:23 -07:00
Daniel Nelson 504ccc25a7
Fix powerdns_recursor socket_mode option (#6572) 2019-10-23 12:50:54 -07:00
Daniel Nelson 44ab9b44f8
Update changelog 2019-10-23 12:42:42 -07:00
Daniel Nelson 2397c53d7d
Exclude alias tag if unset from plugin internal stats (#6571) 2019-10-23 12:40:31 -07:00
Daniel Nelson 5a6fe149f6
Update changelog 2019-10-22 16:50:04 -07:00
Greg c1521b5f68 Ensure metrics generated are correct in ping plugin using "native" (#6563) 2019-10-22 16:46:57 -07:00
Daniel Nelson b46bb222c4
Update godirwalk version (#6557)
Version 1.10 and later support Solaris
2019-10-22 13:32:58 -07:00
Daniel Nelson b3f20f69f5
Default logtarget to file for backwards compatibility (#6555) 2019-10-22 13:32:03 -07:00
Daniel Nelson d8c8458e1e
Update changelog 2019-10-22 13:18:27 -07:00
Daniel Nelson d2f3215890
Build with Go 1.13.3 and 1.12.12 (#6565) 2019-10-22 13:18:02 -07:00
Daniel Nelson 82a8057dc1
Update changelog 2019-10-21 21:30:18 -07:00
Daniel Nelson 17c4e0b06f
Improve ipvs input error strings and logging (#6530) 2019-10-21 21:27:05 -07:00
Daniel Nelson 82ba2cd52a
Update changelog 2019-10-21 21:24:52 -07:00
Daniel Nelson acdfa1be07
Show default settings in mysql sample config (#6484) 2019-10-21 21:22:53 -07:00
Daniel Nelson 592ca4ebde
Update GitHub bug issue template (#6554) 2019-10-21 14:46:19 -07:00
Daniel Nelson a5ec0b1d16
Update changelog 2019-10-21 14:24:33 -07:00
Dheeraj Dwivedi a01d273c45 Support custom success codes in http input (#6549) 2019-10-21 14:23:36 -07:00
Daniel Nelson 3802c8b8cb
Update changelog 2019-10-21 14:19:51 -07:00
Greg 8ec79513b6 Add timeout option to cloudwatch input (#6553) 2019-10-21 14:18:55 -07:00
Daniel Nelson e5baf7de89
Update changelog 2019-10-21 12:12:41 -07:00
David McKay a1bcc0f87b Log file not found errors at debug level in tail input (#6540) 2019-10-21 12:10:56 -07:00
Sebastian Thörn f22947ee42 Fix link to zookeeper documentation (#6551) 2019-10-21 12:06:19 -07:00
Daniel Nelson d64f1d2a51
Update changelog 2019-10-21 12:03:30 -07:00
Adrián López 89c4c1d024 Add clone processor (#6529) 2019-10-21 11:59:32 -07:00
Daniel Nelson 59adbe8b39
Update changelog 2019-10-18 12:52:53 -07:00
reimda 00962783f8
Add lang parameter to OpenWeathermap input plugin (#6504) 2019-10-18 13:48:23 -06:00
pierwill c8f4215ac5 Document data types should be specified in column order (#6526) 2019-10-14 15:29:41 -07:00
Daniel Nelson b990901110
Revert "Add CLA check GitHub action (#6479)"
This reverts commit 8eb8643a3a.
2019-10-14 15:08:22 -07:00
Daniel Nelson b5182f4f9a
Update changelog 2019-10-07 22:06:43 -07:00
Daniel Nelson 5bd5cdc6d7
Build official packages with Go 1.13.1 (#6462) 2019-10-07 21:08:28 -07:00
Richard Wise da17d6569d Clarify behaviour of enum processor without default or defined mapping (#6301) 2019-10-07 18:08:35 -07:00
Daniel Nelson c67674eff3
Update changelog 2019-10-07 17:29:55 -07:00
Randy Coburn a5294fde32 Add container id as optional source tag to docker and docker_log input (#6473) 2019-10-07 17:27:32 -07:00
Daniel Nelson e7cf8319b0
Set 1.12.3 release date 2019-10-07 12:31:43 -07:00
Daniel Nelson 6c4cce1705
Update changelog 2019-10-07 12:20:36 -07:00
Daniel Nelson 74c7dd3ce7
Fix logger initialization in exec input (#6492) 2019-10-07 12:18:36 -07:00
Daniel Nelson d7988915e9
Update changelog 2019-10-07 12:17:33 -07:00
Daniel Nelson 47fd285b4a
Fix database routing on retry with exclude_database_tag (#6486) 2019-10-07 12:13:39 -07:00
Daniel Nelson d71c8ed3b9
Update changelog 2019-10-04 17:39:55 -07:00
Rajiv Kushwaha b9a4ef7484 Add millisecond unix time support to grok parser (#6476) 2019-10-04 17:38:48 -07:00
Daniel Nelson ddd79762ac
Update changelog 2019-10-04 17:08:58 -07:00
GeorgeJahad c26aeb871d Remove package level vars from sqlserver and mysql input plugins (#6468) 2019-10-04 12:18:34 -07:00
George 8eb8643a3a Add CLA check GitHub action (#6479) 2019-10-04 11:30:43 -07:00
Daniel Nelson e41d90080a
Update changelog 2019-09-30 16:56:58 -07:00
David McKay 367dee791a Add auth header only when env var is set (#6469) 2019-09-30 16:55:47 -07:00
Daniel Nelson d75b5e5e10
Update changelog 2019-09-30 16:51:31 -07:00
Mark Wilkinson - m82labs 68d11e01ab Add more performance counter metrics to sqlserver input (#6465) 2019-09-30 16:50:33 -07:00
Daniel Nelson 07faceadd5
Update changelog 2019-09-30 10:44:12 -07:00
Daniel Nelson 9867fe3279
Add test case for smart serial number 2019-09-30 10:42:47 -07:00
Gregory Brzeski fc1b1e8d20 Use case insensitive serial numer match in smart input (#6464) 2019-09-30 10:41:25 -07:00
Daniel Nelson 518c09a9f6
Update changelog 2019-09-27 16:47:27 -07:00
Daniel Nelson 01e9484881
Use Go 1.12.10 for builds (#6455) 2019-09-27 16:44:54 -07:00
Daniel Nelson 31d8d2baa7
Update changelog 2019-09-26 17:12:20 -07:00
Daniel Nelson fc6fb33067
Add merge aggregator (#6410) 2019-09-26 17:09:44 -07:00
Daniel Nelson 86539515b8
Update changelog 2019-09-26 16:17:25 -07:00
Randy Coburn 62c6e30a78 Use batch serialization format in exec output (#6446) 2019-09-26 16:14:54 -07:00
Daniel Nelson aef93fd1c6
Set release date for 1.12.2 2019-09-24 13:54:28 -07:00
Daniel Nelson 3cf5b86aee
Use new log style in cisco_telemetry_gnmi 2019-09-24 11:17:43 -07:00
Daniel Nelson 54b83361e8
Update changelog 2019-09-24 11:09:25 -07:00
Steven Barth 00d9b84234 Fix path handling issues in cisco_telemetry_gnmi (#6403)
- Avoid crashing when a field has no value or one of deprecated type
- Emit measurement names correctly for replies with empty origin
- Skip paths with empty names instead of adding a '/'
2019-09-24 11:05:56 -07:00
Greg 817c9a69a9 Document and add support to input plugins for logging alias (#6357) 2019-09-23 15:39:50 -07:00
Daniel Nelson e42d2e39c6
Update changelog 2019-09-23 10:28:21 -07:00
Kai Groner f080b58834 Use prefix base detection for ints in grok parser (#6434) 2019-09-23 10:26:17 -07:00
Daniel Nelson 24d5a93e63
Add example URL for cloud2 to influxdb_v2 output 2019-09-23 10:02:19 -07:00
Daniel Nelson 2de217fb4c
Update changelog 2019-09-20 16:52:00 -07:00
Daniel Nelson 776e92ffab
Require goplugin build flag to enable go plugin support (#6393) 2019-09-20 16:50:19 -07:00
Daniel Nelson 46b89b379a
Update ping input readme (#6412) 2019-09-20 16:49:14 -07:00
Daniel Nelson cd1bb2bc23
Update suricata readme style 2019-09-20 15:44:55 -07:00
Daniel Nelson 84840d848c
Update changelog and link to readme to suricata 2019-09-20 15:38:39 -07:00
Sascha Steinbiss d2d6f1ab21 Add Suricata input plugin (#3145) 2019-09-20 15:35:21 -07:00
Daniel Nelson f669ef4452
Update changelog 2019-09-19 20:11:20 -07:00
Daniel Nelson 51a33acbb6
Update cpu docs to latest style (#6411) 2019-09-19 20:04:24 -07:00
Daniel Nelson 8d96dd71c7
Allow graphite parser to create Inf and NaN values (#6420) 2019-09-19 20:03:10 -07:00
GeorgeJahad e553341879 Update sqlserver docs for TLS connections (#6409) 2019-09-17 15:48:08 -07:00
David McKay a2c28f2762 Recommend installing TICK Stack with Helm Stable Charts (#6404) 2019-09-17 12:52:34 -07:00
Daniel Nelson fe616ed473
Update changelog 2019-09-16 16:58:09 -07:00
Steven Barth ee9d0fc493 Support NX-OS telemetry extensions in cisco_telemetry_mdt (#6177) 2019-09-16 16:57:25 -07:00
Daniel Nelson b5510eb128
Remove transitive dependency azure-pipeline-go from Gopkg.toml 2019-09-16 16:46:34 -07:00
Daniel Nelson 97328cf177
Use gopsutil 2.19.8 2019-09-16 16:45:55 -07:00
Daniel Nelson 8ed633bae5
Update changelog 2019-09-16 16:39:20 -07:00
Daniel Nelson 6dc61be6eb
Fix detection of layout timestamps (#6390) 2019-09-16 16:32:14 -07:00
Greg 7167a23c52 Update apcupsd library (#6401) 2019-09-16 16:31:37 -07:00
Greg df288a0bb4 Keep boolean when listed in json_string_fields (#6400) 2019-09-16 16:30:34 -07:00
Daniel Nelson acb6cd67be
Update changelog 2019-09-12 14:54:17 -07:00
Adam Flott 57f58fdbcc Add replication metrics to the redis input(#5921) 2019-09-12 14:52:03 -07:00
Daniel Nelson a3df39c91e
Update changelog 2019-09-12 13:39:25 -07:00
Boris Popovschi d717e8ea03 Add ability to read query from file to postgresql_extensible input (#6361) 2019-09-12 13:38:35 -07:00
Daniel Nelson bae12dde1e
Set 1.12.1 release date 2019-09-10 12:05:36 -07:00
Daniel Nelson f4cad12dcb
Update changelog 2019-09-10 11:55:42 -07:00
Daniel Nelson 59c43b644f
Fix apcupsd documentation to reflect actual plugin (#6377) 2019-09-10 11:51:34 -07:00
Greg 88b60a2e9b Return error rather than default a retry value (#6376) 2019-09-10 11:46:46 -07:00
Daniel Nelson d7c85768a4
Update changelog 2019-09-10 11:07:13 -07:00
Daniel Nelson 15dd43344d
Fix error reading closed response body on redirect (#6372) 2019-09-10 11:04:24 -07:00
Russ Savage cd99ceea62 Fixing spelling in bug template (#6374) 2019-09-10 10:55:39 -07:00
Daniel Nelson 5dcd0daa42
Document the pros and cons of increasing the metric_buffer_limit 2019-09-09 17:50:46 -07:00
Daniel Nelson f041ace365
Update changelog 2019-09-09 15:58:20 -07:00
Daniel Nelson a4078da648
Skip collection stats when disabled in mongodb input (#6364) 2019-09-09 15:55:46 -07:00
Mitchell Bradd 23cddef30a Fix broken exec output link in README (#6371) 2019-09-09 10:23:44 -07:00
Daniel Nelson 9e5bd8cc15
Update changelog 2019-09-06 12:42:07 -07:00
Daniel Nelson 7ac5dc5416
Fix filecount for paths with trailing slash (#6332) 2019-09-06 12:38:20 -07:00
Daniel Nelson 7d2cffe056
Convert check state to an integer in icinga2 input (#6333) 2019-09-06 12:37:17 -07:00
Daniel Nelson 76e7b57fcd
Fix could not mark message delivered error in kafka_consumer (#6363) 2019-09-06 12:35:33 -07:00
Daniel Nelson be7c71a39b
Update changelog 2019-09-04 19:07:57 -07:00
Daniel Nelson 11d40a9f0a
Switch to fork of sarama without zstd dependency (#6349) 2019-09-04 19:05:39 -07:00
Daniel Nelson c8f8a42035
Set 1.12.0 release date 2019-09-03 11:17:34 -07:00
Daniel Nelson 9463b894f2
Fix links in changelog 2019-09-03 10:58:37 -07:00
Daniel Nelson e8a119b07b
Update changelog 2019-08-29 17:14:21 -07:00
paebersold 32de8bb459 Add per node memory stats to rabbitmq input (#6326) 2019-08-29 17:12:57 -07:00
Daniel Nelson 80f38ae352
Update readme and changelog 2019-08-29 16:32:43 -07:00
Mattias Jiderhamn 4f54b11973 Add azure_storage_queue input plugin (#5323) 2019-08-29 16:29:25 -07:00
Daniel Nelson 558c825478
Link to specific gjson version we are using 2019-08-28 18:11:38 -07:00
Vlasta Hajek 7ec54d4be9 Improve startup error reporting when ran as Windows service (#4291) 2019-08-28 14:34:44 -07:00
Daniel Nelson 8c6ddcd7fa
Add note about unix domain sockets to syslog input documentation 2019-08-28 12:23:49 -07:00
Daniel Nelson 82c729aba5
Set next version for builds 2019-08-27 14:05:48 -07:00
Daniel Nelson cb578e5790
Update changelog 2019-08-27 13:48:49 -07:00
Mattias Jiderhamn 08b903a646 Use environment variables to locate Program Files on Windows (#6317) 2019-08-27 13:47:01 -07:00
Daniel Nelson 9f612fd52d
Update sample configuration 2019-08-27 12:41:16 -07:00
Daniel Nelson ad49e311e4
Set 1.11.5 release date 2019-08-27 11:29:11 -07:00
Daniel Nelson 79c6179f31
Update changelog 2019-08-27 10:35:15 -07:00
Daniel Nelson 2d2e793c90
Query oplog only when connected to a replica set (#6307) 2019-08-27 10:31:42 -07:00
Daniel Nelson 701339b024
Update changelog 2019-08-26 19:04:59 -07:00
Jesse Hanley 17a79e2d6f Allow jobs with dashes in the name in lustre2 input (#6313) 2019-08-26 19:03:35 -07:00
Daniel Nelson acedbe0633
Promote the use of http as the scheme over tcp in health output (#6311) 2019-08-26 16:29:45 -07:00
Daniel Nelson 818d511749
Update changelog 2019-08-26 16:25:35 -07:00
Daniel Nelson e7b783d397
Remove leading slash from rcon commands (#6315)
This is required when using the Spigot Minecraft server and compatible
with the vanilla server.
2019-08-26 16:16:44 -07:00
Daniel Nelson 628edfa9b4
Add support for parked process state on Linux (#6308) 2019-08-26 16:05:56 -07:00
Daniel Nelson 718f60bb4a
Add table name to jenkins example configuration 2019-08-23 21:58:18 -07:00
Pontus Rydin d52c733c3b Add supported versions to vsphere README (#6312) 2019-08-23 21:55:56 -07:00
Daniel Nelson 66d6b1f1d3
Split out -w argument in iptables input (#6304) 2019-08-22 20:00:48 -07:00
Daniel Nelson 1848adaf79
Update to Go 1.12.9 and 1.11.13 (#6303) 2019-08-22 10:51:15 -07:00
Daniel Nelson b578586d4a
Send TERM to exec processes before sending KILL signal (#6302) 2019-08-22 10:50:02 -07:00
Daniel Nelson 0a4d74c827
Update changelog 2019-08-21 18:26:44 -07:00
Craig Hobbs f0c26dbd99 Add Marklogic Input Plugin (#6193) 2019-08-21 18:21:59 -07:00
Daniel Nelson 93b41457df
Update changelog 2019-08-21 18:17:41 -07:00
Daniel Nelson 94f68c06d7
Use alias name in output metric buffer stats 2019-08-21 18:06:04 -07:00
Daniel Nelson 3cdc6c32dd
Fix measurement name for write errors 2019-08-21 18:06:04 -07:00
Daniel Nelson 40bbd805b6
Add TLS support to nginx_plus, nginx_plus_api and nginx_vts (#6300) 2019-08-21 18:04:51 -07:00
Daniel Nelson 8b938f3bd4
Make review changes to logstash input (#6299) 2019-08-21 18:04:30 -07:00
Greg 5c8d0e3ac9 Add ability to label inputs for logging (#6207) 2019-08-21 16:49:07 -07:00
Greg bc52592c87 Document additional collected Kubernetes resources (#6297) 2019-08-21 16:39:57 -07:00
Dmitry Ilyin 02174031c8 Add logstash input plugin (#4910) 2019-08-21 16:34:28 -07:00
Daniel Nelson 8c2b3addd3
Fix parsing multiple metrics on the first line of tailed file (#6289) 2019-08-21 16:30:55 -07:00
Greg 10671d2641 Stop timer when command exits in WaitTimeout (#6296) 2019-08-21 11:13:38 -07:00
Daniel Nelson 139fcc5805
Update changelog and dependency licenses 2019-08-21 10:04:43 -07:00
Daniel Nelson ac66838f9f
Update win_perf_counters sample config (#6286)
Remove extra percent from win_perf_counters sample config and have it
mirror the config provided in the Windows package.
2019-08-20 17:12:21 -07:00
Greg d3cf7d669b Add apcupsd input plugin (#6226) 2019-08-20 17:10:25 -07:00
Greg 819bf8e99d Add exec output plugin (#6267) 2019-08-20 17:07:24 -07:00
Daniel Nelson 1ad10c8a52
Update changelog and tidy openntpd input 2019-08-20 15:29:31 -07:00
aromeyer 153dd585af Add openntpd input plugin (#3627) 2019-08-20 15:14:11 -07:00
Scott Anderson 7bbed9e2a3 Update logparser readme requirement to collect at least one field (#6288) 2019-08-20 14:44:16 -07:00
Daniel Nelson 54180dacb4
Add tag_limit to readme and changelog 2019-08-19 20:58:01 -07:00
memory 46b9000ef6 Add tag_limit processor (#6086) 2019-08-19 20:54:40 -07:00
Daniel Nelson edb05b58a0
Add multiple repository example to github input readme 2019-08-19 19:08:38 -07:00
Daniel Nelson 47a41071df
Update changelog 2019-08-19 19:07:10 -07:00
Daniel Nelson 92385a4630
Add topic_tag option to mqtt_consumer (#6266) 2019-08-19 19:05:22 -07:00
Daniel Nelson f45ba14f73
Update changelog 2019-08-19 18:18:31 -07:00
Pontus Rydin 8b2374143d Fix finder inconsistencies in vsphere input (#6245) 2019-08-19 18:17:27 -07:00
Daniel Nelson ef14131f1c
Alternate markdown list symbol 2019-08-19 18:09:21 -07:00
Russ Savage bdf08d9cf7 Add readme for rethinkdb input (#6211) 2019-08-19 18:08:46 -07:00
Russ Savage 065b92d490 Add readme for mailchimp input (#6210) 2019-08-19 17:55:35 -07:00
Daniel Nelson 3e4a917379
Update changelog 2019-08-19 17:43:41 -07:00
Daniel Nelson 328a2bf16f
Remove advanced TLS conf from prometheus output sample config 2019-08-19 17:42:41 -07:00
Daniel Nelson d5b41cfc9a
Update TLS documentation 2019-08-19 17:42:39 -07:00
Stanislav Putrya 149d221191 Add capability to limit TLS versions and cipher suites (#6246) 2019-08-19 16:01:01 -07:00
Daniel Nelson fbfaf767f1
Update changelog 2019-08-16 15:56:37 -07:00
Adam Flott 96fa7fa6d2 Add cmdstat metrics to redis input (#5926) 2019-08-16 15:46:48 -07:00
Pavel Frolov 50dc8d5659 Add content_length metric to http_response input plugin (#6261) 2019-08-16 15:45:20 -07:00
Randy Coburn beb788bfc6 Add database_tag option to influxdb_listener to add database from query string (#6257) 2019-08-16 15:05:08 -07:00
Daniel Nelson ed23466a53
Update changelog 2019-08-16 14:53:36 -07:00
Frank Riley a079e2d569 Return error status from --test if any of the input plugins produced an error (#6279) 2019-08-16 14:44:38 -07:00
Daniel Nelson 3ed25b1269
Update changelog 2019-08-16 14:41:15 -07:00
timhallinflux 73914ac920 Add security vulnerability reporting into to contributing doc (#6268) 2019-08-16 10:32:29 -07:00
Daniel Nelson 5e06e56785
Fix persistent session in mqtt_consumer (#6236) 2019-08-14 17:05:34 -07:00
Daniel Nelson ffe135c7fe
Update github.com/go-sql-driver/mysql to 1.4.1 (#6250) 2019-08-14 17:04:05 -07:00
Pontus Rydin 2755595019 Add support for custom attributes to vsphere input (#5971) 2019-08-14 17:03:33 -07:00
Daniel Nelson 5e0c63f2e6
Fix and improve error handling in mongodb collection stats (#6230) 2019-08-14 16:59:02 -07:00
Daniel Nelson 4ab29817a4
Add troubleshooting section to nvidia_smi input 2019-08-14 16:56:45 -07:00
Chris Goller 87d0e5c221 Update changelog 2019-08-14 16:20:59 -05:00
Chris Goller 71da67ec54
Add darwin (macOS) builds to the release (#6259)
This will build a darwin tar.gz package for macOS.  This allows people an easy way to download releases from github directly.
2019-08-14 16:04:57 -05:00
Matthew Crenshaw e36639b15d Add memory_usage field to procstat input plugin (#6249) 2019-08-14 10:17:38 -07:00
Marc Venturini 5473872ac1 Add configurable timeout setting to smart input (#6241) 2019-08-13 10:24:44 -07:00
Daniel Nelson 23b86552fd
Update changelog 2019-08-09 18:16:01 -07:00
Branden Rolston f5a4d72382 Collect framework_offers and allocator metrics in mesos input (#5719) 2019-08-09 17:27:59 -07:00
Daniel Nelson 337a579dd0
Move elasticsearch permission setup into new readme section 2019-08-09 17:23:08 -07:00
Théo 6512b7b7fb Document service account setup for the elasticsearch output (#6224) 2019-08-09 17:18:27 -07:00
Daniel Nelson 23cd2f058c
Document permission setup for powerdns_recursor (#6231) 2019-08-09 13:56:14 -07:00
Daniel Nelson 13c0ff0a7c
Limit number of processes in CircleCI
Hopefully this will reduce the amount of memory in use.
2019-08-08 17:38:03 -07:00
Adrián López eb8959272d Add telegraf and go version to the internal input plugin (#6216) 2019-08-08 10:51:03 -07:00
Daniel Nelson 17465b0aaf
Skip mongodb collection on error 2019-08-08 10:43:51 -07:00
Daniel Nelson f88004c62b
Ignore context cancelled error in docker_log (#6221) 2019-08-07 13:50:21 -07:00
Adrián López a3a6752f04 Update the number of logical CPUs dynamically in system plugin (#6214) 2019-08-06 15:55:06 -07:00
Daniel Nelson d7b69af9cd
Add 1.11.4 release date 2019-08-06 11:40:05 -07:00
Daniel Nelson 7a01b45e96
Update changelog 2019-08-06 11:36:46 -07:00
Matthew Crenshaw 60c8f382be Fix reload panic in socket_listener input plugin (#6218) 2019-08-06 11:29:29 -07:00
Daniel Nelson e65324d2c1
Update gopsutil (#6212) 2019-08-05 22:48:01 -07:00
Greg Taylor cd417c0479 Upgrade aws-go-sdk (#5945) 2019-08-05 21:03:03 -07:00
Daniel Nelson 493510a5f7
Update changelog 2019-08-05 17:37:56 -07:00
Marc Venturini 1c1c41c300 Add device tags to smart_attributes (#6201) 2019-08-05 17:36:34 -07:00
Daniel Nelson 61f6794846
Update changelog 2019-08-05 15:04:50 -07:00
Daniel Nelson b5710a6a21
Skip floats that are NaN or Inf in Datadog output. (#6198) 2019-08-05 14:50:29 -07:00
Daniel Nelson de6416ff82
Update changelog 2019-08-05 14:13:34 -07:00
Rob Cowart 6ecfd01f9b Correct typo in kubernetes logsfs_available_bytes field (#6200) 2019-08-05 14:04:41 -07:00
Russ Savage 374aa0b36b Add README for disque input (#6208) 2019-08-05 13:58:35 -07:00
Russ Savage 7e793e87e3 Clean up cassandra input README (#6206) 2019-08-05 13:57:15 -07:00
Daniel Nelson f2503722a0
Fix link in rabbitmq README 2019-08-05 13:56:03 -07:00
Daniel Nelson 8a8125692a
Update Windows changelog 2019-08-05 11:21:26 -07:00
Daniel Nelson 633dfe2a19
Add secure option to NATS output to mirror input 2019-08-02 16:58:04 -07:00
Daniel Nelson ffe9494663
Restore secure option to control tls in nats_consumer 2019-08-02 14:59:28 -07:00
Daniel Nelson be7abd9959
Update changelog 2019-08-02 14:46:20 -07:00
Mike Melnyk 0732b41b4b Add TLS & credentials configuration for nats_consumer input plugin (#6195) 2019-08-02 13:10:14 -07:00
shane 3c811c15b3 Add support for enterprise repos to github plugin (#6194) 2019-08-02 13:05:46 -07:00
dupondje 78d3b86581 Add Indices stats to elasticsearch input (#6060) 2019-08-02 12:42:25 -07:00
Daniel Nelson 364bf38b4a
Update fail2ban readme 2019-08-02 12:35:43 -07:00
Russ Savage 1557e9094d Update smart input docs for attributes clarity (#6192) 2019-08-02 10:48:40 -07:00
Greg 004b2cf578 Add intermediates when verifying cert in x509 input (#6159) 2019-07-31 16:59:54 -07:00
Russ Savage ef4f4eed3a Add left function to string processor (#6189) 2019-07-31 16:55:25 -07:00
Daniel Nelson 28f1bdb696
Add note to configuration about when log rotation occurs 2019-07-31 13:30:30 -07:00
pberlowski dc292b73a9 Add grace period for metrics late for aggregation (#6049) 2019-07-31 12:52:12 -07:00
Moritz Maisel 282c8ce096 Add diff and non_negative_diff to basicstats aggregator (#4435) 2019-07-30 23:50:49 -07:00
Daniel Nelson df90230341
Update changelog 2019-07-30 22:39:07 -07:00
Thierry Sallé ef9a1c0d5b Gather per collections stats in mongodb input plugin (#6137) 2019-07-30 21:36:19 -07:00
Daniel Nelson 9bdb3992d5
Require Kafka 0.10.2.0 or later in kafka_consumer (#6181) 2019-07-30 21:33:29 -07:00
Greg 51c1659de8 Add uWSGI input plugin (#6179) 2019-07-30 16:31:03 -07:00
Greg a1bff8f550 Add ability to exclude db/bucket tag from influxdb outputs (#6184) 2019-07-30 14:16:51 -07:00
Daniel Nelson 3f63c14179
Setup default logging before logging. 2019-07-29 21:47:49 -07:00
Preston Carpenter 5c7c9e40ee Load external go plugins (#6024) 2019-07-29 21:34:03 -07:00
Daniel Nelson aea09b3a20
Use sarama built in support for consumer groups (#6172) 2019-07-29 20:41:12 -07:00
Greg 4d73290e13 Update links in fluentd input readme (#6175) 2019-07-26 15:01:17 -07:00
Daniel Nelson a941779ea8
Call Init before Start in test mode (#6171) 2019-07-25 17:36:46 -07:00
Daniel Nelson 785b76d3d1
Update sample config 2019-07-25 17:15:32 -07:00
Daniel Nelson 7625b6f089
Update changelog 2019-07-24 14:05:04 -07:00
Daniel Nelson 4f115437e6
Use Go style conventions for variable name 2019-07-24 14:04:51 -07:00
Mika Eloranta 417740738d Support percentage value parsing in redis input (#6163) 2019-07-24 13:52:44 -07:00
Daniel Nelson 9fc8976c66
Correct error message when converting to a float 2019-07-23 17:00:08 -07:00
Greg 4e59d51844 Add networks, subscribers, and watchers to github input (#6161) 2019-07-23 16:04:51 -07:00
George eb0f493998 Add Start() function to DockerLogs input plugin (#6157) 2019-07-23 16:00:07 -07:00
Daniel Nelson ac10714332
Add Linux mips build (#6153) 2019-07-23 13:20:39 -07:00
Daniel Nelson aec231fbed
Set 1.11.3 release date 2019-07-23 10:43:39 -07:00
Daniel Nelson b9cb606ca0
Update changelog 2019-07-22 16:34:41 -07:00
Greg afe86c0f46 Avoid panic in github input (#6152) 2019-07-22 16:30:53 -07:00
Greg 3e50db904a Add certificate verification status to x509_cert input (#6143) 2019-07-22 16:10:40 -07:00
Daniel Nelson 92cabcd323
Add fireboard to top level README 2019-07-22 15:37:52 -07:00
Daniel Nelson d364abf870
Update changelog 2019-07-22 15:20:25 -07:00
Lance O'Connor e098758d78 Add Fireboard Input Plugin (#6052) 2019-07-22 15:11:34 -07:00
denzilribeiro 109d1e1e15 Add support for collecting SQL Requests to identify waits and blocking (#6144) 2019-07-22 15:04:15 -07:00
Greg 6f2e57ad64 Update paho.mqtt.golang (#6149) 2019-07-22 14:14:23 -07:00
Greg 877c42362d Collect k8s endpoints, ingress, and services in kube_inventory plugin (#6105) 2019-07-19 13:18:50 -07:00
Greg bdb4598b3f Add support for field/tag keys to strings processor (#6129) 2019-07-19 13:16:54 -07:00
George 77b1a43539 Fix template pattern partial wildcard matching (#6135) 2019-07-19 13:14:15 -07:00
George MacRorie 5c9923a20a Update changelog 2019-07-18 15:42:06 +02:00
George 56c6539a91
Fix lustre2 input plugin config parse regression (#6114) 2019-07-18 15:40:05 +02:00
Daniel Nelson f93441d2a4
Update changelog 2019-07-17 15:23:51 -07:00
Daniel Nelson e576048e02
Treat empty array as successful parse (#6130) 2019-07-17 15:03:09 -07:00
Daniel Nelson a07f29c02f
Add missing rcode and zonestat to bind input (#6123) 2019-07-17 14:31:57 -07:00
Daniel Nelson 35d689401d
Update changelog 2019-07-15 18:28:54 -07:00
Cristofer Gonzales b15fe4a28e Initialize accumulator in statsd during Start (#6121) 2019-07-15 18:23:56 -07:00
kden416 169fd64788 Add list of possible container states to docker docs (#6099) 2019-07-15 17:10:42 -07:00
Daniel Nelson f22f12c99e
Update changelog 2019-07-15 17:08:11 -07:00
Daniel Nelson 41176dd1f1
Support string field glob matching in json parser (#6102) 2019-07-15 16:48:19 -07:00
Daniel Nelson 96530c220f
Compile against gjson 1.3.0 (#6101) 2019-07-15 16:45:25 -07:00
Greg 66beeb6523 Add basic auth support to elasticsearch input (#6122) 2019-07-15 16:41:29 -07:00
denzilribeiro 329179c0ff Fix sql_instance tag with sqlserver managed instance (#6116) 2019-07-15 11:46:52 -07:00
George 3f424b88c9
Add docker_devicemapper measurement to docker input plugin (#6084) 2019-07-15 10:24:47 +01:00
Daniel Nelson 93584f7ce7
Update go-mssqldb version to latest (#6100) 2019-07-12 16:12:30 -07:00
Daniel Nelson ad4edf4a12
Update changelog 2019-07-12 14:28:50 -07:00
George 43c16aa898 Add extra attributes for NVMe devices to smart input (#6079) 2019-07-12 14:25:45 -07:00
Daniel Nelson e5158107c1
Update changelog 2019-07-12 11:41:05 -07:00
denzilribeiro 149be55c64 Add improved support for Azure SQL Database (#6111) 2019-07-12 11:37:00 -07:00
Daniel Nelson 55c9da028c
Update changelog 2019-07-11 17:44:24 -07:00
Matthew Crenshaw 981dd5bfc0 Resume from last known offset when reloading in tail input (#6074) 2019-07-11 17:39:59 -07:00
Daniel Nelson a0fec3cd82
Update changelog 2019-07-11 15:09:31 -07:00
Greg ea6b398fa3 Add native Go ping method to ping input plugin (#6050) 2019-07-11 15:07:58 -07:00
Daniel Nelson c9107015b0
Emit sarama library log messages at debug level (#6091) 2019-07-11 13:50:12 -07:00
Daniel Nelson 1f3951d36f
Update changelog 2019-07-09 16:52:13 -07:00
Pitxyoki 72c2ac9648 Support floats in statsd percentiles (#5572) 2019-07-09 16:50:20 -07:00
Daniel Nelson 70e2ccce75
Update changelog 2019-07-09 15:45:59 -07:00
Aaron Wood aa07b95e00 Handle unknown error in nvidia-smi output (#6073) 2019-07-09 15:45:02 -07:00
Daniel Nelson 1e12006ad6
Update changelog 2019-07-09 15:27:43 -07:00
Pontus Rydin 10c31ca209 Fix reconnection when vCenter is rebooted (#6085) 2019-07-09 15:25:53 -07:00
Daniel Nelson f46a9c02c6
Set 1.11.2 release date 2019-07-09 11:10:02 -07:00
Daniel Nelson adec1eba0c
Update changelog 2019-07-09 10:52:12 -07:00
Daniel Nelson 130c5c5f12
Fix https support in activemq input (#6092) 2019-07-09 10:40:14 -07:00
Daniel Nelson 601f499126
Remove tail cleanup call to avoid double decrement (#6089) 2019-07-08 14:48:47 -07:00
Daniel Nelson c5d8e63a0f
Fix path separator matching in filecount input (#6077) 2019-07-08 14:46:00 -07:00
Daniel Nelson 5dea2175d2
Fix panic with empty datadog tag string (#6088) 2019-07-08 14:44:36 -07:00
Alvaro Olmedo Rodriguez 04937d0498 Apply topic filter to partitions metrics in burrow input (#6070) 2019-07-05 12:03:52 -07:00
Daniel Nelson 370d54b023
Update changelog 2019-07-03 16:37:45 -07:00
Daniel Nelson ad5d5844c7
Use int64 for fields in bind plugin (#6063) 2019-07-03 16:28:11 -07:00
dupondje 9af39bbb7d Add node roles tag to elasticsearch input (#6064) 2019-07-03 13:04:07 -07:00
Greg f7e85ebac2 Add basic auth to prometheus input plugin (#6062) 2019-07-02 11:14:48 -07:00
Leandro Piccilli 5bad2c3a43 Add support for ES 7.x to elasticsearch output (#6053) 2019-07-01 16:22:17 -07:00
David Wahlund 234a946093 Fix source address ping flag on BSD (#6056) 2019-07-01 15:14:03 -07:00
Daniel Nelson fae63ed297
Clarify that cisco mdt telemetry tcp transport does not support TLS 2019-07-01 12:14:30 -07:00
Daniel Nelson 1fe7301b95
Update changelog 2019-06-25 17:30:27 -07:00
Daniel Nelson 123e29c1f4
Update elasticsearch input README 2019-06-25 17:28:47 -07:00
dupondje 83c8d7be2a Fix master check and move cluster health indices to separate measurement (#6004) 2019-06-25 16:16:15 -07:00
Daniel Nelson 26ee42ce8d
Set release date for 1.11.1 2019-06-25 13:01:07 -07:00
Daniel Nelson f557af3077
Update changelog 2019-06-25 12:48:16 -07:00
John Seekins cb261be903 Fix typo in cassandra jolokia example config (#6044) 2019-06-25 12:06:27 -07:00
Daniel Nelson a231b3e79d
Fix parsing of remote tcp address in statsd input (#6031) 2019-06-25 12:04:39 -07:00
Daniel Nelson e8a596858c
Add device, serial_no, and wwn tags to synthetic attributes (#6040) 2019-06-25 11:51:51 -07:00
Daniel Nelson e1cfc9f3a0
Update changelog 2019-06-24 18:55:30 -07:00
Tim Ehlers a5c94db625 Ignore error when utmp is missing (#5742) 2019-06-24 18:48:07 -07:00
Nic Grobler bd9ddd8cb1 Fix filecount plugin size tests (#6038) 2019-06-24 11:03:05 -07:00
Daniel Nelson aa84011dc3
Remove flaky test for udp_listener 2019-06-21 18:39:00 -07:00
Daniel Nelson f405bca034
Fix docker input unit tests 2019-06-21 14:45:56 -07:00
Daniel Nelson 791d154ec1
Update changelog 2019-06-21 12:31:19 -07:00
Daniel Nelson 1dc3028237
Add struct tags for jti_openconfig_telemetry plugin 2019-06-21 12:29:34 -07:00
Mike Moein 131f85db73 Add TLS mutual auth supoort to jti_openconfig_telemetry plugin (#6027) 2019-06-21 12:25:45 -07:00
Daniel Nelson 773ed5e622
Update changelog 2019-06-21 12:21:49 -07:00
masuyama-ascade e6d71bdb65 Add container_id field to docker_container_status metrics (#6019) 2019-06-21 12:20:35 -07:00
Daniel Nelson 587dd149f3
Add troubleshooting section to smart input docs 2019-06-21 12:14:14 -07:00
Daniel Nelson 6738d566dd
Update permission configuration example in postfix input 2019-06-21 11:57:08 -07:00
Daniel Nelson beb6477080
Drop support for Go 1.9 (#6026) 2019-06-20 13:29:51 -07:00
Daniel Nelson 0a40f5d55b
Update changelog 2019-06-20 11:56:30 -07:00
Daniel Nelson a0c739eec7
Follow up work on docker_log input (#6008) 2019-06-20 11:54:12 -07:00
Daniel Nelson 29c3d42e7e
Fix double pct replacement in sysstat input (#6001) 2019-06-20 11:52:41 -07:00
Daniel Nelson 049d364917
Fix panic if pool_mode column does not exist (#6000) 2019-06-20 11:51:41 -07:00
Daniel Nelson 791ea5e38e
Update changelog 2019-06-19 18:04:05 -07:00
Chris Goller 80089c7caf Add better user-facing errors for API timeouts (#6016) 2019-06-19 18:02:51 -07:00
Daniel Nelson ba39d7b6a8
Update changelog 2019-06-19 15:39:11 -07:00
George c52e7d88d7 Add container uptime_ns in docker input plugin (#5996) 2019-06-19 15:37:10 -07:00
Daniel Nelson 2aeaed2f27
Update changelog and readme 2019-06-19 14:34:01 -07:00
Chris Goller 104db7c503 Skip 404 error reporting in nginx_plus_api input (#6015) 2019-06-19 14:28:00 -07:00
George 8d04cb76fd Add support for interface field in http_response input plugin (#6006) 2019-06-19 13:40:53 -07:00
prashanthjbabu f8bef14860 Add docker log plugin (#4773) 2019-06-18 15:56:55 -07:00
Daniel Nelson 9f3c1c6ec7
Fix http_listener_v2 tests 2019-06-17 16:20:09 -07:00
Daniel Nelson 4199114e4c
Update changelog and readme 2019-06-17 14:50:59 -07:00
Daniel Nelson 9b338410cb
Rename formdata parser to form_urlencoded 2019-06-17 14:50:58 -07:00
Boris Yonchev fd9abd2166 Add formdata parser (#5749) 2019-06-17 13:34:54 -07:00
Daniel Nelson 1da81799cb
Update changelog 2019-06-17 13:31:53 -07:00
dupondje 1775e1cdc6 Add cluster name tag to elasticsearch indices (#5998) 2019-06-17 13:31:15 -07:00
Daniel Nelson 22366f2a41
Update changelog 2019-06-17 12:56:58 -07:00
dupondje 31291f5590 Add starttime to php-fpm metrics (#5997) 2019-06-17 12:55:09 -07:00
Daniel Nelson 1dcfcdbad3
Update changelog and readme 2019-06-14 15:27:57 -07:00
Daniel Nelson 1ea7863b9b
Add pivot and unpivot processors (#5991) 2019-06-14 15:26:56 -07:00
Daniel Nelson 7f04511c30
Update changelog 2019-06-14 15:25:56 -07:00
Adrián López d3af8fd873 Allow regexp processor to mix different tags (#5863) 2019-06-14 15:23:54 -07:00
Daniel Nelson 0ff9c8ef88
Add call to optional Init function for all plugins (#5899) 2019-06-14 15:12:27 -07:00
Charlie Vieth b35beb2fba Reduce the cpu/memory used by the graphite parser (#5841) 2019-06-14 12:45:07 -07:00
Daniel Nelson 1f2cb85354
Update changelog and readme 2019-06-14 12:27:57 -07:00
Daniel Nelson a276ddfe97
Tidy date processor 2019-06-14 12:26:47 -07:00
Anaisdg 3e5cfad2b0 Add Date Processor Plugin (#5895) 2019-06-14 12:08:10 -07:00
Daniel Nelson de096428be
Run ServiceInputs during test mode; add --test-wait option (#5911) 2019-06-14 12:06:25 -07:00
Greg fec1b3ec19 Support array of addresses in http_response input (#5975) 2019-06-14 12:03:44 -07:00
Daniel Nelson bf03b43d2a
Update changelog 2019-06-14 12:01:17 -07:00
José Moreno Hanshing cc2f3b29e1 Don't consider pid of 0 when using systemd lookup in procstat (#5972) 2019-06-14 12:00:14 -07:00
Daniel Nelson d38f7600f8
Update changelog 2019-06-14 11:36:18 -07:00
Daniel Nelson 63916ae1cf
Add default url for http output (#5976) 2019-06-14 11:29:58 -07:00
Steven Barth 4cfd70b6c0 Omit keys when creating measurement names for GNMI telemetry (#5986) 2019-06-14 11:29:06 -07:00
Marc Venturini 4b6e791908 Fix sensor read error stops reporting of all sensors in temp input (#5941) 2019-06-14 11:27:24 -07:00
Daniel Nelson d260437318
Add example output from the collectd parser 2019-06-13 13:34:12 -07:00
Daniel Nelson 58e6eb6f07
Clarify replacement string behavior in regex processor 2019-06-13 13:34:12 -07:00
Daniel Nelson ae1aee3207
Update changelog 2019-06-13 13:34:12 -07:00
guitoulefoux 4b5df84b3d Fix subtable name in jolokia java.conf (#5985) 2019-06-13 03:48:06 -07:00
Charlie Vieth 1a647fb6ba Improve performance of wavefront serializer (#5842) 2019-06-12 11:59:51 -07:00
Daniel Nelson 1d682b847c
Update changelog 2019-06-12 11:11:04 -07:00
Daniel Nelson 8a34d2b27d
Fix setting mount_points option in disk input (#5982) 2019-06-12 10:52:04 -07:00
Daniel Nelson 5de7bdf906
Fix race condition in cisco telemetry tests (#5979) 2019-06-12 10:11:23 -07:00
Daniel Nelson 968714054a
Fix title in wavefront serializer readme 2019-06-11 13:06:55 -07:00
Daniel Nelson df8faab68b
Set Telegraf 1.11.0 release date 2019-06-11 11:18:08 -07:00
Daniel Nelson 07d3cd4ad7
Update release notes 2019-06-11 11:14:54 -07:00
Oleg Kovalov eeb036911f Compile regexp once in zookeeper input (#5969) 2019-06-07 12:25:55 -07:00
Oleg Kovalov d31f1735d9 Use fmt.Errorf for creating error with formatting (#5968) 2019-06-07 12:24:26 -07:00
Daniel Nelson f22e7a1465
Update next version for builds 2019-06-05 14:09:59 -07:00
Daniel Nelson 9e3f918db5
Update sample configurations 2019-06-05 14:07:30 -07:00
Daniel Nelson f2b3b35640
Print global_tags first in sample configuration 2019-06-05 14:07:02 -07:00
Daniel Nelson 4e147919d3
Update changelog 2019-06-05 13:59:10 -07:00
Daniel Nelson 0fb9040a64
Fix double close error with log rotation (#5960) 2019-06-05 13:55:21 -07:00
Daniel Nelson 7be74816a2
Add source tag to hddtemp plugin (#5955) 2019-06-05 12:47:17 -07:00
Daniel Nelson 77cac557ba
Log a warning on write if the metric buffer has overflowed (#5959) 2019-06-05 12:34:45 -07:00
Daniel Nelson 8bc768b239
Make case insensitive container status comparison (#5954) 2019-06-05 03:00:59 -07:00
Daniel Nelson ba0b0c02f7
Fix race conditions in gnmi telemetry tests (#5953) 2019-06-04 23:00:24 -07:00
Daniel Nelson 476f7fb9c5
Update changelog 2019-06-04 15:04:14 -07:00
Steven Barth e18393fabf Add Cisco model-driven telemetry & GNMI inputs (#5852) 2019-06-04 14:39:46 -07:00
Daniel Nelson 25471f6722
Update changelog 2019-06-03 17:38:31 -07:00
Daniel Nelson 6c3534a66e
Add support for remaining file rotation options (#5944) 2019-06-03 17:38:21 -07:00
Daniel Nelson 4197426a73
Ignore errors serializing single metrics (#5943) 2019-06-03 17:34:48 -07:00
Greg 3c83a53d51 Remove verbose debug logs from smart input (#5948) 2019-06-03 11:31:20 -07:00
Daniel Nelson 411f67d2b8
Update changelog 2019-06-01 17:57:11 -07:00
Kristoffer Berdal 1c0d3a0eb9 Add file rotation based on file age to file output plugin (#5547) 2019-06-01 17:11:47 -07:00
Daniel Nelson d0beb19204
Update changelog 2019-05-31 17:01:41 -07:00
Daniel Nelson 17d66b864c
Close idle connections in influxdb outputs when reloading (#5912) 2019-05-31 16:55:31 -07:00
Daniel Nelson 9cc3b3d234
Update changelog 2019-05-31 16:54:55 -07:00
Daniel Nelson 3d7a71889d
Ignore context canceled error when reloading/stopping agent 2019-05-31 16:50:44 -07:00
Daniel Nelson 0ca8ea1724
Don't overwrite forecast points (#5930) 2019-05-31 16:22:37 -07:00
Daniel Nelson a0213d9c4f
Update copyright date 2019-05-30 15:21:53 -07:00
Daniel Nelson 4ac2ef1c7f
Fix duplicate makefile target 2019-05-30 15:21:25 -07:00
Sebastien Leger 484122b7d4 Add open_weather_map input plugin (#5125) 2019-05-30 15:17:04 -07:00
Daniel Nelson 59d646a8e8
Test and build official packages with Go 1.12 (#5923) 2019-05-29 18:54:44 -07:00
Daniel Nelson dd6a3dbafc
Update changelog and readme 2019-05-29 18:36:18 -07:00
Daniel Nelson aaaad4d217
Add health output plugin (#5882) 2019-05-29 18:31:06 -07:00
Daniel Nelson dd09f238e1
Update changelog 2019-05-28 18:10:48 -07:00
Pontus Rydin fa492e0840 Fixed datastore name mapping in vsphere input (#5920) 2019-05-28 18:08:44 -07:00
Daniel Nelson ce2d501e91
Update changelog 2019-05-28 16:13:19 -07:00
Dmitry Ilyin eb225b818f Fix toml option name in nginx_upstream_check (#5917) 2019-05-28 12:54:25 -07:00
Daniel Nelson 980b174687
Tidy ECS readme and make review changes 2019-05-26 20:05:16 -07:00
Evan Baker dfb83778ea Add ecs/fargate input plugin (#5121) 2019-05-26 20:01:02 -07:00
Daniel Nelson 91a82b1e73
Update changelog 2019-05-26 19:04:07 -07:00
Aaron Wood 77659f33bc Extend metrics collected from Nvidia GPUs (#5885) 2019-05-26 19:02:09 -07:00
dupondje 43c3ceec96 Fix setfacl command in postfix docs (#5875) 2019-05-25 00:33:22 -07:00
Daniel Nelson fd57bb1775
Update changelog 2019-05-24 11:25:34 -07:00
Javier Kohen adb7a52b93 Set user agent in stackdriver output (#5901) 2019-05-24 11:24:14 -07:00
Daniel Nelson 597814ee83
Update changelog 2019-05-22 13:36:13 -07:00
Arno den Uijl adc32002da Fix sqlserver connection closing on error (#5897) 2019-05-22 13:13:19 -07:00
Daniel Nelson 6ed2b64b6c
Update changelog 2019-05-22 10:35:54 -07:00
Max Renaud 0535dc92ed Omit power_failed and power_restored when the Apex provides invalid timestamps (#5896) 2019-05-22 10:33:08 -07:00
Daniel Nelson 3c451a1f25
Update changelog 2019-05-20 14:40:05 -07:00
Daniel Nelson e141518cf0
Support passive queue declaration in amqp_consumer (#5831) 2019-05-20 14:38:35 -07:00
Daniel Nelson b5cd9a9ff2
Add support for gzip compression to amqp plugins (#5830) 2019-05-20 14:36:23 -07:00
Daniel Nelson 1b2773a762
Update changelog 2019-05-20 14:35:01 -07:00
Daniel Nelson ad877fdd91
Fix scale set resource id with azure_monitor output (#5821) 2019-05-20 14:32:04 -07:00
Daniel Nelson 9cdf1ea56e
Log actual url on wrong status code (#5811) 2019-05-20 14:30:31 -07:00
Daniel Nelson e6dd853691
Update changelog 2019-05-17 13:47:33 -07:00
Daniel Nelson 5bb6e4603d
Fix publishing of direct exchange routing key (#5868) 2019-05-17 13:46:13 -07:00
Daniel Nelson d25fa3ced3
Document that serializers are not thread-safe 2019-05-17 13:44:29 -07:00
urusha dc75f7bd32 Add postgresql dsn connection string example (#5869) 2019-05-17 13:27:11 -07:00
Daniel Nelson 27dec2c2c1
Update changelog 2019-05-17 11:04:22 -07:00
Jon McKenzie 633a468ff9 Improve Docker image identifier parsing (#5838) 2019-05-17 11:02:22 -07:00
Daniel Nelson f76cca3af5
Update changelog 2019-05-16 16:00:31 -07:00
Greg 10fd5b35f0 Support tags in enum processor (#5855) 2019-05-16 15:59:19 -07:00
Charlie Vieth 43c6d13c33 Refactor templateSpec less method (#5840) 2019-05-15 16:35:07 -07:00
Daniel Nelson 1b3ca655c6
Update changelog and readme 2019-05-15 14:50:25 -07:00
Daniel Nelson a724bf487f
Add final aggregator (#5820) 2019-05-15 14:46:28 -07:00
Daniel Nelson d645e0303f
Update changelog 2019-05-15 12:22:33 -07:00
omgold 12831f43d4 Allow devices option to match against devlinks (#5817) 2019-05-15 12:21:55 -07:00
Daniel Nelson 3b91542985
Update changelog 2019-05-14 16:21:30 -07:00
Jorge Landivar 8f3ed45797 Add support for datadog events to statsd input (#5791) 2019-05-14 16:20:35 -07:00
Daniel Nelson 9318d47a38
Set release date for 1.10.4 2019-05-14 12:04:19 -07:00
Daniel Nelson 44de622f9e
Update changelog 2019-05-14 11:57:33 -07:00
Greg 2d44a88b19 Restore field name case in interrupts input (#5850) 2019-05-14 11:56:19 -07:00
Daniel Nelson 74948edf23
Update changelog 2019-05-14 11:30:51 -07:00
Daniel Nelson e52f7056ba
Fix parse of unix timestamp with more than ns precision (#5826) 2019-05-14 11:29:44 -07:00
Daniel Nelson 3e0efdac39
Reword note about merging pull requests 2019-05-13 10:40:48 -07:00
Daniel Nelson ecb56f19bf
Update changelog 2019-05-10 16:22:01 -07:00
frizner 9b3523a91b Add support for HTTP basic auth to solr input (#5832) 2019-05-10 16:20:37 -07:00
Daniel Nelson 495a5e9f99
Update changelog 2019-05-08 11:39:30 -07:00
Daniel Nelson a0a9da371e
Reformat syslog output documentation 2019-05-08 11:39:03 -07:00
javicrespo 761705c299 Add syslog output plugin (#5802) 2019-05-08 11:21:51 -07:00
Daniel Nelson dfb1387771
Update changelog 2019-05-07 15:43:41 -07:00
Alirie Gray b22bf01fdf Add support for hex values to ipmi_sensor input (#5816) 2019-05-07 15:42:44 -07:00
Daniel Nelson a1513e6235
Update changelog 2019-05-07 15:22:10 -07:00
Greg 0d66ed70f8 Update smart input plugin to support more drive types (#5765) 2019-05-07 15:20:03 -07:00
Daniel Nelson 67394709a9
Update changelog 2019-05-07 14:56:25 -07:00
Daniel Nelson 3011a009e5
Skip lines with missing refid in ntpq input (#5782) 2019-05-07 14:54:43 -07:00
Daniel Nelson a0f4c49fb4
Update changelog 2019-05-07 14:16:36 -07:00
Daniel Nelson 61c2cc97a2
Set default timeout of 5s in fibaro input (#5813) 2019-05-07 14:15:30 -07:00
Daniel Nelson 23b9875462
Require github.com/jackc/pgx v3.4.0 (#5814) 2019-05-07 14:15:12 -07:00
Daniel Nelson 7a07b827b5
Update changelog 2019-05-07 11:53:32 -07:00
Pontus Rydin aac4c29dc6 Fix interval estimation in vsphere input (#5726) 2019-05-07 11:52:24 -07:00
Daniel Nelson c2643d5f7e
Add README for lustre2 input plugin 2019-05-06 17:31:08 -07:00
Daniel Nelson a1c4b9fa47
Update changelog 2019-05-06 16:58:55 -07:00
frroberts 8abf8c10a7 Fix only one job per storage target reported in lustre2 input (#5771) 2019-05-06 16:57:01 -07:00
matthewwiesen 1e1fa1a580 Add iso9660 to telegraf disk input ignore_fs (#5800) 2019-05-06 13:06:22 -07:00
Daniel Nelson 901c50b9d4
Update changelog 2019-05-06 12:15:46 -07:00
Greg 93be5759d5 Set host header if configured on http output (#5810) 2019-05-06 12:13:51 -07:00
Daniel Nelson 6b5162d0d2
Update changelog 2019-05-03 10:57:13 -07:00
Daniel Nelson 74c9d7ace2
Update logfile documentation 2019-05-03 10:55:11 -07:00
javicrespo bcf7516a23 Add in process log rotation (#5778) 2019-05-03 10:25:28 -07:00
Alberto del Barrio bae7f59bbf Fix syntax error in cloudwatch sample config (#5797) 2019-05-03 10:05:06 -07:00
Daniel Nelson 6a73ad56ae
Update changelog 2019-05-01 16:49:20 -07:00
Greg 3592433b06 Buffer metrics from failed writes in influxdb2 output if token is invalid (#5792) 2019-05-01 16:46:52 -07:00
Greg 2e6701b44e Update cloudwatch input readme with getMetricData command (#5786) 2019-05-01 13:09:32 -07:00
Daniel Nelson 597f3a679c
Update changelog 2019-04-30 18:35:17 -07:00
Daniel Nelson 7978ebef40
Add --service-display-name option for use with Windows service (#5770) 2019-04-30 18:34:19 -07:00
Daniel Nelson 0aa25e2b6c
Use struct tags in plugin tutorials 2019-04-30 18:14:31 -07:00
Daniel Nelson 801c285958
Update changelog 2019-04-30 16:13:09 -07:00
Daniel Nelson 0db31c9da7
Use non-release revision of pgx for pgbouncer fix (#5772) 2019-04-30 16:11:18 -07:00
Daniel Nelson e8248fccf9
Update changelog 2019-04-30 11:08:54 -07:00
Lorenzo Affetti 2c3c377334 Create telegraf user in pre-install rpm scriptlet (#5783) 2019-04-30 11:04:45 -07:00
Daniel Nelson 76660e22a9
Update changelog 2019-04-29 15:34:12 -07:00
Ferdi cb4387df3f Verify a process passed by pid_file exists (#5768) 2019-04-29 15:32:10 -07:00
marcv81 2fb62d4aec No longer requires dep to be in $GOPATH/bin (#5763) 2019-04-26 10:50:06 -07:00
Daniel Nelson 52a00b4300
Update changelog 2019-04-25 20:40:19 -07:00
Daniel Nelson d2fbf2414a
Add --section-filter to usage 2019-04-25 20:39:41 -07:00
Greg 6436005553 Add cli support for outputting sections of the config (#5585) 2019-04-25 20:34:40 -07:00
Daniel Nelson c11327ee34
Update changelog 2019-04-25 20:28:04 -07:00
Greg 32f0cb16f5 Update naoina/toml library dependency (#5513) 2019-04-25 20:19:58 -07:00
Daniel Nelson af8137eab7
Update changelog 2019-04-25 20:08:17 -07:00
Daniel Nelson 66153625fb
Set socket permissions for unix domain sockets (#5760) 2019-04-25 20:06:39 -07:00
Daniel Nelson 4ad813aecd
Update changelog 2019-04-25 17:21:48 -07:00
Matthew Crenshaw 9c3af1e6ac Add pagefault data to procstat input plugin (#5769) 2019-04-25 17:21:02 -07:00
Daniel Nelson 10b2a3de30
Update changelog 2019-04-25 12:24:34 -07:00
Pontus Rydin f32b064d6a Fix race condition in the Wavefront parser (#5764) 2019-04-25 12:22:48 -07:00
Daniel Nelson f5b44fd0bd
Wait for server socket to close in pdns_recursor test 2019-04-24 13:51:21 -07:00
Daniel Nelson 2c3fa9abdb
Update changelog 2019-04-23 16:36:25 -07:00
dupondje a0202744cf Add PowerDNS Recursor input plugin (#4545) 2019-04-23 16:34:52 -07:00
Daniel Nelson c71827ecfa
Update changelog 2019-04-23 11:16:51 -07:00
Daniel Nelson 3c57dafece
Support Minecraft server 1.13 and newer (#5733) 2019-04-23 11:14:35 -07:00
Łukasz Oleś 01eecee8cf Speed up interface stats in net input (#5757) 2019-04-23 11:13:14 -07:00
Pavel Sviderski 17a772d7ae Add link to Telegraf playground in README (#5745) 2019-04-22 17:40:55 -07:00
Daniel Nelson c7b4f9feaa
Update changelog 2019-04-22 17:39:11 -07:00
Greg e334830458 Collect cloudwatch stats using GetMetricData (#5544) 2019-04-22 17:36:46 -07:00
Daniel Nelson 58a6209a76
Update changelog 2019-04-17 15:49:22 -07:00
Daniel Nelson bc95a2a2b5
Don't start telegraf when stale pidfile found (#5731) 2019-04-17 15:47:03 -07:00
Daniel Nelson 2faf37e5c1
Fix docs for metric buffer limit to reflect current behavior (#5741) 2019-04-17 15:46:20 -07:00
Daniel Nelson 6a7d0c142e
Update changelog 2019-04-16 17:59:13 -07:00
Greg 72695228b3 Enhance HTTP connection options for phpfpm input plugin (#5713) 2019-04-16 17:56:56 -07:00
Daniel Nelson 08080bbc1f
Set release date for 1.10.3 2019-04-16 12:39:02 -07:00
Daniel Nelson 396d44546d
Update changelog 2019-04-15 16:09:37 -07:00
Lorenzo Affetti 37441e9eb1 Set log directory attributes in rpm spec (#5716) 2019-04-15 16:07:47 -07:00
Greg 5bf793bb94 Update issue templates to include code block and comments (#5721) 2019-04-12 12:22:16 -07:00
Daniel Nelson e9fe26f17b
Update changelog 2019-04-11 13:16:19 -07:00
Greg 776e06c769 Support verbose query param in ping endpoint of influxdb_listener (#5704) 2019-04-11 13:15:38 -07:00
Daniel Nelson 24391a8b5e
Remove debug print statements 2019-04-11 11:48:23 -07:00
Daniel Nelson 2e5165d416
Update changelog 2019-04-10 18:44:28 -07:00
scottprichard d2666d0db6 Add cmdline tag to procstat input (#5681) 2019-04-10 18:42:38 -07:00
Daniel Nelson 7f8bf56670
Update changelog 2019-04-10 17:20:48 -07:00
Daniel Nelson 9ea7cdd319
Deprecate uptime_format field in system input (#5708) 2019-04-10 17:19:29 -07:00
Daniel Nelson 4079e4605f
Update changelog 2019-04-10 17:18:48 -07:00
Benjamin Fuller b2baa2fdd5 Add optional namespace restriction to prometheus input plugin (#5697) 2019-04-10 14:52:46 -07:00
Daniel Nelson 90593a07b8
Clarify supported ping utils 2019-04-08 15:42:28 -07:00
Daniel Nelson ca99569e6f
Fix wavefront serializer option names in README 2019-04-05 15:06:46 -07:00
Daniel Nelson 5bc60ca79d
Update changelog 2019-04-05 14:48:24 -07:00
Pierre Tessier 267a9f182b Add wavefront serializer plugin (#5670) 2019-04-05 14:46:12 -07:00
Daniel Nelson 991e83c35f
Update changelog 2019-04-04 16:40:12 -07:00
Robert Sullivan e5215d74db Allow colons in metric names in prometheus_client output (#5680) 2019-04-04 16:38:33 -07:00
Daniel Nelson dc5db8fc38
Update changelog 2019-04-03 16:02:21 -07:00
Daniel Fenert a61cb4dca5 Add bind input plugin (#5653) 2019-04-03 15:59:47 -07:00
Daniel Nelson 1bcbc3eea7
Update docs and changelog for github input 2019-04-02 16:27:45 -07:00
David McKay 0a68c8468b Add github input plugin (#5587) 2019-04-02 16:06:15 -07:00
Daniel Nelson 0e50a3977d
Fix typo 2019-04-02 14:14:37 -07:00
Daniel Nelson 1d965f11d3
Set release date for 1.10.2 2019-04-02 13:10:17 -07:00
Greg 286eeb117e Remove unused config option from logfmt parser docs (#5669) 2019-04-02 13:06:44 -07:00
Daniel Nelson eba13426fc
Update changelog 2019-04-02 12:43:37 -07:00
Greg d738892c0b Remove tags that would create invalid label names in prometheus output (#5663) 2019-04-02 12:42:48 -07:00
David McKay 42cc84c262 Fix command for running integration test containers (#5660) 2019-04-02 11:53:11 -07:00
David McKay 346ac519b6 Fix CrateDB port in docker compose file (#5667) 2019-04-02 11:51:40 -07:00
Daniel Nelson b092aec103
Update changelog 2019-04-02 11:49:00 -07:00
Pierre Tessier ff81811720 Add option to use strict sanitization rules to wavefront output (#5664) 2019-04-02 11:47:25 -07:00
Daniel Nelson fb01b8ba28
Update changelog 2019-04-02 11:17:52 -07:00
Daniel Nelson c283e5992a
Fix tags applied to wrong metric on parse error (#5650) 2019-04-02 11:14:56 -07:00
Daniel Nelson 0d00f0af3c
Update changelog 2019-04-02 11:06:44 -07:00
liispon 3b80d8a7fd Use github.com/ghodss/yaml to parse k8s config (#5643) 2019-04-02 11:04:37 -07:00
Daniel Nelson 782280345d
Update changelog 2019-04-01 11:54:43 -07:00
Olli-Pekka Lehto 13a00eeca5 Add option to reset buckets on flush to histogram aggregator (#5641) 2019-04-01 11:53:50 -07:00
Daniel Nelson db1e902c81
Update changelog 2019-03-29 16:03:34 -07:00
Daniel Nelson 6feb6c1853
Add support for ${} env vars in configuration file (#5648) 2019-03-29 16:02:10 -07:00
Daniel Nelson aac013f8ab
Update changelog 2019-03-29 15:52:36 -07:00
Daniel Nelson 4e3244c575
Fix aggregator window and shutdown of multiple aggregators (#5644) 2019-03-29 15:40:33 -07:00
Daniel Nelson 3045ffbbe3
Add github source for golang/x to Gopkg.toml
Prevents removal of source in lock file.
2019-03-27 12:25:07 -07:00
Daniel Nelson 5109847be1
Update changelog 2019-03-26 18:20:52 -07:00
Daniel Nelson c57ba6110d
Exit after running --test without requiring --console (#5631) 2019-03-26 18:17:27 -07:00
Daniel Nelson be26ef6f9b
Update changelog 2019-03-26 18:14:37 -07:00
Daniel Nelson 5f74c0da0d
Fix basedir check and parent dir extraction in filecount input (#5630) 2019-03-26 18:12:40 -07:00
Daniel Nelson 22ab649261
Listen before leaving start in statsd (#5628) 2019-03-26 18:11:56 -07:00
Daniel Nelson 3bb1548414
Fix plugin name in influxdb_v2 output logging (#5627) 2019-03-26 18:09:35 -07:00
John Hu 5e6374c19b Fix drop tracking of aggregator drop_original metrics (#5632) 2019-03-26 18:01:50 -07:00
Daniel Nelson 0f21373439
Update changelog 2019-03-25 16:26:03 -07:00
scier 60027cf902 Add support for multiple line text and perfdata to nagios parser (#5601) 2019-03-25 16:24:42 -07:00
Daniel Nelson e793a69533
Fix grammar 2019-03-25 12:11:59 -07:00
Daniel Nelson 888d847a05
Add link to vjeantet/grok to grok parser docs 2019-03-25 12:09:04 -07:00
Daniel Nelson 135166323b
Update changelog 2019-03-22 14:14:38 -07:00
Daniel Nelson 9ba023fd67
[inputs/diskio] Fix how major and minor identifiers of block devices are read. (#5566)
* Fix how major and minor identifiers of block devices are read.

The current implementation assure that the major and the minor are
coded on one byte. But they are not:

```
brw-rw----  1 root disk    252, 290 Feb 25 11:36 dm-290
```

290 as minor in this example is over 1 byte.

So after wondering why all my devices iops weren't correctly stored,
I found out that several points were added for some disks. For `dm-290`
it was overriding `252:34`, instead of getting udev stats for `252:290`.

The solution is here:
https://sites.uclouvain.be/SystInfo/usr/include/sys/sysmacros.h.html

The implementation is directly taken from this, fixing my bug.

* Use unix.Major/unix.Minor instead of custom implementation

* [diskio] Force type of stat.Rdev uint64 for mipsle compatibility

For most platforms, stat.Rdev is already a uint64 so this is without any effect
for linux,mipsle, unix.Stat_t.Rdev is a uint32, but the way to compute major and minor doesn't change, casting the uint32 has no impact either
2019-03-22 14:03:48 -07:00
Daniel Nelson 417c5c1de8
Add owned directories to rpm package (#5607) 2019-03-22 14:02:45 -07:00
Daniel Nelson 72d4f00082
Remove string trimming from grok parser (#5608) 2019-03-22 14:02:15 -07:00
Daniel Nelson 68b8db4a64
Update changelog 2019-03-22 14:00:58 -07:00
Daniel Nelson 99a390b8e6
Fix open error handling in file output (#5540) 2019-03-22 13:59:30 -07:00
Soulou 205de66dd6
[diskio] Force type of stat.Rdev uint64 for mipsle compatibility
For most platforms, stat.Rdev is already a uint64 so this is without any effect
for linux,mipsle, unix.Stat_t.Rdev is a uint32, but the way to compute major and minor doesn't change, casting the uint32 has no impact either
2019-03-21 12:00:20 +01:00
Daniel Nelson fa65a82ef3
Update changelog 2019-03-20 12:53:55 -07:00
Daniel Nelson 51409c8768
Update changelog 2019-03-20 11:38:20 -07:00
Adrián López 33ee309fd1 Fix deadlock when Telegraf is aligning aggregators (#5612) 2019-03-20 10:36:51 -07:00
Daniel Nelson 5d9b829776
Set Telegraf 1.10.1 release date 2019-03-19 13:46:26 -07:00
Daniel Nelson b74660163e
Update changelog 2019-03-19 13:45:19 -07:00
Greg 3b1ab6f362 Don't add empty healthcheck tags to consul input (#5575) 2019-03-19 13:39:42 -07:00
Daniel Nelson 5e88824c15
Improve stability of appveyor builds (#5578) 2019-03-18 17:54:12 -07:00
Daniel Nelson eeb0e094c2
Remove test directory with .. prefix 2019-03-18 12:47:47 -07:00
Daniel Nelson 6b2137a4a1
Update changelog 2019-03-18 11:10:02 -07:00
Greg 6a97b259eb Minimize call to collect uptime in system input (#5592) 2019-03-18 11:07:44 -07:00
Soulou 2118fbe78a
Use unix.Major/unix.Minor instead of custom implementation 2019-03-15 14:36:56 +01:00
Daniel Nelson 96ded74098
Update changelog 2019-03-12 19:57:10 -07:00
Greg 45b1247d9b Use valid measurement names in csv parser (#5577)
If an empty column is present in parsed csv data, a `recordFields` is
set to the key of "". If no `MeasurementColumn` is defined, this empty
value was being used as the measurement name. By only setting the
measurementName if the value is not empty, we avoid this error.

Since an empty column is a valid column, skip values must account for
them.
2019-03-12 19:49:19 -07:00
Daniel Nelson 2a0ae10940
Update changelog 2019-03-11 15:37:34 -07:00
Dimitri Saingre 88e0cb16e1 Add hexadecimal string to integer conversion to converter processor (#5569) 2019-03-11 15:36:38 -07:00
Daniel Nelson 2566210df1
Update telegraf.conf 2019-03-11 12:32:45 -07:00
Daniel Nelson c61c48e10b
Remove trailing whitespace and wordwrap readme in vsphere 2019-03-11 12:31:48 -07:00
Daniel Nelson 9db15651ea
Fix ClusterRole aggregation documentation in kube_inventory 2019-03-11 12:00:20 -07:00
Daniel Nelson f298f87f0c
Update changelog; vsphere readme 2019-03-11 11:55:20 -07:00
Pontus Rydin 19988a94de Add use_int_samples option for backwards compatibility (#5563) 2019-03-11 11:16:32 -07:00
Pontus Rydin 1752619e35 Remove calls to destroy on ViewManager (#5557) 2019-03-11 11:08:53 -07:00
Soulou 92b01ab4f9
Fix how major and minor identifiers of block devices are read.
The current implementation assure that the major and the minor are
coded on one byte. But they are not:

```
brw-rw----  1 root disk    252, 290 Feb 25 11:36 dm-290
```

290 as minor in this example is over 1 byte.

So after wondering why all my devices iops weren't correctly stored,
I found out that several points were added for some disks. For `dm-290`
it was overriding `252:34`, instead of getting udev stats for `252:290`.

The solution is here:
https://sites.uclouvain.be/SystInfo/usr/include/sys/sysmacros.h.html

The implementation is directly taken from this, fixing my bug.
2019-03-11 01:31:30 +01:00
Daniel Nelson 91cd17fd40
Use random available port in prometheus output tests (#5555) 2019-03-08 14:54:16 -08:00
Daniel Nelson bdb9d5c842
Update changelog 2019-03-08 14:32:46 -08:00
Dheeraj Dwivedi 80155029c4 Add TTL field to ping input (#5556) 2019-03-08 14:30:38 -08:00
Daniel Nelson 7da57fe5f5
Fix incorrect option in net_response sample config 2019-03-08 14:10:55 -08:00
Greg 03920075e4 Fix links and add config to webhook readme (#5558) 2019-03-08 11:25:20 -08:00
Daniel Nelson 9378de942d
Update gopsutil to v2.19.02 (#5552) 2019-03-07 12:53:25 -08:00
Daniel Nelson d4c2d4548c
Update changelog 2019-03-06 17:40:16 -08:00
Daniel Nelson c3e793bb4e
Return any errors when creating tls config (#5541) 2019-03-06 17:37:44 -08:00
emily dd67144660 Add Base64-encoding/decoding for Google Cloud PubSub plugins (#5543) 2019-03-06 17:34:47 -08:00
Daniel Nelson 51cc0fe6d8
Set 1.10.0 release date 2019-03-05 11:12:27 -08:00
Daniel Nelson f2aa35e258
Update changelog 2019-03-05 11:10:10 -08:00
Daniel Nelson b5adaff07f
Sort metrics by timestamp in prometheus output (#5534) 2019-03-05 11:08:02 -08:00
Daniel Nelson a0527db037
Allow grok to produce metrics with no fields (#5533) 2019-03-05 11:07:39 -08:00
Daniel Nelson 1dcfecdb59
Build with Go 1.11.5 on Windows CI 2019-03-05 10:49:53 -08:00
Daniel Nelson 3d206d2897
Exclude dep check on windows CI 2019-03-05 10:42:25 -08:00
Daniel Nelson 6088c7f969
Add dep check to CI tests 2019-03-04 17:22:24 -08:00
Daniel Nelson 5108e82a5d
Remove unused dependencies 2019-03-04 17:17:35 -08:00
Greg 98e922123a Dereference pointer fields in metrics (#5525) 2019-03-04 13:34:52 -08:00
scier 77a2de2bc1 Add a link to x509_cert plugin in the README (#5515) 2019-03-04 13:00:22 -08:00
Daniel Nelson b21864fc17
Update changelog 2019-03-04 12:55:35 -08:00
Daniel Nelson 0b5811e193
Fix panic when rejecting empty batch (#5524) 2019-03-04 12:36:19 -08:00
Daniel Nelson c0e0da7ef6
Fix conversion from string float to integer (#5518) 2019-03-04 12:35:57 -08:00
Daniel Nelson d09c213562
Fix sample configuration; generated with wrong version 2019-03-02 21:07:05 -08:00
Greg 30fcaf0987 Improve error handling in prometheus output (#5512) 2019-03-01 13:26:11 -08:00
Daniel Nelson 9bd48d4673
Update changelog 2019-03-01 11:27:47 -08:00
Daniel Nelson c57f2d9d48
Ignore tracking for metrics added to aggregator (#5508) 2019-03-01 11:21:31 -08:00
Daniel Nelson 2c09010f72
Listen before returning from Connect in prometheus output (#5509) 2019-03-01 11:19:31 -08:00
Daniel Nelson 41286d10c2
Update changelog 2019-02-27 16:34:49 -08:00
scier 7787ea2dcc Create log file in append mode (#5497) 2019-02-27 16:33:38 -08:00
Daniel Nelson bfc8758db6
Update build.py next_version 2019-02-27 11:32:58 -08:00
Daniel Nelson 2d2abe295b
Update sample telegraf.conf 2019-02-27 11:11:10 -08:00
Daniel Nelson a4b4dd8295
Update changelog 2019-02-27 10:56:16 -08:00
Daniel Nelson 65b76dc746
Add tag based routing in influxdb/influxdb_v2 outputs (#5490) 2019-02-27 10:54:02 -08:00
Matthew Crenshaw 1872356103 Add multicast support to socket_listener input 2019-02-27 10:43:39 -08:00
Daniel Nelson 50c1103657
Update changelog 2019-02-26 18:42:18 -08:00
Daniel Nelson b805e83b71
Add additional metrics to rabbitmq input 2019-02-26 18:41:18 -08:00
Daniel Nelson d84e501ab6
Update changelog 2019-02-26 18:38:24 -08:00
Daniel Nelson 29cbb0ab2d
Add mutual TLS support to prometheus_client output 2019-02-26 18:34:35 -08:00
Daniel Nelson 598a79bf62
Remove 'inputs.' prefix when logging loaded inputs (#5489)
* Remove 'inputs.' prefix when logging loaded inputs

* Remove prefix from aggregators name
2019-02-26 18:31:43 -08:00
Daniel Nelson 3377389017
Add cloud_pubsub_push to readme/changelog 2019-02-26 18:30:54 -08:00
Greg c6612a4e4a Add cloud pubsub push input plugin (#5442) 2019-02-26 18:25:42 -08:00
Daniel Nelson 03f40b3588
Remove prefix from aggregators name 2019-02-26 18:22:12 -08:00
Daniel Nelson c023ffe0a5
Add unique_timestamp option from grok parser to logparser grok 2019-02-26 18:05:04 -08:00
Daniel Nelson 4df0cc006c
Update changelog 2019-02-26 17:41:56 -08:00
Robert Edström a3f83afe4a Move capacity check for stackdriver output plugin (#5479) 2019-02-26 17:40:21 -08:00
Greg 85617887c4 Add option to disable timestamp adjustment in grok parser (#5488) 2019-02-26 17:35:57 -08:00
Greg Linton 8d90609198 Remove 'inputs.' prefix when logging loaded inputs 2019-02-26 17:03:13 -07:00
Daniel Nelson ec746cc32a
Update changelog 2019-02-26 14:04:36 -08:00
Greg 9740e956ca Log permission error and ignore in filecount input (#5483) 2019-02-26 14:03:25 -08:00
Daniel Nelson c9597a2463
Set release date for 1.9.5 2019-02-26 12:45:03 -08:00
Daniel Nelson 931fac9b86
Fix issue link in changelog 2019-02-26 12:45:03 -08:00
Daniel Nelson 04f3c4321c
Fix several influx parser issues (#5484)
- Add line/column position
- Allow handlers to return errors
- Fix tag value escaping
- Allow newline in string fields
2019-02-26 10:48:41 -08:00
Max Eshleman b34ad9efc4 update sample config for prometheus output client
Signed-off-by: Robert Sullivan <rsullivan@pivotal.io>
2019-02-26 11:46:49 -07:00
Max Eshleman a85833ae53 replace gomega with require in prometheus output client tests
Signed-off-by: Robert Sullivan <rsullivan@pivotal.io>
2019-02-26 11:34:50 -07:00
Daniel Nelson 8da6846e53
Update changelog 2019-02-25 16:04:10 -08:00
Greg 5253cbfa01 Add ceph_health metrics to ceph input (#5482) 2019-02-25 16:02:30 -08:00
Daniel Nelson 135b1d1a8e
Update changelog 2019-02-25 15:34:11 -08:00
Greg 7fa8b33066 Add backwards compatibility fields in ceph usage and pool stats (#5466) 2019-02-25 15:32:05 -08:00
Daniel Nelson 62678fae06
Add kinesis_consumer documentation links 2019-02-25 12:06:44 -08:00
Greg 9d8a574ac7 Add kinesis input plugin (#5341) 2019-02-25 12:02:57 -08:00
Daniel Nelson 2506da80c2
Update changelog 2019-02-25 11:31:28 -08:00
Douglas Drinka 1886676e14 Support configuring a default timezone in JSON parser (#5472) 2019-02-25 11:30:33 -08:00
Daniel Nelson eb794ec30f
Log the protocol and address that socket_listener is listening on (#5454) 2019-02-25 11:11:25 -08:00
Daniel Nelson 0882479cbf
Add command logging to snmp input at debug level (#5474) 2019-02-25 11:04:34 -08:00
Daniel Nelson 2abed0e04f
Update changelog 2019-02-25 10:55:14 -08:00
Daniel Nelson 9e0248898f
Disable results by row in azuredb query (#5467) 2019-02-25 10:54:19 -08:00
Robert Sullivan 05af32b191 Clean up TLS configuration in prometheus_client output plugin
Signed-off-by: Jesse Weaver <jeweaver@pivotal.io>
2019-02-22 15:26:32 -07:00
Jesse Weaver c9fb1fcdca Add mutual TLS support to prometheus_client output plugin
Signed-off-by: Robert Sullivan <rsullivan@pivotal.io>
2019-02-22 12:19:29 -07:00
Pierre Tessier cf18c4a2bf Update wavefront-sdk-go version (#5461) 2019-02-22 11:10:59 -08:00
Pierre Tessier 5f1bc9e49f Accept values with a negative exponent in wavefront parser (#5462) 2019-02-21 14:49:52 -08:00
Nicolas Bazire 33dfbfdf5e Fix delete in place of keys in stackdriver output (#5465) 2019-02-21 12:19:50 -08:00
Daniel Nelson 0a2cc3ac3f
Update link to grok built in patterns 2019-02-21 12:11:00 -08:00
Daniel Nelson 3c95b25588
Update link to grok built in patterns 2019-02-21 12:08:59 -08:00
Daniel Nelson f8cc9719a2
Document how to increase the file limit in the ping input 2019-02-20 17:57:39 -08:00
emily 0a01713bcc Retry restarting receiver on PubSub service error (#5458) 2019-02-20 17:33:56 -08:00
Daniel Nelson c234ba291e
Update changelog 2019-02-20 15:17:17 -08:00
Andrew Ernst 6add84eb25 Support Azure Sovereign Environments with endpoint_url option (#5453) 2019-02-20 15:16:23 -08:00
Daniel Nelson 03776088f1
Update changelog 2019-02-20 13:26:21 -08:00
Daniel Nelson 843d842d02
Add stackdriver input plugin (#5406) 2019-02-20 13:23:59 -08:00
Daniel Nelson 463df273ee
Update changelog 2019-02-20 13:18:08 -08:00
Robert Edström 5823fefb7a Group stackdriver requests to send one point per timeseries (#5407) 2019-02-20 13:16:02 -08:00
Daniel Nelson 431c58d84f
Update changelog 2019-02-19 15:10:53 -08:00
Olli-Pekka Lehto 5dfa3fa769 Fix InfluxDB output UDP line splitting (#5439) 2019-02-19 15:08:54 -08:00
Daniel Nelson e4d084fbc3
Update changelog 2019-02-19 15:02:57 -08:00
Daniel Nelson 091dd61548
Update changelog 2019-02-19 11:20:46 -08:00
Greg e586fdb27f Append host if arguments are specified for ping input (#5450) 2019-02-19 11:18:15 -08:00
tgregory86 c18934f065 Fix typo in CONFIGURATION.md example (#5441) 2019-02-15 11:13:43 -08:00
Daniel Nelson ab1a1b075d
Disable export_timestamp by default in prometheus output 2019-02-14 15:09:12 -08:00
Daniel Nelson 7e91336c54
Update changelog 2019-02-12 17:59:03 -08:00
Greg 3e9703a573 Add rcode tag and field to dns_query input (#5417) 2019-02-12 17:57:20 -08:00
Daniel Nelson f001303189
Update changelog 2019-02-12 16:49:40 -08:00
Tomas Barton ee5827ccbd Remove error log when snmp6 directory does not exists with nstat input (#5403) (#5413) 2019-02-12 16:17:09 -08:00
Daniel Nelson ce507e522f
Fix dep check errors 2019-02-12 15:34:57 -08:00
Daniel Nelson b490e7d273
Update changelog 2019-02-12 14:06:01 -08:00
Pontus Rydin c0bb8625dc Add resource path based filtering to vsphere input (#5165) 2019-02-12 14:05:14 -08:00
Greg ddf35ddaf3 Note how to use all namespaces in kube_inventory (#5416) 2019-02-12 11:36:22 -08:00
Daniel Nelson 0df92dff0d
Update changelog 2019-02-11 17:27:05 -08:00
Daniel Nelson c08b454af4
Fix typos in mqtt output documentation 2019-02-11 17:25:25 -08:00
Daniel Nelson 6ac4fc8f06
Update changelog 2019-02-11 17:22:53 -08:00
Paweł Kraszewski 0084138bc6 Add option to set retain flag on messages in mqtt output (#4892) 2019-02-11 17:22:31 -08:00
Phil Schwartz c8832a28c4 Set deadlock priority in sqlserver input (#5301) 2019-02-11 17:10:42 -08:00
Daniel Nelson c612f707f4
Comment out optional parameters to stackdriver output 2019-02-11 14:58:30 -08:00
Daniel Nelson 412a7996e1
Update changelog 2019-02-11 12:50:23 -08:00
Greg 16a7ce39da Add internal metric for line too long in influxdb_listener (#5396) 2019-02-11 12:49:06 -08:00
Daniel Nelson 516a5898fd
Update changelog 2019-02-08 12:16:48 -08:00
Robert Edström 3f9860a685 Add resource type and resource label support to stackdriver output (#5391) 2019-02-08 12:13:33 -08:00
Gunnar 52bd698046 Use Systemd for Amazon Linux 2 packages (#5387) 2019-02-06 16:17:11 -08:00
Daniel Nelson 2acfe16dd3
Update changelog 2019-02-06 14:22:07 -08:00
Daniel Nelson 7f54ae18b5
Send metrics in ascending time order in stackdriver output (#5385) 2019-02-06 14:17:51 -08:00
Daniel Nelson e65ab593b5
Update changelog 2019-02-05 18:24:02 -08:00
Daniel Nelson d4ab5da34f
Skip string fields in stackdriver output (#5384) 2019-02-05 18:22:42 -08:00
Daniel Nelson f54da4d748
Update changelog/csv parser docs 2019-02-05 17:45:44 -08:00
Greg 10ac030502 Unify time parsing in json/csv parsers (#5382) 2019-02-05 17:43:35 -08:00
Daniel Nelson 7887e15446
Update changelog 2019-02-05 17:39:50 -08:00
Greg 1137fa50ad Continue checking cert from other sources if error occurs (#5381) 2019-02-05 17:38:04 -08:00
Daniel Nelson 1a81e49d05
Return error loading config on non-200 response 2019-02-05 15:15:58 -08:00
Daniel Nelson 7dffb1b5f9
Update to gopsutil v2.19.01 (#5380) 2019-02-05 13:09:56 -08:00
Daniel Nelson 2c9fde451b
Set 1.9.4 release date 2019-02-05 11:32:20 -08:00
Ami Blonder cce160322e Replace subscription with topic in the pubsub output plugin (#5378) 2019-02-05 11:04:51 -08:00
Daniel Nelson 2f2ababbdb
Update changelog 2019-02-04 13:52:00 -08:00
Daniel Nelson c579a6bdb9
Add linux mipsle packages (#5234) 2019-02-04 13:50:13 -08:00
Daniel Nelson 96f99a7a79
Update changelog 2019-02-04 12:38:45 -08:00
Greg 94de223916 Add kube_inventory input plugin (#5110) 2019-02-04 12:28:43 -08:00
Daniel Nelson 6be5b55094
Update changelog 2019-02-04 11:24:49 -08:00
Daniel Nelson 00734c56c4
Return new Syslog instance for each plugin (#5372) 2019-02-04 11:21:16 -08:00
Daniel Nelson 6b144db504
Remove unimplemented auth options from azure_monitor documentation (#5348) 2019-02-04 11:19:04 -08:00
Daniel Nelson 4e8aa401e0
Use github.com/go-logfmt/logfmt 0.4.0 2019-02-02 18:19:31 -08:00
Grace Do 15c65b08e5 Check fields in testutil AssertDoesNotContainsTaggedFields (#5365) 2019-02-01 16:20:24 -08:00
Daniel Nelson a98483cc11
Update telegraf.conf 2019-02-01 12:27:31 -08:00
Daniel Nelson 35381707db
Fix grammar in influxdb_v2 README 2019-02-01 12:27:31 -08:00
Daniel Nelson 8e46414da2
Clean pubsub sample config 2019-02-01 12:27:31 -08:00
Daniel Nelson 2857f07af9
Add stats option to basicstats sample config 2019-02-01 12:27:31 -08:00
Pierre Tessier c37811ccd8 Update docs on using filtering to group aggregates (#5349) 2019-01-29 22:01:17 -08:00
Pontus Rydin d207269a30 Added performance section to vsphere README (#5353) 2019-01-29 17:32:48 -08:00
Daniel Nelson 6c6ff372ff
Update changelog 2019-01-25 18:10:25 -08:00
Daniel Nelson d5a03eb690
Use Go 1.10.8 and 1.11.5 (#5346) 2019-01-25 18:08:48 -08:00
Daniel Nelson 36b55c3d76
Update changelog 2019-01-25 18:07:50 -08:00
Frank Reno a15305385f Add carbon2 serializer (#5345) 2019-01-25 18:06:08 -08:00
Daniel Nelson 7d64620440
Update changelog 2019-01-25 12:59:48 -08:00
Jeff Ashton 4ca0a04df1 Removing authentication from the /ping route to match influxdb (#5316) 2019-01-25 12:57:35 -08:00
vignemail1 7a229e25a6 Update sudo config recommendation (#5337) 2019-01-24 10:54:25 -08:00
Daniel Nelson 35d18d3fd7
Update multifile plugin docs 2019-01-23 17:26:50 -08:00
Martin Pittermann 7a031c48cd Add multifile input plugin (#5256) 2019-01-23 16:23:58 -08:00
Daniel Nelson 3de473721d
Update changelog 2019-01-23 14:19:08 -08:00
Daniel Nelson d1610d50e6
Always send basic auth in jenkins input (#5329) 2019-01-23 14:17:57 -08:00
Daniel Nelson aabb60dfec
Update changelog 2019-01-23 14:13:37 -08:00
Daniel Nelson 17460be771
List deprecation version for consul datacentre 2019-01-23 14:12:19 -08:00
Marcelo Almeida f739ce2a35 Use datacenter option spelling in consul input (#5320) 2019-01-23 14:10:38 -08:00
Daniel Nelson 39eff3d62b
Update changelog 2019-01-23 11:40:22 -08:00
Greg 458d3109c0 Set skip rows and columns in csv parser (#5336) 2019-01-23 11:37:24 -08:00
Pierre Tessier 99d36eb453 Clarify change in changelog (#5333) 2019-01-23 09:59:03 -08:00
Daniel Nelson efbc83c8b6
Document that sqlserver input requires SP3 2019-01-22 15:47:57 -08:00
Daniel Nelson b2f6fd685d
Update link to InfluxDB v2.x 2019-01-22 15:29:46 -08:00
Daniel Nelson 5acf2e6ed7
Update filecount docs 2019-01-22 14:13:15 -08:00
Greg 5b85569316 Cleanup logs in kinesis output (#5328) 2019-01-22 14:05:20 -08:00
Daniel Nelson 739aeeb2e0
Note 1.9.3 release date 2019-01-22 13:48:20 -08:00
Daniel Nelson 7284dfc502
Update changelog 2019-01-22 13:45:24 -08:00
Daniel Nelson b34c5e0d04
Update the buffer_size internal metric after writes (#5314) 2019-01-22 13:43:51 -08:00
Daniel Nelson fa9a654f2d
Update changelog 2019-01-18 11:45:10 -08:00
Greg cf10d03bb9 Remove credentials from cluster tag in couchbase (#5313) 2019-01-18 11:43:24 -08:00
Daniel Nelson b6cc324d10
Add note on performance to grok parser documentation (#5291) 2019-01-17 12:00:07 -08:00
Daniel Nelson 8ea181d67c
Update changelog 2019-01-17 10:52:26 -08:00
Artem V. Navrotskiy 3380fdf69d Add option to report input timestamp in prometheus output (#5292) 2019-01-17 10:51:18 -08:00
Daniel Nelson 452b13a4e3
Update changelog 2019-01-16 15:51:22 -08:00
Greg b620a56d21 Collect from newly discovered/launched pods (#5293) 2019-01-16 15:49:24 -08:00
Artem V. Navrotskiy 2b8729e048 Fix typo in mongodb field name (#5299) 2019-01-16 15:39:55 -08:00
Daniel Nelson e95b88e01b
Update changelog 2019-01-15 15:27:56 -08:00
Greg 50ba5c15a4 Support passing bearer token directly in k8s input (#5295) 2019-01-15 15:26:18 -08:00
Greg d759b46345 Support passing bearer token directly in prometheus input (#5294) 2019-01-15 15:25:26 -08:00
Daniel Nelson a7b443c55b
Update changelog 2019-01-15 12:59:14 -08:00
Dmitry Ilyin e404e5145b Add nginx_upstream_check input plugin (#4303) 2019-01-15 12:56:40 -08:00
Daniel Nelson 059ab5d16b
Update changelog 2019-01-15 11:54:04 -08:00
Daniel Nelson da80276802
Use lifo order in metric buffer (#5287) 2019-01-15 11:48:52 -08:00
Daniel Nelson 193aba8673
Ack delivery if it is unparseable in amqp_consumer input (#5286) 2019-01-15 11:48:36 -08:00
Daniel Nelson 42184fd1c8
Use gopsutil 2.18.12 (#5288) 2019-01-15 11:47:06 -08:00
Daniel Nelson dcc4389a2a
Update changelog 2019-01-15 11:36:27 -08:00
Artem V. Navrotskiy df33759711 Add flush_total_time_ns and additional wired tiger fields to mongodb input (#5273) 2019-01-15 11:31:51 -08:00
Daniel Nelson ccfd9ca522
Update mongodb readme 2019-01-10 14:38:13 -08:00
Daniel Nelson e20ba1e2b6
Fix intermittent test cases in cloud_pubsub (#5271) 2019-01-09 15:55:57 -08:00
Artem V. Navrotskiy 4b3580cceb Add raw counters to mongodb input (#5264) 2019-01-09 15:48:45 -08:00
Daniel Nelson 10b3e45775
Sort fields in nowmetric test 2019-01-08 17:57:38 -08:00
Daniel Nelson bed90f1942
Update changelog 2019-01-08 15:56:10 -08:00
emily f5f85aa74f Add GCP Cloud Pubsub output plugin (#5202) 2019-01-08 15:53:02 -08:00
Daniel Nelson 2474a3a54b
Remove unsupported parallel testing 2019-01-08 15:43:50 -08:00
Daniel Nelson c9d8be9ab5
Update changelog and docs for nowmetric serializer 2019-01-08 15:32:49 -08:00
JefMuller e6724bfb7c Add ServiceNow serializer (#4809) 2019-01-08 15:28:00 -08:00
Daniel Nelson dd20b1cd10
Update changelog and docs for neptune_apex plugin 2019-01-08 15:09:36 -08:00
Max Renaud 4125e4161c Add input plugin for Neptune Apex aquarium controller (#5191) 2019-01-08 15:02:32 -08:00
Daniel Nelson 8538894690
Update changelog 2019-01-08 14:16:14 -08:00
Phil Schwartz 1c3acafc8f Fix arithmetic overflow in sqlserver input (#5261) 2019-01-08 14:13:14 -08:00
Daniel Nelson 741a4d9c97
Set release date for 1.9.2 2019-01-08 11:59:30 -08:00
Daniel Nelson 5d0b7011d2
Update changelog 2019-01-08 11:58:00 -08:00
Daniel Nelson 0fd08dd65a
Add a copy of the input metric when adding to aggregator (#5266) 2019-01-08 11:56:44 -08:00
Daniel Nelson 361baaa4bb
Remove empty file 2019-01-08 11:11:02 -08:00
Daniel Nelson 84139cf890
Use gofmt from Go 1.11 (#5259) 2019-01-07 17:14:07 -08:00
Daniel Nelson 0f75f3b304
Link intervals to interval section in configuation docs 2019-01-07 14:36:41 -08:00
Daniel Nelson 0ceb10e017
Rewrite configuration documentation (#5227) 2019-01-07 14:31:10 -08:00
Daniel Nelson 3621bcf5a6
Add basic unittest for templating engine 2019-01-07 14:14:00 -08:00
j2gg0s 9800779e64 Fix err in graphite parser_test (#5257) 2019-01-07 11:30:48 -08:00
hydrandt 9dc9bd653a Document response_string_match field in http_response (#5251) 2019-01-07 11:25:08 -08:00
Mark Amery 39022cd2f4 Fix typo in graylog documentation (#5253) 2019-01-07 11:05:22 -08:00
Daniel Nelson 4fd5fa006b
Allow non-tls config downloading 2019-01-04 10:40:44 -08:00
Daniel Nelson 0afa99c17b
Update changelog and supporting files for cloud_pubsub 2019-01-03 16:28:15 -08:00
emily f42d9378ba Add cloud_pubsub input plugin (#5136) 2019-01-03 16:20:07 -08:00
Daniel Nelson 3a7a40a0a4
Update Gopkg.lock 2019-01-03 16:09:07 -08:00
Daniel Nelson 206b8c9bc5
Update changelog 2019-01-03 15:58:35 -08:00
Greg 723d8f0104 Fix panic in docker input with bad endpoint (#5226) 2019-01-03 15:57:39 -08:00
Daniel Nelson 334f9267b6
Use Go 1.11.4 and 1.10.7 (#5221) 2019-01-03 12:41:16 -08:00
Greg 3c4e737f6b Add example to topk readme. Fix defaults to skip loop (#5220) 2019-01-03 12:06:56 -08:00
Daniel Nelson 10b2260daf
Update changelog 2019-01-03 11:36:45 -08:00
Daniel Nelson bd54e4a002
Update readme for varnish input 2019-01-03 11:35:13 -08:00
Kamil Szczygieł 3f158429bc Add configurable timeout to varnish input (#5214) 2019-01-03 11:33:04 -08:00
Pontus Rydin bae742ecb0 Update wavefront-sdk-go to 0.9.1 (#5223) 2019-01-03 11:30:55 -08:00
Pontus Rydin 3356f1dc82 Fix discovery race condition in vsphere input (#5217) 2019-01-03 11:30:05 -08:00
Daniel Nelson 184f7b6a8b
Update changelog 2019-01-02 13:56:56 -08:00
Daniel Nelson 4e35732279
Fix toml option names in parser processor (#5218) 2019-01-02 13:55:59 -08:00
Daniel Nelson a932cc2419
Update changelog 2019-01-02 13:55:00 -08:00
Greg bc45629b70 Allow non local udp connections in net_response (#5219) 2019-01-02 13:53:58 -08:00
Daniel Nelson d28e6aebfa
Update changelog 2019-01-02 13:13:34 -08:00
Daniel Nelson 79860be795
Update changelog 2019-01-02 13:12:29 -08:00
svenwiltink bf7a42643e Add read and write op per second fields (#5210) 2019-01-02 13:06:54 -08:00
svenwiltink df6fbdb1e8 Fix unittests for new year (#5213) 2019-01-02 11:12:04 -08:00
Daniel Nelson bf4175b9cd
Update changelog 2018-12-28 13:25:35 -08:00
Pontus Rydin 78c1ffbf27 Improve scalability of vsphere input (#5113) 2018-12-28 13:24:43 -08:00
Daniel Nelson 1d6ff4fe4c
Add link to CodeStyle wiki page in plugin guides 2018-12-28 13:02:16 -08:00
Daniel Nelson 60cbdcb416
Update changelog 2018-12-27 13:20:10 -08:00
BoheeChoi1 cb9bacfede Add forwarded records to sqlserver input (#5177) 2018-12-27 13:18:29 -08:00
Daniel Nelson 2ff3683b50
Improve config file environment variable documentation (#5200) 2018-12-27 13:12:00 -08:00
Daniel Nelson 219fad60a6
Update changelog 2018-12-27 13:10:17 -08:00
Daniel Nelson 3fbfe3acd2
Fix usage of loop variable in function closure (#5195) 2018-12-27 13:08:19 -08:00
Daniel Nelson 9a0861f7e2
Update changelog 2018-12-26 19:40:39 -08:00
Daniel Nelson dbe6f594a9
Allow floats in valuecounter aggregator (#5168) 2018-12-26 19:39:34 -08:00
Daniel Nelson c72d8a1663
Update changelog 2018-12-26 19:38:04 -08:00
Daniel Nelson 7497a2027b
Deliver empty metric tracking group immediately (#5176) 2018-12-26 19:36:10 -08:00
Daniel Nelson 72089042be
Update changelog 2018-12-26 19:10:18 -08:00
Daniel Nelson c12eecc90e
Signal telegraf process until it exits (#5169) 2018-12-26 18:54:50 -08:00
Daniel Nelson b1baa54cc4
Update changelog 2018-12-26 14:58:19 -08:00
Nic Grobler 10a067a699 Add PDH_NO_DATA to known counter error codes in win_perf_counters (#5182) 2018-12-26 14:51:31 -08:00
Greg 757132baf4 Add test for include/exclude filter (#5193) 2018-12-26 13:15:13 -08:00
Daniel Nelson acd176cf42
Update changelog 2018-12-21 11:31:44 -08:00
Pierre Tessier 9cc06702da Use wavefront sdk in wavefront output (#5161) 2018-12-21 11:26:07 -08:00
Daniel Nelson 675178f915
Update golang.org/x/sys to latest revision (#5174) 2018-12-20 12:15:40 -08:00
Daniel Nelson ce8ec24100
Document using posix acl in disk input 2018-12-20 12:12:25 -08:00
Daniel Nelson 5027a516c7
Even more fix link in grok documentation 2018-12-19 16:25:06 -08:00
Daniel Nelson 76f8d294e4
Even more fix link in grok documentation 2018-12-19 16:24:00 -08:00
Daniel Nelson 2c3fa0907e
Even more fix link in grok documentation 2018-12-19 16:22:43 -08:00
Daniel Nelson d043da1976
Fix link in grok documentation 2018-12-19 16:17:17 -08:00
Daniel Nelson 30d4088b4e
Update changelog 2018-12-19 15:53:33 -08:00
Maciej Mencner e85e6bd3e7 Fix num_remapped_pgs field in ceph plugin (#5167) 2018-12-19 15:51:24 -08:00
Daniel Nelson 9bf2ef28f5
Update changelog 2018-12-19 13:00:19 -08:00
Daniel Nelson 841860890f
Add support for basic auth to couchdb input (#5160) 2018-12-19 12:59:27 -08:00
Samuel-BF f530ca6e7c Use godirwalk in globpath (#5145) 2018-12-18 14:23:25 -08:00
Daniel Nelson 234975bcac
Update changelog 2018-12-18 14:21:50 -08:00
Daniel Nelson 544262a23a
Apply global and plugin level metric modifications before filtering (#5152) 2018-12-18 14:20:43 -08:00
Adrián López 7caa5d20af Fix invalid JSON in readme (#5158) 2018-12-18 12:21:36 -08:00
Daniel Nelson 700e6b5ed3
Update changelog 2018-12-18 11:04:02 -08:00
Leonardo Di Donato 697381d4b5 Add support for non-transparent framing of syslog messages (#5148) 2018-12-18 10:54:38 -08:00
Daniel Nelson 1334919224
Update changelog 2018-12-14 14:38:41 -08:00
Greg 6ef331efeb Add micro and nanosecond unix timestamp support to JSON parser (#5149) 2018-12-14 14:38:01 -08:00
Daniel Nelson 99b6982cde
Update changelog 2018-12-14 14:36:19 -08:00
Greg 891eff0930 Run stop logic only if required in prometheus input (#5144) 2018-12-14 14:34:05 -08:00
Ruud Bijnen 98231f8b6b Fix converter processor example (#5146) 2018-12-14 10:56:21 -08:00
Samuel-BF 8906e2796b Add size to filecount input (#4778) 2018-12-13 12:25:49 -08:00
Daniel Nelson 0485119716
Update changelog 2018-12-13 11:58:44 -08:00
Raphael Couto f794d5b08a Fix error sending empty tag value in azure monitor output (#5083) 2018-12-13 11:57:03 -08:00
Daniel Nelson 8526aa5c87
Update changelog 2018-12-13 11:51:53 -08:00
dbergmanskytap 6b5ddbbf66 Include DEVLINKS in available diskio udev properties (#5116) 2018-12-13 11:49:19 -08:00
Daniel Nelson dbea6dca30
Update changelog 2018-12-13 11:43:51 -08:00
Mark Wilkinson - m82labs 503f3ce0a6 Remove storage calculation for non Azure managed instances and add server version (#5135)
- Removed the storage calculation for SQL Server instances that are NOT Azure
  Managed Instances, this reduces the time it takes to get this data on an
  instance with a lot of databases and/or database files.
- Added the SQL Server version back to the server properties query.
2018-12-13 11:42:35 -08:00
Daniel Nelson e2ccce9e44
Update changelog 2018-12-11 19:16:08 -08:00
Daniel Nelson 4d3519756c
Add support for sending a request body to http input (#5074) 2018-12-11 19:12:00 -08:00
Daniel Nelson cf2b85f383
Add running field to procstat_lookup (#5069) 2018-12-11 19:11:33 -08:00
Lasse Karstensen d954218f75 Increase varnishstat timeout (#5130) 2018-12-11 16:57:08 -08:00
Greg Linton 4d026fce97 Set 1.9.1 release date 2018-12-11 15:59:32 -07:00
Daniel Nelson 385be709a1
Update changelog 2018-12-10 16:46:20 -08:00
Robert Fisher 04dfa430ef Allow delta metrics in wavefront parser (#5115) 2018-12-10 16:42:25 -08:00
Daniel Nelson 03a5fc9b88
Update changelog 2018-12-10 16:21:21 -08:00
Alexander Thaller 1170367dd7 Use -W flag on bsd variants in ping input (#5112) 2018-12-10 16:20:04 -08:00
Daniel Nelson 403a28d078
Update changelog 2018-12-10 16:14:59 -08:00
Greg 83bc3d1277 Improve docs to clarify common issues (#5054) 2018-12-10 16:14:20 -08:00
Greg 74d8523db6 Aggregate early metrics, rather than ignore (#5085) 2018-12-10 16:07:08 -08:00
Greg d0a6051fd7 Prevent panic when marking the offset in kafka_consumer (#5118) 2018-12-10 15:55:58 -08:00
Emmanuel Nosa Evbuomwan adce43f546 Fix grammar and typos in fluentd README.md (#5127) 2018-12-10 15:24:11 -08:00
Russ Savage d108925d81 Update license information (#5075) 2018-12-10 15:21:13 -08:00
Daniel Nelson 97d833d440
Update changelog 2018-11-30 15:01:57 -08:00
Daniel Nelson 7479352e4a
Rename interrupts cpu_as_tags to cpu_as_tag; update readme 2018-11-30 15:00:38 -08:00
Wojciech Kudla 9a637eda05 Switch CPU from field to tag in interrupts input plugin (#4999) (#5024) 2018-11-30 14:42:55 -08:00
Daniel Nelson 1d6db08dc8
Update changelog 2018-11-29 16:07:56 -08:00
Daniel Nelson 34231f6141
Update to pgx 3.2.0 (#5068) 2018-11-29 15:56:11 -08:00
Greg Volk cd9a79f5e6 Add tagdrop example for win_perf_counters (#5061) 2018-11-29 13:04:31 -08:00
Daniel Nelson d69f81ae5e
Update changelog 2018-11-29 13:00:58 -08:00
Daniel Nelson 0a506a93fe
Remove metrics from the buffer on write (#5052) 2018-11-29 12:58:48 -08:00
Daniel Nelson 9b3452a65d
Update changelog 2018-11-28 16:54:07 -08:00
Daniel Nelson fc7fba9020
Use Telegraf as value for graylog x-requested-by header 2018-11-28 16:52:40 -08:00
gurayyildirim ba612b670b Add X-Requested-By header to graylog input (#5011) 2018-11-28 16:52:03 -08:00
Daniel Nelson 2d1f97c217
Update changelog 2018-11-28 16:46:02 -08:00
Daniel Nelson 55b798bd20
Fix mongodb document stats (#5049) 2018-11-28 16:43:13 -08:00
Daniel Nelson db497a04ea
Update changelog 2018-11-28 16:30:08 -08:00
Sebastien Le Digabel 448c98d82e Add ability to tag metrics with topic in kafka_consumer (#5038) 2018-11-28 16:29:26 -08:00
Daniel Nelson 35d08b2df7
Update changelog 2018-11-28 16:21:49 -08:00
Daniel Nelson a26aaa5e03
Add support for unix_ms timestamps in csv parser. 2018-11-28 16:19:53 -08:00
Felipe Dutra Tine e Silva f9113b63b7 Add csv parser unix timestamp support (#5047) 2018-11-28 16:07:25 -08:00
Daniel Nelson 168c2b0ed1
Fix influxdb_v2 link in readme 2018-11-28 12:10:51 -08:00
Mauro Murari 9bc92c5c75 Fix server connection info in mongodb input (#5048) 2018-11-27 17:45:23 -08:00
Daniel Nelson 1279db1a8f
Update changelog 2018-11-27 17:27:28 -08:00
Jeppe Fihl-Pearson 6d2fb0027c Set default config values in jenkins input (#5046) 2018-11-27 17:26:22 -08:00
Daniel Nelson 581772a6a5
Update changelog 2018-11-21 17:45:14 -08:00
Lance O'Connor 85ee354255 Fix boolean handling in splunkmetric serializer (#5008) 2018-11-21 17:43:42 -08:00
Daniel Nelson f57b019e22
Fix link to http_listener_v2 2018-11-20 15:23:14 -08:00
Daniel Nelson c35d124f78
Set 1.9 release date 2018-11-20 11:14:09 -08:00
Daniel Nelson 65ce9d6d86
Update changelog 2018-11-19 13:23:22 -08:00
Pierre Fersing 0772076378 Allow for force gathering ES cluster stats (#4345) 2018-11-19 11:53:09 -08:00
Greg 9c9511bde9 Be specific about required csv header definition (#5007) 2018-11-19 11:27:21 -08:00
Daniel Nelson 7a779a7550
Update changelog 2018-11-16 10:53:09 -08:00
Greg d8e3c1d434 Prevent panic in influxdb_listener (#4997) 2018-11-16 10:51:06 -08:00
Daniel Nelson 17079288af
Update changelog 2018-11-15 15:50:00 -08:00
Daniel Nelson 140387d2c3
Log warning when wireless plugin is used on unsupported platform (#4986) 2018-11-15 15:45:56 -08:00
Greg 46b340c899 Handle non-tls columns for mysql input (#4973) 2018-11-15 15:45:18 -08:00
Greg 91ecec71ea Only print final collection when runing --test (#4991) 2018-11-15 15:44:36 -08:00
Daniel Nelson 274af39a5e
Update kubernetes input docs (#4990) 2018-11-15 15:43:47 -08:00
Daniel Nelson d886055f67
Update telegraf_windows.conf 2018-11-14 12:06:23 -08:00
Daniel Nelson b6fd7c5aab
Add troubleshooting section to disk input README 2018-11-14 11:40:11 -08:00
Daniel Nelson edeb21c3cc
Update Gopkg.lock with current revisions 2018-11-13 13:53:57 -08:00
Daniel Nelson 56f2c435e7
Add udp url note to influxdb output sample config 2018-11-12 16:06:23 -08:00
Ivan Vandot 41c8fd7e93 Clarify UDP influxdb endpoint (#4974) 2018-11-12 16:05:28 -08:00
Daniel Nelson fbd3e7887a
Update dovecot readme 2018-11-09 16:43:15 -08:00
Grace Do 625a1ca8fa Use fieldsCopy in testutil.Accumulator AddFields (#4970) 2018-11-09 10:59:33 -08:00
Mark Rushakoff d67eb46c3d Remove mistakenly committed file (#4969) 2018-11-09 10:23:53 -08:00
Daniel Nelson f1758489bb
Update changelog 2018-11-06 14:27:41 -08:00
Pontus Rydin 2d782fbaac Fix potential missing datastore metrics in vSphere plugin (#4968) 2018-11-06 14:22:43 -08:00
Daniel Nelson 0e07bbb877
Fix option names in json parser docs 2018-11-05 17:15:07 -08:00
Daniel Nelson 7693c173fc
Update changelog and readme 2018-11-05 14:58:23 -08:00
Daniel Nelson f533d3b370
Bump version in build.py 2018-11-05 14:55:10 -08:00
Daniel Nelson cb84993b7e
Update telegraf.conf 2018-11-05 14:55:10 -08:00
Daniel Nelson 574fa5a6be
Add support for fetching config over https (#4637) 2018-11-05 14:19:46 -08:00
kelwang 3b0cee346c Add jenkins input plugin (#4289) 2018-11-05 14:19:08 -08:00
Daniel Nelson 7166833364
Update changelog 2018-11-05 13:52:14 -08:00
Daniel Nelson 6e5c2f8bb6
Remove outputs blocking inputs when output is slow (#4938) 2018-11-05 13:34:28 -08:00
Greg 74667cd681 Fix toml struct tag in win_service #4811 (#4936) 2018-11-05 13:33:02 -08:00
Daniel Nelson 6120c65a5a
Update changelog 2018-11-05 13:31:39 -08:00
Greg 9c866553e8 Add scraping for Prometheus endpoint in Kubernetes (#4920) 2018-11-05 13:30:16 -08:00
Daniel Nelson 19a338b922
Update to source tag in nginx_vts readme 2018-11-02 18:23:41 -07:00
Daniel Nelson 715a7cc670
Add nginx_vts plugin to changelog and readme 2018-11-02 18:20:37 -07:00
Aleksejs Sinicins 9a864d11d2 Add nginx-module-vts input plugin. (#3782) 2018-11-02 18:18:40 -07:00
Daniel Nelson 2ff2d03389
Update changelog 2018-11-02 17:58:33 -07:00
Daniel Nelson ad320ac1e0
Remove the time_key from the field values in JSON parser (#4951) 2018-11-02 17:53:45 -07:00
Daniel Nelson 02ad1f46be
Update changelog 2018-11-02 17:53:10 -07:00
Greg ddcbfe79bb Allow connecting to prometheus via unix socket (#4798) 2018-11-02 17:51:40 -07:00
Greg ad5fcf8efb Improve error description in influxdb_v2 output (#4952) 2018-11-02 17:50:55 -07:00
Daniel Nelson 9035505e08
Update changelog 2018-11-02 12:08:05 -07:00
Pontus Rydin 69170d24bc Add LUN to datasource translation in vsphere input (#4934) 2018-11-02 12:05:28 -07:00
Daniel Nelson 2a9bef64ae
Update opensmtpd readme 2018-11-02 11:00:47 -07:00
Daniel Nelson f0f99d18e0
Update ipvs readme 2018-11-02 10:59:14 -07:00
Akshay Moghe 1ec6c8e333 Add metrics for real servers to ipvs (#4929) 2018-11-02 10:48:43 -07:00
Dylan Khor 7fa4db0795 Fix broken link to vSphere METRICS.md (#4945) 2018-11-01 12:25:27 -07:00
Greg Linton d2717f78f2 Set 1.8.3 release date 2018-10-30 15:10:48 -06:00
Beaujolais ! 69d21a5876 Fix version check in postgresql_extensible (#4866) 2018-10-30 15:06:47 -06:00
Greg 0003c8fba7
Don't add unserializable fields to jolokia2 input (#4930) 2018-10-30 15:06:05 -06:00
Greg d0e6da5eba
Handle panic when ipmi_sensor input gets bad input (#4937) 2018-10-30 15:05:41 -06:00
Greg 563b6766ce
Log the correct error in jti_openconfig (#4901) 2018-10-30 15:05:18 -06:00
Daniel Nelson 9fcd279b7e
Run gofmt with Go 1.10 2018-10-29 16:12:37 -07:00
Daniel Nelson f38da90329
Run `make fmt` with Go 1.11 2018-10-29 16:00:54 -07:00
Daniel Nelson 454c3be2d2
Update changelog and readme 2018-10-29 15:59:37 -07:00
James Maidment b24e03b597 Add wireless input plugin (#3847) 2018-10-29 15:57:39 -07:00
Daniel Nelson c304dd98bf
Update changelog 2018-10-25 23:52:15 -07:00
Marcos Nils 742a74dcf0 Use default partition key when tag does not exist in kinesis output (#4904) 2018-10-25 23:51:14 -07:00
Daniel Nelson 170cddc956
Update changelog 2018-10-25 23:39:13 -07:00
Greg 21208d2686 Prevent connection leak by closing unused connections in amqp output (#4924) 2018-10-25 23:37:18 -07:00
Daniel Nelson 133fabc672
Update ipvs readme for style 2018-10-25 12:44:43 -07:00
Daniel Nelson 3821d67083
Update changelog and readme 2018-10-25 12:42:19 -07:00
Daniel Nelson 3374c7583d
Update license of dependencies list 2018-10-25 12:38:27 -07:00
Daniel Nelson ed417882f3
Update Gopkg.lock by running `dep ensure` 2018-10-25 12:26:35 -07:00
Akshay Moghe b88436c9d7 Add IPVS input plugin (#4890) 2018-10-25 12:14:19 -07:00
Daniel Nelson 600b468db2
Update changelog 2018-10-24 15:04:18 -07:00
Mikhail Leonov 67cd2888db Collect additional stats in memcached input (#4914) 2018-10-24 15:02:44 -07:00
Daniel Nelson 8d0ec993c7
Update changelog and add basic nsq input readme 2018-10-22 17:55:40 -07:00
Soulou 12279042d3 Add support for TLS configuration in NSQ input (#3903) 2018-10-22 17:50:32 -07:00
Daniel Nelson 2e59e4dd6c
Add deprecation version for MetricBuffer 2018-10-22 17:16:24 -07:00
Daniel Nelson 100d11f24e
Remove unused cruft 2018-10-22 17:15:57 -07:00
Daniel Nelson 55f3645e8c
Update changelog 2018-10-22 12:57:24 -07:00
Bugagazavr ff98ad710b Add Nginx Plus API input (#4837) 2018-10-22 12:54:50 -07:00
Daniel Nelson 2f7450ec04
Document units of filestat modification time 2018-10-22 12:41:37 -07:00
Trevor Pounds ee056278f5 Enable gofmt code simplification (#4887) 2018-10-19 13:32:54 -07:00
Daniel Nelson 4a311830c6
Update changelog 2018-10-19 11:18:30 -07:00
Samuel-BF 589d0587f6 Add ability to specify bytes options as strings with units (KB, MiB, ...) (#4852) 2018-10-19 11:17:18 -07:00
Trevor Pounds 17360f079c Fix spelling mistakes (#4888) 2018-10-19 11:12:01 -07:00
Trevor Pounds 1ec12ba6ad Add Go 1.11 CI support (#4859) 2018-10-19 11:01:31 -07:00
Daniel Nelson 42483b39ec
Update changelog 2018-10-18 23:39:18 -07:00
Daniel Nelson 1af2cf902c
Add new DN tags to x509_cert readme 2018-10-18 23:34:59 -07:00
Onur Güzel d33116381b Add certificate distinguished name as a tags in x509_cert input (#4873) 2018-10-18 23:32:43 -07:00
Daniel Nelson b9107641ec
Regenerate telegraf.conf 2018-10-18 23:27:27 -07:00
Daniel Nelson f5af2ab799
Remove dead link from logparser sampleconfig and fix syntax (#4883) 2018-10-18 23:26:42 -07:00
Trevor Pounds ecaaa20ed0 Update CI to Go 1.10.4 (#4860) 2018-10-18 15:45:18 -07:00
Daniel Nelson fb435b2fa5
Update changelog 2018-10-18 13:07:33 -07:00
Trevor Pounds 136a5724bd Use DescribeStreamSummary in place of ListStreams in kinesis output (#4864) 2018-10-18 13:05:43 -07:00
Dirk Pahl 7cb75ca979 Add more detailed descriptions for fields in swap input (#4763) 2018-10-18 12:59:03 -07:00
Greg Linton 3202bcdf19 Set 1.8.2 release date 2018-10-17 13:30:11 -06:00
Greg Linton 42fa8f437b Update changelog 2018-10-17 13:02:46 -06:00
Greg 6e8b7e3cc6 Fix panic in logparser input (#4849) 2018-10-17 13:02:03 -06:00
Fred Cox 48745c3171 Fix segfault in x509_cert (#4874) 2018-10-17 12:46:44 -06:00
Greg f10de93da4
Return correct response code on ping input (#4875) 2018-10-17 12:46:00 -06:00
Daniel Nelson cd865cfd22 Lower authorization errors to debug level in mongodb input (#4869) 2018-10-17 12:44:48 -06:00
Daniel Nelson 106f5b5ca8
Update changelog 2018-10-16 12:23:05 -07:00
James Maidment 0b601513a2 Add stackdriver output plugin (#3876) 2018-10-16 11:47:10 -07:00
timhallinflux ef848b4924 Update License (#4865) 2018-10-16 11:05:58 -07:00
Daniel Nelson 36193aea1b
Update changelog 2018-10-15 13:05:46 -07:00
Daniel Nelson 152365ae06
Rework mqtt_consumer connect/reconnect (#4846) 2018-10-15 13:03:52 -07:00
Samuel-BF f259229a35 Improve performance of globpath with some patterns (#4836) 2018-10-12 14:48:11 -07:00
Daniel Nelson a2ac9115b3
Update changelog 2018-10-12 14:45:04 -07:00
Greg 9cc534c624 Prevent panic if fileinfo is nil (#4850) 2018-10-12 14:43:06 -07:00
Daniel Nelson d3078ec9d8
Update changelog 2018-10-12 14:40:51 -07:00
Daniel Nelson 38e644ff12
Support uint fields in aerospike input (#4851) 2018-10-12 14:37:30 -07:00
Daniel Nelson 27bd51b9ac
Use container name from list if no name in container stats (#4854) 2018-10-12 14:36:55 -07:00
Daniel Nelson 37fd99abb9
Comment optional fields in http_listener sample config 2018-10-12 14:31:08 -07:00
Daniel Nelson 2d8cda02df
Rename http_listener to influxdb_listener 2018-10-12 14:31:08 -07:00
Julius Marozas 0bb264536f Add http_listener_v2 input input plugin (#4755) 2018-10-12 13:40:17 -07:00
Erwan Quélin 65f7e988bb Enhancement of README.md for the vSphere input plugin. (#4788) 2018-10-11 15:42:43 -07:00
Daniel Nelson 0049e01d69
Update changelog 2018-10-11 13:08:57 -07:00
Pontus Rydin c117ed624d Fix missing timeouts in vsphere input (#4840) 2018-10-11 13:08:09 -07:00
Daniel Nelson bde73d8328
Update changelog 2018-10-11 12:26:13 -07:00
Kevin Conaway 44fd74d688 Add telegraf version to User-Agent header (#4838)
Header is added in influxdb, influxdb_v2, and http outputs.
2018-10-11 12:25:21 -07:00
kostya-sh 502d9ab499 Fix TestGatheringTimeout test for dns_query plugin (#4842) 2018-10-11 12:15:17 -07:00
Daniel Nelson 8a03a21de2
Place docker files in scripts and update makefile 2018-10-11 00:57:00 -07:00
Jonathan A. Sternberg eece559fe7 Add a Dockerfile that matches influxdata-docker to build images from source (#4793)
The images in influxdata-docker are meant to be built by downloading
official releases. Sometimes, it is useful to build directly from source
when you need an unofficial release. These images are meant to be used
then using multi-stage builds so that it can build from source and then
copy the results to images that match the official counterpart.
2018-10-10 18:38:43 -07:00
kelwang a0eee37ed2 Fix grammar in influxdb_v2 sample config (#4815) 2018-10-10 18:34:32 -07:00
kostya-sh 7344693ca8 Fix hang in dns_query plugin (#4841) 2018-10-10 18:29:33 -07:00
Daniel Nelson a6b5f2c093
Document that taginclude/tagexclude can remove ANY tag (#4847) 2018-10-10 18:06:24 -07:00
Daniel Nelson a777fdda1e
Update changelog 2018-10-10 15:54:37 -07:00
Greg b075686400 Update write path to match updated InfluxDB v2 API (#4844) 2018-10-10 15:53:01 -07:00
Kevin Conaway 7bb219222a Add internal function for telegraf version (#4828) 2018-10-09 13:45:07 -07:00
Daniel Nelson 709eadffc4
Move nvidia-smi Windows docs into config section 2018-10-08 12:57:47 -07:00
Alex 0d2dcc2dc3 Add Windows nvidia-smi bin_path to readme (#4819) 2018-10-08 12:55:33 -07:00
Nicolás Alvarez 3579d1d1d4 Fix formatting in net plugin docs (#4818) 2018-10-05 19:03:15 -07:00
Daniel Nelson 25d40c2849
Update changelog 2018-10-05 15:08:01 -07:00
Mihai Todor f3da717a88 Add entity-body compression to http output (#4807) 2018-10-05 15:06:41 -07:00
Daniel Nelson fafe9d30bf
Update changelog 2018-10-05 14:44:20 -07:00
Kevin Conaway 34caf12db5 Add an option to specify a custom datadog URL (#4800) 2018-10-05 13:51:16 -07:00
Kevin Conaway 422c142463 Use non-allocating field and tag accessors in datadog output (#4803) 2018-10-05 13:48:18 -07:00
Lee Jaeyong 030f944505 Add per-directory file counts in the filecount input (#4752) 2018-10-05 12:55:23 -07:00
pytimer f81696b6b5 Add windows service name lookup to procstat input (#4811) 2018-10-05 11:14:44 -07:00
Daniel Nelson db3967eb97
Add missing processors to readme 2018-10-04 13:24:41 -07:00
Mihai Todor 5d31c04e94 Fix linter contributing guidelines (#4806) 2018-10-04 11:47:49 -07:00
Daniel Nelson 6bf5643351
Update changelog 2018-10-03 18:20:37 -07:00
Rudy a1f9f63463 Add new config for csv column explicit type conversion (#4781) 2018-10-03 18:19:44 -07:00
Rodney Gitzel 9efe7c12f0 Expand documentation of 'qos' configuration in mqtt_consumer input (#4784) 2018-10-03 17:21:30 -07:00
Greg Linton 927cac0074 Update changelog 2018-10-03 17:35:48 -06:00
Daniel Nelson 4898edbb2d
Increment timestamp by one second in multi metric tests
This avoids accidentally triggering tsMod time adjustments in certain
timezones.
2018-10-03 15:11:59 -07:00
Greg Linton e6c98e5ce0 Set 1.8.1 release date 2018-10-03 14:06:04 -06:00
Daniel Nelson c3bab78ea8 Fix case of timezone/grok_timezone options. (#4799) 2018-10-03 13:58:21 -06:00
Daniel Nelson 8500d9345f
Update changelog 2018-10-03 12:04:06 -07:00
Pontus Rydin 21b488a3d3 Use server time to fix missing non-realtime samples in vsphere (#4791) 2018-10-03 12:02:06 -07:00
Daniel Nelson b9c64df5fc
Update changelog 2018-10-01 18:29:00 -07:00
Daniel Nelson 5101f075e1
Skip tags with empty values in cloudwatch output (#4785) 2018-10-01 18:27:44 -07:00
Daniel Nelson 798ce7e88f
Update changelog 2018-10-01 17:40:28 -07:00
Lee Jaeyong 86b2145272 Add support for IPv6 in the ping plugin (#4703) 2018-10-01 17:38:13 -07:00
Daniel Nelson 2bb7ddd0b6
Update changelog 2018-10-01 16:16:19 -07:00
Greg 11baebd6c9 Unify http_listener error response with influxdb (#4766) 2018-10-01 16:14:54 -07:00
Pontus Rydin 797fbf7215 Add UUID to VMs in vSphere input (#4769) 2018-10-01 16:13:32 -07:00
Daniel Nelson 5ec50b28ed
Update syslog documentation 2018-10-01 16:01:18 -07:00
Daniel Nelson a63c0dda94
Add not about RFC3164 to syslog input readme 2018-10-01 12:02:28 -07:00
Daniel Nelson f712e63a89
Add full list of parsers and serializers to README 2018-10-01 11:01:29 -07:00
Daniel Nelson 07c5f39c5b
Add wavefront parser to 1.8 changelog 2018-10-01 10:55:50 -07:00
Daniel Nelson 7553c8fd13
Remove metric recreation when filtering (#4767) 2018-09-28 14:48:20 -07:00
Daniel Nelson cc64b14ab4
Update changelog 2018-09-27 18:42:13 -07:00
Lee Jaeyong 6b7d64f1d6 Add ability to define a custom service name when installing as a Windows service (#4753) 2018-09-27 18:41:24 -07:00
Daniel Nelson 008ee617cb
Update changelog. 2018-09-27 17:55:31 -07:00
Pontus Rydin c369c1989f Fix panic during network error in vsphere input (#4765) 2018-09-27 17:29:17 -07:00
Lee Jaeyong 7d97ae6421 Query servers in parallel in dns_query input (#4754) 2018-09-27 17:26:36 -07:00
Daniel Nelson af0ef55c02
Fix license type for go-ole 2018-09-27 10:10:27 -07:00
Daniel Nelson c47a75ae53
Update changelog 2018-09-26 19:31:43 -07:00
Bo Zhao 8cbd39501b Add replace function to strings processor (#4686) 2018-09-26 19:30:02 -07:00
Daniel Nelson 0a8301ec3c
Update changelog 2018-09-26 19:27:31 -07:00
Greg 2e2e998ebd Don't add tags with empty values to opentsdb output (#4751) 2018-09-26 19:26:23 -07:00
Daniel Nelson d70c80722d
Update changelog 2018-09-26 19:17:55 -07:00
Onur Güzel a21524c6b3 Add hostname to TLS config for SNI support (#4747) 2018-09-26 19:16:39 -07:00
Lee Jaeyong a086ea6989 Use time.AfterFunc to avoid need for goroutine in WaitTimeout (#4702) 2018-09-26 19:15:38 -07:00
Daniel Nelson 358920e6ba
Update changelog 2018-09-26 19:09:53 -07:00
Daniel Nelson 54e61aa78a
Use FieldList in basicstats to improve performance (#4741) 2018-09-26 19:08:46 -07:00
Daniel Nelson 38e5e103ce
Clarify platform support for temp input (#4756) 2018-09-26 19:05:55 -07:00
Daniel Nelson 74e9d1f078
Update changelog 2018-09-26 19:04:21 -07:00
Tracy Boggiano 69f6612c2a Fix hardware_type may be truncated in sqlserver input (#4750) 2018-09-26 19:02:29 -07:00
Daniel Nelson f72e52528d
Fix dep check errors in Gopkg.lock 2018-09-24 15:35:33 -07:00
JP Mens 05c9197aaf Fix grammar in exec input readme (#4740) 2018-09-24 13:41:12 -07:00
JP Mens 1a437e5690 Clarify monitoring backend provenance (#4739) 2018-09-24 12:13:36 -07:00
Daniel Nelson 54b7262228
Update changelog 2018-09-21 16:11:36 -07:00
Greg 4c9c31c34f Fix panic if JSONNameKey is not found (#4735) 2018-09-21 15:47:41 -07:00
Daniel Nelson 146a30e065
Clarify output format for splunkmetric 2018-09-21 15:12:49 -07:00
Greg Linton d07bbe24e3 Update link in graphite serializer README 2018-09-21 15:05:36 -07:00
Daniel Nelson 403ed001bf
Add version to the influxdb output plugins readme 2018-09-21 13:07:12 -07:00
Gunnar 85db54c2f2 Add note about docker socket permissions (#4724) 2018-09-21 12:39:37 -07:00
Greg e08c975fbd Fix rune conversion in csv parser (#4728) 2018-09-21 12:39:05 -07:00
Tracy Boggiano adf2668c1d Fix forwarded records and offline state in sqlserver input (#4730) 2018-09-21 12:18:27 -07:00
Greg 3349b53905 Rename vsphere markdown files (#4733) 2018-09-21 11:17:09 -07:00
Simon Murray a55e141264 Use typed struct instead of type assertions in Ceph Input Plugin (#4721) 2018-09-20 15:05:47 -07:00
Daniel Nelson fe0b964d3e
Document that proc/agg/outputs are not run as part of --test 2018-09-20 15:00:05 -07:00
Daniel Nelson 1e3e28428d
Clean up csv_trim_space after building parser config 2018-09-20 12:55:58 -07:00
Lee Jaeyong dfe8e3b473 Fix config file types of csv_skip_rows and csv_skip_columns (#4726) 2018-09-20 12:43:39 -07:00
Leandro Piccilli 820d1afa2e Fix changelog and add Kibana input plugin to README (#4718) 2018-09-19 18:23:58 -07:00
Daniel Nelson dab6ed7d8f
Update sample telegraf.conf 2018-09-18 18:15:10 -07:00
Daniel Nelson a75c789e3e
Remove warning not to set flush_interval below interval 2018-09-18 18:13:20 -07:00
Daniel Nelson 448f92be1d
Update changelog 2018-09-18 09:25:38 -07:00
Daniel Nelson b5299f4cc4
Fix cleanup of csv parser options, use per file parser (#4712) 2018-09-18 09:23:45 -07:00
Greg 1d76343422 Enhance performance data for nagios parser (#4691) 2018-09-18 09:08:46 -07:00
Greg d3ad591481 Fix null value crash in postgresql_extensible input (#4689) 2018-09-18 09:08:13 -07:00
Daniel Nelson f05fdde48b
Remove the startup authentication check from the cloudwatch output (#4695) 2018-09-18 09:07:28 -07:00
Daniel Nelson 77f669344b
Exclude Windows WMI tests from -short tests 2018-09-17 18:00:12 -07:00
Lee Jaeyong 44c2435f64 Support tailing files created after startup in tail input (#4704) 2018-09-17 16:20:50 -07:00
Daniel Nelson 41d528c8ce
Split parser/serializer docs (#4690) 2018-09-17 11:45:08 -07:00
Greg Linton 96f3d7def4 Update telegraf.conf 2018-09-12 16:08:19 -06:00
Daniel Nelson 634762b739
Update changelog 2018-09-12 14:50:53 -07:00
Greg 1fdf032db0 Add influx v2 output plugin (#4645) 2018-09-12 14:48:59 -07:00
Gunnar Aasen 71aaa844f5 Update Azure Monitor README 2018-09-12 12:05:20 -07:00
Daniel Nelson 37fefa300b
Remove non-existant option from sample config 2018-09-12 11:53:25 -07:00
Daniel Nelson 436dfdb44a
Update changelog 2018-09-12 11:48:54 -07:00
dangeist 6361fd3774 Allow alternate binaries for iptables input plugin. (#4682) 2018-09-12 11:47:45 -07:00
Daniel Nelson bcb65a5ee8
Update changelog 2018-09-12 11:40:43 -07:00
Thanabodee Charoenpiriyakij 9c9a5f8438 Use sarama version 1.18.0 to support Kafka 2.0 (#4676) 2018-09-12 11:39:21 -07:00
Pontus Rydin a84ca7bcdb Remove call to View.Destroy() that causes errors to be logged by vCenter (#4684) 2018-09-12 11:06:38 -07:00
Greg 9bd14b283f Add support for couchdb 2.0+ API (#4654) 2018-09-12 01:03:59 -07:00
Daniel Nelson 1aa969aabc
Use separate mutexes for write and aggregation in running_output 2018-09-12 00:23:50 -07:00
Daniel Nelson 94566098cc
Update changelog 2018-09-11 18:51:58 -07:00
Mark Wilkinson - m82labs b43165f2d8 Improve Azure Managed Instance support + more in sqlserver input (#4642) 2018-09-11 18:47:30 -07:00
Daniel Nelson 6a60e3f9ff
Update changelog 2018-09-11 16:08:22 -07:00
Daniel Nelson 4c571d2cfa
Log access denied opening a service at debug level (#4674) 2018-09-11 16:04:16 -07:00
Daniel Nelson eff7f0f083
Use operation subtables in enum and rename processors (#4672) 2018-09-11 16:03:47 -07:00
Daniel Nelson 9d72d078a3
Add new fields to mem input readme 2018-09-11 15:15:45 -07:00
Daniel Nelson d4a74337fa
Update changelog 2018-09-11 15:00:21 -07:00
Jon McKenzie 03a119e322 Align metrics window to interval in cloudwatch input (#4667) 2018-09-11 14:59:39 -07:00
Daniel Nelson 51bb937fdd
Update changelog and readme 2018-09-11 14:57:07 -07:00
Pontus Rydin 5f3c331f79 Add input plugin for VMware vSphere (#4141) 2018-09-11 14:53:46 -07:00
Daniel Nelson fa1c572096
Add link to line protocol in data fromat docs 2018-09-11 13:52:13 -07:00
Daniel Nelson 85c004bb05
Fix documentation link 2018-09-11 13:38:57 -07:00
Daniel Nelson 5444613228
Update changelog 2018-09-11 13:22:07 -07:00
Lance O'Connor c80aab0445 Add Splunk Metrics serializer (#4339) 2018-09-11 13:01:08 -07:00
Jesse e85a9e0956 Add Zookeeper Jolokia2 example config (#4659) 2018-09-10 19:32:12 -07:00
Daniel Nelson c0485a50ee
Update changelog 2018-09-10 16:46:39 -07:00
Greg ed28cfb9f6 Add means to specify server password for redis input (#4669) 2018-09-10 16:45:36 -07:00
Daniel Nelson 23a8498963
Fix locking if output is an AggregatingOutput 2018-09-10 15:14:14 -07:00
Daniel Nelson 3618f5dc98
Update changelog 2018-09-10 12:34:05 -07:00
Greg eb36e8f496 Add options for basic auth to haproxy input (#4657) 2018-09-10 11:56:42 -07:00
Daniel Nelson 1ca17652cd
Fix parsing and documentation for json_string_fields (#4656) 2018-09-10 11:55:08 -07:00
Greg 4ef058c120 Document all supported cli arguments (#4655) 2018-09-10 11:53:04 -07:00
pytimer 25f9cc0b8d Add temp input plugin (#4411) 2018-09-10 11:52:15 -07:00
Alexander Shepelin 69100f60b8 Add Beanstalkd input plugin (#4272) 2018-09-10 11:51:03 -07:00
Daniel Nelson 710c101fe0
Undeprecate logparser
Until dynamic file tailing can be added to the tail plugin.
2018-09-07 16:13:46 -07:00
Greg Linton 5b5b2e3b39 Update changelog 2018-09-06 18:47:07 -06:00
Greg e9eeda555e
Reset/flush saved contents from bad metric (#4646) 2018-09-06 18:45:40 -06:00
David Reniz cd4c4e7fbd Added Unix epoch timestamp support for JSON parser (#4633) 2018-09-06 18:44:33 -06:00
Daniel Nelson 50a82c6957
Update changelog 2018-09-06 10:55:05 -07:00
Vikrant 091af7e645 Add OAuth2 support to HTTP output plugin (#4536) 2018-09-06 10:54:05 -07:00
Daniel Nelson 54f28eefa9
Make dep check happy 2018-09-05 18:47:13 -07:00
Daniel Nelson d73fe7bced
Update changelog 2018-09-05 15:17:50 -07:00
Daniel Nelson 433454aa3c
Fix go fmt issue 2018-09-05 15:15:54 -07:00
bsmaldon d6467e966f Add strings processor (#4476) 2018-09-05 15:13:29 -07:00
Daniel Nelson 12ff8bb5e0
Fix link in readme 2018-09-05 14:58:13 -07:00
Daniel Nelson 9ec7f749aa
Update changelog and readme 2018-09-05 14:57:20 -07:00
Gunnar f70d6519e7 Add Azure Monitor output plugin (#4089) 2018-09-05 14:50:32 -07:00
Andrew a47149765e Add queue_durability parameter to amqp_consumer input (#4628) 2018-09-05 14:27:52 -07:00
Olli Janatuinen 13029a1fa4 Corrected application insights example config (#4635) 2018-09-05 14:19:56 -07:00
Daniel Nelson c7e2945a46
Fix exchange_durability sample config in amqp output 2018-09-04 13:21:58 -07:00
Daniel Nelson 87b8141d13
Make influxdb output log message style more consistent 2018-09-04 13:19:54 -07:00
Daniel Nelson ab058b396f
Update changelog 2018-09-01 19:01:02 -07:00
Vlasta Hajek 90b4a1e435 Fix instance and object name in performance counters with backslashes (#4572) 2018-09-01 18:59:03 -07:00
Daniel Nelson ca9505a3b1
Update ping input readme 2018-08-31 13:59:30 -07:00
Daniel Nelson e7b50384cf
Update changelog 2018-08-29 19:12:38 -07:00
Ayrdrie 5420e13f14 Fix divide by zero in logparser input (#4338) 2018-08-29 19:11:13 -07:00
Daniel Nelson f6b08df163
Set 1.7.4 release date 2018-08-29 13:20:49 -07:00
Daniel Nelson 687ef23596
Update changelog 2018-08-29 12:31:43 -07:00
Daniel Nelson 7b05993a6e
Fix sending of basic auth credentials in http output (#4609) 2018-08-29 12:28:29 -07:00
Daniel Nelson 8b2d64585d
Use the correct GOARM value in the armel package (#4608) 2018-08-29 12:28:00 -07:00
Daniel Nelson 59a64651f1
Update changelog 2018-08-29 11:43:14 -07:00
Daniel Nelson fed959531c
Remove timeout deadline for udp syslog input. (#4605) 2018-08-29 11:39:10 -07:00
Daniel Nelson 1e3edbc55d
Ensure channel closed if an error occurs in cgroup input (#4606) 2018-08-29 11:38:40 -07:00
Daniel Nelson 3adcc3a93d
Update changelog 2018-08-27 14:48:09 -07:00
Daniel Nelson e2b1a6bc89
Add read_buffer_size option to statsd input (#4598) 2018-08-27 14:47:04 -07:00
Daniel Nelson 61e5d500ba
Add metric requirements to docker README 2018-08-27 13:06:27 -07:00
Daniel Nelson d3061520f4
Update changelog 2018-08-24 16:41:51 -07:00
maxunt 889745a112 Add csv parser (#4439) 2018-08-24 16:40:41 -07:00
Daniel Nelson 80346b2e93
Update prometheus output sample config and README 2018-08-24 16:37:11 -07:00
Daniel Nelson ff66a9de69
Update changelog 2018-08-24 14:59:51 -07:00
Leandro Piccilli 3d84cee872 Add Kibana input plugin (#4585) 2018-08-24 14:58:41 -07:00
Daniel Nelson 1beb3e73e6
Update changelog 2018-08-24 10:23:15 -07:00
Tracy Boggiano 0785821a80 Add forwarded records to sqlserver input (#4571) 2018-08-23 16:59:21 -07:00
Daniel Nelson c827017711
Update changelog 2018-08-23 13:52:55 -07:00
prashanthjbabu 14d9ef4f0c Add result_code value for errors running ping command (#4550) 2018-08-23 13:50:19 -07:00
Daniel Nelson d676381a04
Update changelog 2018-08-23 13:32:18 -07:00
rbrendler 16a6feda4a Fix burrow_group.offset calculation for Burrow plugin (#4584) 2018-08-23 13:30:59 -07:00
Daniel Nelson 36959abce9
Fix toml error in converter processor README 2018-08-23 13:11:39 -07:00
Daniel Nelson 2b026374ec
Update kafka_consumer sample config in README 2018-08-23 11:46:41 -07:00
Daniel Nelson 545b59f12e
Update changelog 2018-08-22 19:28:47 -07:00
maxunt 2729378b7f Add name, time, path and string field options to JSON parser (#4351) 2018-08-22 19:26:48 -07:00
Daniel Nelson d6d6539e26
Update changelog 2018-08-22 19:13:46 -07:00
LABOUARDY Mohamed e72fab7cbe Add Icinga2 input plugin (#4559) 2018-08-22 19:10:40 -07:00
Daniel Nelson a8496f87b2
Fix example input and output in parser processor docs 2018-08-22 18:38:07 -07:00
Daniel Nelson 2ac06f5df0
Update changelog 2018-08-22 16:31:23 -07:00
Ayrdrie 9f8de25e0e Add parser processor (#4551) 2018-08-22 16:28:50 -07:00
Ayrdrie e893dc38a2 Add logfmt parser (#4539) 2018-08-22 13:55:41 -07:00
Daniel Nelson 430d7103da
Update changelog 2018-08-21 12:45:13 -07:00
Daniel Nelson d2cf9a7157
Add support for static and random routing keys in kafka output (#4579) 2018-08-21 12:44:10 -07:00
estk edb6e1f655 Implement a lock based ring buffer for internal/buffer. (#3377) 2018-08-20 13:47:48 -07:00
Daniel Nelson 036981c3b5
Update changelog 2018-08-17 13:52:10 -07:00
Daniel Nelson 886d8cc840
Drop message batches in kafka output if too large (#4565) 2018-08-17 13:51:21 -07:00
Daniel Nelson 1fafa616d7
Update changelog 2018-08-17 13:46:35 -07:00
maxunt 9e0eb0c0e0 Add ability to set measurement from matched text in grok parser (#4433) 2018-08-17 13:45:22 -07:00
Daniel Nelson 34614582a7
Use snake case in kafka output config 2018-08-15 14:12:22 -07:00
Mauro Murari 61513c64b8
Add message 'max_bytes' configuration (#4537) 2018-08-15 14:05:26 -07:00
Greg Linton 2395413cc8 Update changelog 2018-08-14 15:56:48 -06:00
Daniel Nelson 6e92df45e7 Use dep v0.5.0 (#4542) 2018-08-14 15:55:38 -06:00
Greg Linton b29dd260b2 Update changelog 2018-08-14 14:54:19 -06:00
Adrián López e50b0c17ad Document how to parse telegraf logs (#4285) 2018-08-14 14:53:25 -06:00
Greg Linton 027016aea2 Update changelog 2018-08-14 14:41:24 -06:00
Daniel Nelson fa30f568ec Skip unserializable metric in influxDB UDP output (#4534) 2018-08-14 14:36:29 -06:00
dupondje 763dc6990c Fix powerdns input test (#4554) 2018-08-14 14:35:39 -06:00
Greg Linton 3268937c47 Update changelog 2018-08-13 17:47:09 -06:00
shrug42 6ad5089361 Add gopsutil meminfo fields to mem plugin (#4546) 2018-08-13 17:41:23 -06:00
Harry Schmidt 7ca7f22e50 Add rename processor (#4528) 2018-08-13 17:38:46 -06:00
Pierre Tessier 6454319062 Add Wavefront parser (#4402) 2018-08-13 17:37:06 -06:00
LABOUARDY Mohamed b9ff1d042b Add ActiveMQ input plugin (#2689) 2018-08-13 17:34:59 -06:00
Daniel Nelson 31e1c04ed0
Set version to unknown if not set (#4521) 2018-08-12 16:52:35 -07:00
Lee Jaeyong 98a785b077 Remove duplicate "Network Interface" section from win_perf_counters config (#4547) 2018-08-12 16:32:07 -07:00
Daniel Nelson 035e6a6f78
Skip lines that do not match in grok parser 2018-08-10 18:11:32 -07:00
Daniel Nelson 22b3bc4f8e
Remove references to logparser from the grok documentation 2018-08-10 18:11:12 -07:00
Daniel Nelson 2a4267ed72
Set 1.7.3 release date 2018-08-07 17:17:09 -07:00
Daniel Nelson b0b52692e9
Update changelog 2018-08-07 11:30:55 -07:00
Daniel Nelson feb75d493a
Lock buffer when adding metrics (#4514)
This function is not thread-safe but is currently used by multiple
goroutines in RunningOutput
2018-08-07 11:22:10 -07:00
Daniel Nelson 4dfb80d0fc
Fix error message if URL is unparseable in influxdb output (#4511) 2018-08-07 11:07:46 -07:00
Daniel Nelson a5409d7cf2
Use explicit zpool properties to fix parse error on FreeBSD 11.2 (#4510) 2018-08-07 11:07:07 -07:00
Greg Linton 0759c8b22b Update changelog 2018-08-01 16:45:52 -06:00
Loïc Blot 429d14101a Add pgbouncer input plugin (#3918) 2018-08-01 16:44:10 -06:00
dupondje e1160c26bc Add ip restriction for the prometheus_client output (#4431) 2018-08-01 16:43:34 -06:00
david7482 199841a820 Support StatisticValues in cloudwatch output plugin (#4364) 2018-08-01 16:43:17 -06:00
Greg Linton 66528354a5 Update changelog 2018-08-01 16:40:55 -06:00
Shanshi Shi e538433959 Preserve metric type when using filters in output plugins (#4481) 2018-08-01 16:39:54 -06:00
Greg 4fff507ad6
Skip bad entries on interrupt input (#4497) 2018-08-01 16:39:19 -06:00
EthanHur 2adfccc975 Update netstat link in README.md (#4494) 2018-08-01 16:37:52 -06:00
Greg Linton d7db4be5ef Update changelog 2018-07-31 18:16:51 -06:00
Daniel Nelson 6a32a7d85b Keep leading whitespace for messages in syslog input (#4498) 2018-07-31 18:15:42 -06:00
Greg Linton ddf2d691e9 Update changelog 2018-07-31 17:57:54 -06:00
Jonathan G b93460dd06 Split multiple sensor keys in ipmi input (#4450) 2018-07-31 17:56:03 -06:00
Greg Linton efe61eeb73 Update changelog 2018-07-31 16:10:01 -06:00
Daniel Nelson f4032fc78d Add support for lz4 compression to kafka output (#4492) 2018-07-31 16:09:30 -06:00
Daniel Nelson 943dcc0c49 Send all messages before waiting for results in kafka output (#4491) 2018-07-31 16:08:04 -06:00
Daniel Nelson 93ed28e745 Add support for configuring an AWS endpoint_url (#4485) 2018-07-31 16:07:21 -06:00
Sebastian Boehm 228efe9a1d Add filecount input plugin (#4363) 2018-07-31 16:05:55 -06:00
Greg Linton 5c1ba5e377 Update changelog 2018-07-30 13:32:16 -06:00
wegel 06d5501d92 Add IPSIpAddress syntax to ipaddr conversion in snmp plugin (#4471) 2018-07-30 13:31:23 -06:00
Greg Linton 3d1c650c54 Update changelog 2018-07-30 13:14:55 -06:00
Jiri Tyr a897b84049 Adding x509_cert input plugin (#3768) 2018-07-30 13:12:45 -06:00
Greg 019d265167 Add dev/telegraf.conf for docker, exec, and procstat input (#4460) 2018-07-27 18:39:37 -07:00
maxunt 96cb0aaea0 Fix unit tests on Darwin (#4458) 2018-07-27 18:29:54 -07:00
Daniel Nelson 83c4b81abe
Copy grok documentation from logparser to data format doc (#4475) 2018-07-27 18:28:33 -07:00
Daniel Nelson 4e1a253633
Link to SampleConfig documentation in contributing guide. 2018-07-26 15:52:17 -07:00
Greg 6e245b5483
Update docker input plugin to use new library (#4440) 2018-07-25 17:10:28 -06:00
Chris Goller 0a4f827f9b Provide function to test metric equality (#4464) 2018-07-24 19:29:00 -07:00
Daniel Nelson 9051ea9dc0 Require dep to be installed before building (#4461) 2018-07-24 15:57:24 -06:00
Daniel Nelson d95824a9c1
Downgrade max aerospike client version to 1.27.0 (#4462)
This is currently the most recent version without the memory leak issue.
2018-07-24 10:43:18 -07:00
Greg Linton be2ea90503 Update changelog 2018-07-23 12:03:21 -06:00
david7482 9657870258 Improve cloudwatch output performance (#4320) 2018-07-23 12:00:35 -06:00
Daniel Nelson f37b503f68
Set 1.7.2 release date 2018-07-18 13:58:38 -07:00
Greg Linton eb64617e37 Update changelog 2018-07-17 17:03:15 -06:00
Mathevet julien 4c2786298d Exclude cached memory on docker input plugin (#4383) 2018-07-17 17:02:03 -06:00
Greg Linton f363e70f33 Update changelog 2018-07-17 16:48:41 -06:00
Greg 69d22afcc2
Reset read deadline for syslog input (#4369) 2018-07-17 16:47:09 -06:00
Greg Linton 1cc300710c Update changelog 2018-07-17 16:00:47 -06:00
Greg b75d66ff41
Return error if NewRequest fails in http output (#4429) 2018-07-17 15:54:10 -06:00
dom 79e2754c89 fix url 2018-07-17 00:40:45 +02:00
dom 9aa6cb2013 import rss and twitter plugin 2018-07-17 00:29:37 +02:00
Daniel Nelson 3218ed7e0d
Add logparser deprecation notice to release notes 2018-07-16 15:10:11 -07:00
Daniel Nelson 5f8c9838ac
Update changelog 2018-07-13 23:25:35 -07:00
Daniel Nelson 14d25af4d4
Remove DS_Store files 2018-07-13 23:23:47 -07:00
maxunt 774a9f0492 Add file input plugin and grok parser (#4332) 2018-07-13 23:22:59 -07:00
Daniel Nelson 3f87e5bf57
Update changelog 2018-07-13 22:56:14 -07:00
Daniel Nelson 6d876c18e0
Fix metric can have duplicate field (#4422) 2018-07-13 22:54:34 -07:00
Daniel Nelson af98d070f5
Update changelog 2018-07-13 14:15:21 -07:00
Daniel Nelson 411b26bb1f
Fix output format of printer processor (#4417) 2018-07-13 14:14:18 -07:00
Daniel Nelson 49a5dea536
Update client_id in kafka input and output readme 2018-07-13 14:00:25 -07:00
Daniel Nelson 257e715b42
Update changelog 2018-07-13 13:58:39 -07:00
Rion c8f00030dd Add support for setting kafka client id (#4418) 2018-07-13 13:53:56 -07:00
Greg 0da94a1b3c Fix incorrect container name gathered in docker input (#4391) 2018-07-12 18:41:49 -07:00
Daniel Nelson 8ff63a4b79
Merge service inputs with main input listing 2018-07-12 12:26:46 -07:00
Daniel Nelson a5c4cac8f3
Fix typesetting issue in README 2018-07-12 12:25:43 -07:00
Daniel Nelson 0812ffdace
Update links to system plugins 2018-07-12 12:25:04 -07:00
Daniel Nelson 5150d565d7
Fix several build issues (#4412) 2018-07-11 22:57:46 -07:00
Daniel Nelson 9e77bfc3ed
Fix potential deadlock by not calling AddMetric concurrently (#4404) 2018-07-11 17:33:27 -07:00
Daniel Nelson fb7c1d775b
Update changelog 2018-07-11 17:31:11 -07:00
maxunt 9ebf16636d Add parse_multivalue to collectd parser (#4403) 2018-07-11 17:29:23 -07:00
Steve Domino 7b73b0db3a Moved system package inputs out to top level (#4406) 2018-07-11 16:43:49 -07:00
dom 507fc8acf1 optimize timestamps 2018-07-11 11:31:20 +02:00
dom b67ac078b8 fix race condition with timestamp 2018-07-11 11:29:53 +02:00
Daniel Nelson 9a14d1f074
Fix quoting in nvidia_smi input 2018-07-10 20:20:44 -07:00
dom bcaf0e910c add initial version of rss plugin 2018-07-10 11:01:26 +02:00
Daniel Nelson 7591a50d52
Add path tag to tail tests 2018-07-09 17:39:51 -07:00
dom ca10d4205b add initial version of twitter plugin 2018-07-08 20:21:31 +02:00
Daniel Nelson 9491cd91cd
Fix data race with default tags (#4395) 2018-07-07 00:54:21 -07:00
Daniel Nelson 6a2e2bfd7c
Add troubleshooting docs to cloudwatch input 2018-07-07 00:21:21 -07:00
Daniel Nelson 25ceb7f5a7
Update changelog 2018-07-06 16:16:07 -07:00
Alexander Shepelin 35d2f90d6c Don't set values when pattern doesn't match in regex processor (#4396) 2018-07-06 16:13:46 -07:00
Daniel Nelson a0ece79191
Update changelog 2018-07-05 14:40:22 -07:00
Greg a82b4fbd96 Use 'localhost' as default 'server' tag in zookeeper input (#4387) 2018-07-05 14:37:13 -07:00
Daniel Nelson f5f9fa2095
Update changelog 2018-07-05 13:57:24 -07:00
Greg b5cdeeb300 Add user tag to procstat input (#4386) 2018-07-05 13:56:41 -07:00
Daniel Nelson bf076dab73
Adjust enum readme and sample config style 2018-07-03 16:10:55 -07:00
Daniel Nelson 500e136844
Update changelog 2018-07-03 15:34:29 -07:00
Karsten Schnitter 515ff03364 Add Enum Processor (#3772) 2018-07-03 15:32:52 -07:00
Daniel Nelson c389a68f19
Fix grammar in swap readme 2018-07-03 15:13:17 -07:00
Daniel Nelson d69f833917
Update changelog 2018-07-03 14:12:20 -07:00
Ayrdrie 9106011f58 Add mongo document and connection metrics (#4362) 2018-07-03 14:09:20 -07:00
Daniel Nelson b5abf2c577
Set 1.7.1 release date 2018-07-03 13:47:53 -07:00
Daniel Nelson 38c0628190
Update changelog 2018-07-03 11:37:32 -07:00
Daniel Nelson 0ef12f87af
Add mutex to prevent handler precision from changing during parse (#4373) 2018-07-03 11:35:39 -07:00
Canux cba87212d3 Use non_negative_derivative in diskio example queries (#4370) 2018-07-03 11:03:16 -07:00
Daniel Nelson c5fa6729d3
Update changelog 2018-07-02 19:08:14 -07:00
Greg 4e440b36fd Gather IPMI metrics concurrently from list of servers (#4352) 2018-07-02 19:06:57 -07:00
maxunt 2da223390a Add procstat_lookup metric to readme (#4337) 2018-07-02 19:05:17 -07:00
Ayrdrie 9fe90d71f4 Add plugin development framework (#4324) 2018-07-02 16:34:40 -07:00
Daniel Nelson 2ee374cf50
Deprecate camelCase config options in opentsdb output 2018-07-02 15:10:10 -07:00
Daniel Nelson 220e6c5361
Update changelog 2018-07-02 15:06:35 -07:00
Jacob Lisi c7cfc2ec39 Add http path configuration for OpenTSDB output (#4347) 2018-07-02 15:04:01 -07:00
Greg Linton 9bc63c2f7a Improve CircleCI dependency caching 2018-07-02 14:23:29 -06:00
Daniel Nelson 56ea2eb57b
Update changelog 2018-07-02 13:10:39 -07:00
Daniel Nelson 210dfcee83
Fix field name typo in swap documentation 2018-07-02 13:08:43 -07:00
Steve Domino b7a02c73b3 Document swap input plugin and move to separate file (#4342) 2018-07-02 13:07:57 -07:00
Daniel Nelson 73e2e6afc5
Update changelog 2018-07-02 11:58:14 -07:00
Pierrick Brossin b2586a7eaf Add energy and power field and device id tag to fibaro input (#4343) 2018-07-02 11:57:05 -07:00
Daniel Nelson abfbf4f4f2
Update changelog 2018-06-29 19:08:09 -07:00
Adrián López 85eacf268b Fix minmax and basicstats aggregators to use uint64 (#4294) 2018-06-29 19:07:08 -07:00
Daniel Nelson 1a781a5851
Update changelog 2018-06-29 19:02:53 -07:00
Vlasta Hajek ed2bc1151b Allow use of counter time in win perf counters (#4267) 2018-06-29 19:01:28 -07:00
Daniel Nelson b2e972cd81
Update changelog 2018-06-29 18:18:58 -07:00
Greg 54056f3808 Handle mysql input variations in the user_statistics collecting (#4306) 2018-06-29 18:16:52 -07:00
Daniel Nelson 5aa199e2b3
Update changelog 2018-06-29 18:06:45 -07:00
Daniel Nelson 9bd5e10133
Fix syslog timestamp parsing with single digit day of month (#4334) 2018-06-29 18:05:46 -07:00
Daniel Nelson beaef8e3da
Update changelog 2018-06-29 16:20:03 -07:00
maxunt a10262c5d6 Add log message when tail is added or removed from a file (#4322) 2018-06-29 16:15:33 -07:00
Daniel Nelson 8bf18d6ac7
Fix name of hadoop example config 2018-06-29 16:07:30 -07:00
Daniel Nelson 23523ffd10
Document path tag in tail input 2018-06-21 18:02:34 -07:00
Daniel Nelson 523d761f34
Update changelog 2018-06-21 17:59:31 -07:00
JongHyok Lee 3f28add025 Added path tag to tail input plugin (#4292) 2018-06-21 17:55:54 -07:00
Daniel Nelson ee6e4b0afd
Run windows tests with -short 2018-06-21 17:46:58 -07:00
Patrick Hemmer 16454e25ba Fix postfix input handling of multi-level queues (#4333) 2018-06-21 16:01:38 -07:00
Daniel Nelson 2a1feb6db9
Update changelog 2018-06-21 14:20:35 -07:00
Ayrdrie 61e197d254 Add support for comma in logparser timestamp format (#4311) 2018-06-21 14:19:15 -07:00
Greg 1bd41ef3ce Update vendoring to dep from gdm (#4314) 2018-06-19 11:55:38 -07:00
Daniel Nelson d7c756e9ff
Update changelog 2018-06-19 11:48:08 -07:00
maxunt 39206677f8 Add new measurement with results of pgrep lookup to procstat input (#4307) 2018-06-19 11:47:13 -07:00
Vitalii Solodilov 6c4032071f Improvement of RabbitMQ plugin #3025 #3252
* new metrics:
  * unroutable messages
  * node uptime
  * gc metrics
  * mnesia metrics
  * node healthcheck
  * IO metrics
* refactoring tests:
  * moved the json examples to a separate files
  * check metric values

Signed-off-by: Vitalii Solodilov <mcdkr@yandex.ru>
2018-06-19 13:12:23 +04:00
Daniel Nelson b66eb2fec7
Update changelog 2018-06-18 18:09:31 -07:00
Piotr Popieluch 3ad10283ef Add valuecounter aggregator plugin (#3523) 2018-06-18 18:06:11 -07:00
Daniel Nelson 84e9a5c97e
Update changelog 2018-06-18 15:40:00 -07:00
Daniel Nelson c98b58dacc
Update docker input documentation for container status 2018-06-18 15:38:21 -07:00
prashanthjbabu 98d86df797 Add container status tag to docker input (#4259) 2018-06-18 15:33:14 -07:00
Daniel Nelson 4e9e57e210
Drop CI support for Go 1.8 (#4309)
Go 1.8 is no longer a supported version and the circleci/golang images
has been removed.
2018-06-17 18:50:14 -07:00
Daniel Nelson 7781507c01
Update changelog 2018-06-14 13:18:31 -07:00
maxunt 8482c40a91 Fix selection of tags under nested objects in the JSON parser (#4284) 2018-06-14 13:17:32 -07:00
Daniel Nelson 0dda9b8319
Update changelog 2018-06-13 13:50:43 -07:00
Arkady Emelyanov 4e69d10ff7 Add owner tag on partitions in burrow input (#4281) 2018-06-13 13:05:27 -07:00
Daniel Nelson f689463e8e
Use linux/unix name only in `make install`
closes: #4278
2018-06-12 18:37:50 -07:00
Vlasta Hajek f217d12de5
Fix grammar issues in win_perf_counters readme 2018-06-12 16:54:48 -07:00
Daniel Nelson 886795063e
Fix typo 2018-06-12 16:50:14 -07:00
Daniel Nelson 30dc95fa78
Update changelog 2018-06-12 16:46:27 -07:00
Daniel Nelson 40fac0a9b4
Treat sigterm as a clean shutdown signal (#4277) 2018-06-12 16:44:04 -07:00
Daniel Nelson 36df4c5ae5
Fix grammar in converter processor documentation 2018-06-12 16:12:08 -07:00
marcv81 70ffed3a4d Fixed typos in nvidia_smi plugin doc (#4261) 2018-06-12 14:28:56 -07:00
Daniel Nelson bf59bcf721
Update changelog 2018-06-12 13:57:00 -07:00
Sambhav Kothari a789f97feb Add support for solr 7 to the solr input (#4271) 2018-06-12 13:56:13 -07:00
Daniel Nelson d2e00a3205
Set 1.7.0 release date 2018-06-12 11:41:58 -07:00
Daniel Nelson daddd8bbac
Use nats-io/go-nats instead of nats-io/nats in tests 2018-06-11 16:13:59 -07:00
Daniel Nelson d16530677d
Update changelog 2018-06-11 16:07:23 -07:00
marcv81 1ea18ffd0a Add power draw field to nvidia_smi plugin (#4262) 2018-06-11 16:06:26 -07:00
Daniel Nelson dd2223ae1c
Use nats-io/go-nats instead of nats-io/nats 2018-06-11 15:24:45 -07:00
Daniel Nelson 90eebd88af
Update changelog 2018-06-11 14:55:12 -07:00
Pierre Tessier d2e729dfaf Remove tags with empty values from Wavefront output (#4266) 2018-06-11 14:54:08 -07:00
Daniel Nelson f64d612294
Reword converter description 2018-06-11 14:43:28 -07:00
Daniel Nelson 76ec90e66d
Update win_perf_counters README 2018-06-11 11:41:46 -07:00
Vlasta Hajek 1690f36b09 Add option to enable wildcard expansion (#4265)
This is needed because wildcard expansion causes counters to be localized.
2018-06-11 11:10:53 -07:00
Vlasta Hajek 87f711a19a Fix panic with unicode counter names in win_perf_counters (#4255) 2018-06-08 12:41:21 -07:00
Daniel Nelson 58895d6b03
Update go-syslog version
Fix go-syslog overquota errors since latest version no longer uses LFS.
2018-06-08 12:22:49 -07:00
Daniel Nelson cd9ad77038
Update changelog 2018-06-07 12:38:17 -07:00
Daniel Nelson 8563238059
Update tengine docs 2018-06-07 12:35:46 -07:00
Daniel Nelson 11335f5fee
Restore tengine input plugin (#4160)
This reverts commit 8826cdc423.
2018-06-07 12:35:02 -07:00
Daniel Nelson acba20af1a
Fix TLS and SSL config option parsing (#4247) 2018-06-06 18:29:59 -07:00
Daniel Nelson 229b6bd944
Update changelog 2018-06-06 14:30:37 -07:00
Daniel Nelson 7fe6e2f5ae
Use same flags for all bsd family ping varients (#4241) 2018-06-06 14:28:12 -07:00
Pierre Fersing a4214abfc4 Ignore more boring filesystems from disk plugin (#4244) 2018-06-06 13:44:26 -07:00
Daniel Nelson 5f0cbd1255
Update changelog 2018-06-05 17:14:29 -07:00
Leszek Charkiewicz 3ef4dff4ec Add SSL/TLS support to Redis input (#4236) 2018-06-05 17:12:30 -07:00
Piotr Popieluch dfe7b5eec2 Don't skip metrics during startup in aggregate phase (#4230) 2018-06-05 16:30:53 -07:00
Daniel Nelson 92a8f795f5
Set 1.6.4 release date 2018-06-05 12:11:15 -07:00
Daniel Nelson b1d77ade55
Update master version to 1.8 2018-06-05 11:46:55 -07:00
Daniel Nelson 7103077b3f
Update sample config 2018-06-05 11:45:07 -07:00
Daniel Nelson 7332ce0e95
Add go-syslog to dependencies licenses list 2018-06-05 11:40:03 -07:00
Daniel Nelson 2be32f0a80
Update changelog 2018-06-04 18:35:47 -07:00
Daniel Nelson 701e157ef0
Revert "Update aerospike-client-go version to latest release (#4128)"
This reverts commit 1f29612918.
2018-06-04 18:23:51 -07:00
Daniel Nelson eb94bb29fd
Update changelog 2018-06-04 18:13:53 -07:00
Daniel Nelson 449bd5c3b9
Fix misnamed option in varnish sample config 2018-06-04 18:06:59 -07:00
Daniel Nelson 96abff0660
Update changelog 2018-06-04 18:02:00 -07:00
Phil Preston 9eab3572ff
Add counter fields to pf input (#4216) 2018-06-04 18:01:14 -07:00
Daniel Nelson be8b87000c
Remove test for empty metrics list from file output 2018-06-04 17:58:55 -07:00
Mathur ff93c3c326 Update burrow README.md (#4231) 2018-06-04 10:51:57 -07:00
Daniel Nelson df1fe7a2b4
Use random name for test sockets to avoid intermittent failure 2018-06-03 20:19:39 -07:00
Daniel Nelson a04cfee349
Fix incorrect option name in amqp sample configuration 2018-06-03 18:42:08 -07:00
Daniel Nelson da6ad34fc8 Add option to disconnect after a message limit is reached in amqp output 2018-06-03 18:35:59 -07:00
Daniel Nelson 179bcfdcbb Use list of brokers in amqp output and amqp_consumer 2018-06-03 18:35:59 -07:00
Daniel Nelson e3f1d28908 Allow configuration of amqp exchange type, durability, and arguments 2018-06-03 18:35:59 -07:00
Dark fcea745e99 Change config to match toml parsing rule. (#4225) 2018-06-03 18:31:47 -07:00
Daniel Nelson 90bcb5bc3c
Update changelog 2018-06-03 15:59:00 -07:00
Mike Gent 312116c101 Add passive mode exchange declaration option to amqp consumer input (#3995) 2018-06-03 15:52:59 -07:00
Mike Gent 2cc2913d81 Add static routing_key option to amqp output (#3994) 2018-06-03 15:52:00 -07:00
Daniel Nelson b556eb8b2f
Update changelog 2018-06-01 10:51:23 -07:00
Thanabodee Charoenpiriyakij 8b28f40cc0 Handle uint64 on cloudwatch output (#4219) 2018-06-01 10:47:40 -07:00
Daniel Nelson cabee8f8e0
Update changelog 2018-05-31 11:58:16 -07:00
Piotr Popieluch e0071f365a Print the enabled aggregator and processor plugins on startup (#4212) 2018-05-31 11:56:49 -07:00
Patrick Hemmer 5ae2b02f5d Fix snmp overriding of auto-configured table fields (#4208)
Whenever the snmp plugin was configured with a table with automatic field
discovery, if one of those fields was explicitly overridden in the config and
the value of is_tag was changed, the field would be duplicated, once as a tag
& once as a field.

This change fixes the behavior so that if a field is explicitly configured,
automatic table field discovery doesn't touch it.
2018-05-29 19:03:37 -07:00
Daniel Nelson 59f0a5354f
Log if connection is closed on write error 2018-05-29 16:10:27 -07:00
Vlasta Hajek c8b68430f0 Fix struct alignment in win_perf_counters for 32-bit 386 arch (#4206) 2018-05-29 11:34:00 -07:00
Daniel Nelson 1ac64596bf
Update syslog docs and add to changelog and readme 2018-05-25 14:33:57 -07:00
Leonardo Di Donato b78984554c Add syslog input plugin (#4181) 2018-05-25 11:40:12 -07:00
Daniel Nelson 2def31bc3d
Update changelog 2018-05-24 18:34:08 -07:00
Vlasta Hajek 010e4f5b0b Fix wildcard and other issues with win_perf_counters (#4189) 2018-05-24 18:25:06 -07:00
Daniel Nelson ce3b367dac
Add jolokia2 example configs to list in readme 2018-05-24 12:02:20 -07:00
Daniel Nelson f3f753310f
Update changelog 2018-05-24 11:59:15 -07:00
Pierre Tessier 50d721ae05 Add additional examples for jolokia2 (#4191) 2018-05-24 11:58:43 -07:00
Daniel Nelson 14d97e5416
Add special syslog timestamp parser that uses current year (#4190)
Previously it was impossible to parse syslog timestamps without the date
being reported as year 0, due to the year not being specified
2018-05-23 16:37:14 -07:00
Daniel Nelson 44e3b9bee3
Update changelog 2018-05-23 14:30:55 -07:00
Daniel Nelson 7f93911f43
Add converter processor (#4178) 2018-05-23 14:29:57 -07:00
Daniel Nelson f417cec036
Update changelog 2018-05-23 14:28:59 -07:00
Daniel Nelson dbd02ebb74
Add support for TLS and username/password auth to aerospike input (#4183) 2018-05-23 14:28:17 -07:00
Daniel Nelson fbf09409e9
Update changelog 2018-05-23 12:26:17 -07:00
Daniel Nelson 54728f54c6
Update unbound README 2018-05-23 12:22:25 -07:00
Rodrigo Pereira 83b03ecb18 Add option to unbound module to use threads as tags (#3969) 2018-05-23 12:03:49 -07:00
Daniel Nelson 8826cdc423
Revert "Add tengine input plugin (#4160)"
This reverts commit 697d8ceae5.
2018-05-23 11:58:22 -07:00
arterforyou 697d8ceae5 Add tengine input plugin (#4160) 2018-05-23 11:19:50 -07:00
Daniel Nelson 089eb2c8d6
Update changelog 2018-05-22 14:53:21 -07:00
Arkady Emelyanov fd22b1ef1f Add burrow input plugin (#3489) 2018-05-22 14:10:41 -07:00
Daniel Nelson a86c2d54ad
Update changelog 2018-05-22 14:00:52 -07:00
Daniel Nelson daacfc6368
Add timeout option to sensors input (#4162) 2018-05-22 13:59:59 -07:00
Daniel Nelson 795c8057ad
Update changelog 2018-05-21 16:40:30 -07:00
Daniel Nelson 6a21e23bcc
Update graphite output dataf format docs 2018-05-21 16:39:33 -07:00
Daniel Nelson 0d21296aed
Expose graphite_tag_support option in graphite output data format 2018-05-21 16:39:15 -07:00
Pavel Boev 7660315e45 Add support for Graphite 1.1.x tags (#4165) 2018-05-21 15:59:56 -07:00
Daniel Nelson 703be4f124
Add regex processor to readme and changelog 2018-05-21 15:48:22 -07:00
Alexander Shepelin ccc4a85fd6 Add regex processor plugin (#3839) 2018-05-21 15:46:10 -07:00
Daniel Nelson 3be9cad309
Set release date for 1.6.3 2018-05-21 12:43:52 -07:00
Daniel Nelson 45c1a45f4a
Add aurora input to changelog and readme 2018-05-21 12:01:58 -07:00
Daniel Nelson 1a407ceaf9
Add aurora input plugin (#4158) 2018-05-21 11:59:39 -07:00
Daniel Nelson 61a0e500a8
Update changelog 2018-05-21 10:43:57 -07:00
Arkady Emelyanov 7f46aafcd6 Fix waitgroup deadlock if url is incorrect in apache input (#4176) 2018-05-21 10:43:02 -07:00
Daniel Nelson 3072b5a493
Update mqtt output docs and changelog 2018-05-18 19:03:00 -07:00
jvrahav 81f5a41bc9 Add batch mode to mqtt output (#4094) 2018-05-18 18:55:02 -07:00
Daniel Nelson a688eefd1c
Update changelog 2018-05-18 18:52:32 -07:00
Feliksas The Lion 1a8786712c Added 3 important elasticsearch cluster health metrics (#4167) 2018-05-18 18:49:23 -07:00
Daniel Nelson 339cebbc21
Use -parallel=false in gdm to avoid issues on appveyor 2018-05-17 15:19:17 -07:00
Daniel Nelson b62f7a3c68
Return to using latest image file on appveyor 2018-05-17 14:38:21 -07:00
Daniel Nelson cce4f520bd
Update changelog 2018-05-17 14:25:35 -07:00
Leszek Charkiewicz 6d73cb85cc Add consul service tags to metric (#4155) 2018-05-17 14:24:51 -07:00
Daniel Nelson 2948dec6f5
Update changelog and docs for application_insights plugin 2018-05-15 16:42:56 -07:00
Karol Zadora-Przylecki 863af9d1d4 Add Microsoft Application Insights output plugin (#4010) 2018-05-15 16:05:59 -07:00
Daniel Nelson 99033241c4
Update changelog 2018-05-15 15:55:38 -07:00
Daniel Nelson e45822e2e2
Fix librato output support for uint and bool (#4151) 2018-05-15 15:54:20 -07:00
Daniel Nelson 0eba72d2c0
Add http output to changelog/readme 2018-05-14 17:19:49 -07:00
Daniel Nelson d5f57715dc
Add method, basic auth, and tls support to http output 2018-05-14 17:18:07 -07:00
Dark 190a4128c5 Add HTTP output plugin (#2491) 2018-05-14 17:15:40 -07:00
Daniel Nelson d19a33dd6f
Update changelog 2018-05-14 11:01:24 -07:00
Daniel Nelson 0af40a8a5d
Fix dropwizard parsing error for metrics that need escaped (#4142)
If the dropwizard parser cannot convert the metric name into a valid
line protocol series then we will accept the name as is.
2018-05-14 11:00:03 -07:00
Daniel Nelson 558caf57de
Update sample config 2018-05-11 18:18:53 -07:00
Daniel Nelson 18db718d7f
Add jti_openconfig_telemetry to docs 2018-05-11 18:16:52 -07:00
Ajay Kumar Chintala fdd899e9d4 Add service input plugin for OpenConfig streaming telemetry (#2292) 2018-05-11 17:58:19 -07:00
Daniel Nelson 7e0e664860
Update changelog 2018-05-11 17:50:46 -07:00
Daniel Nelson 5030373a4c
Reuse transport on next interval in jolokia agent (#4137) 2018-05-11 17:48:27 -07:00
Daniel Nelson 5b599337a3
Use internal.Duration for jolokia timeouts (#4136) 2018-05-11 17:47:38 -07:00
Daniel Nelson 2add516eee
Update changelog 2018-05-09 11:56:59 -07:00
Oleksandr Vilchynskyy 1f29612918 Update aerospike-client-go version to latest release (#4128) 2018-05-09 11:54:00 -07:00
Daniel Nelson 851efc9ca0
Update changelog 2018-05-08 16:40:42 -07:00
Daniel Nelson fa04e539ff
Merge branch 'update_net_response' 2018-05-08 16:17:56 -07:00
Daniel Nelson 3ef28e332f
Use result and result_code in net_response 2018-05-08 16:17:22 -07:00
Randy Coburn 5953db88df Add tag/integer pair for result to net_response (#3455) 2018-05-08 16:07:15 -07:00
Daniel Nelson 2bf2b51039
Skip fields that report "not supported" in nvidia-smi (#4123) 2018-05-08 13:11:12 -07:00
Daniel Nelson 2a2cc3212f
Update changelog 2018-05-08 12:12:03 -07:00
Daniel Nelson b11468757c
Add uint/bool support to cratedb output (#4117) 2018-05-08 12:10:25 -07:00
Daniel Nelson 339c5d0312
Add instructions on how to repair windows performance counters 2018-05-07 18:41:05 -07:00
Daniel Nelson 1c6cfcfbab
Update changelog 2018-05-07 18:19:55 -07:00
Daniel Nelson c16ecaa124
Don't report 0ms on timeout in dns_query (#4118) 2018-05-07 18:18:01 -07:00
Daniel Nelson ce58926feb
Run apt-get update in release.sh 2018-05-07 15:12:01 -07:00
Daniel Nelson cff2aa1863
Update changelog 2018-05-07 15:01:40 -07:00
Jake Champlin 4790a21c04 Add cursor metrics to mongodb input (#4114) 2018-05-07 15:00:24 -07:00
Daniel Nelson 21167a6232
Remove combined issue template 2018-05-07 11:43:23 -07:00
Daniel Nelson 2fe167b8a7
Update issue templates (#4116) 2018-05-07 11:38:09 -07:00
Daniel Nelson d96bcac3ec
Update changelog 2018-05-04 18:42:36 -07:00
Germán Jaber ac9b308cee Add topk processor plugin (#4096) 2018-05-04 18:40:05 -07:00
Daniel Nelson 4c35a56edd
Update changelog 2018-05-04 18:31:45 -07:00
Daniel Nelson 73c22a8189
Add SerializeBatch method to the Serializer interface (#4107) 2018-05-04 18:27:31 -07:00
Daniel Nelson de355b76d6
Simplify testing with TLS (#4095) 2018-05-04 16:33:23 -07:00
Daniel Nelson b2bb44363a
Update kafka readme 2018-05-04 14:39:31 -07:00
Daniel Nelson 8b687a8e21
Only lowercase mysql slave metrics with metric_version = 2 2018-05-04 14:31:16 -07:00
Nicolas Steinmetz 81620c69c5 Fix name_override example in mysql rreadme (#4100) 2018-05-04 14:20:34 -07:00
Mauro Murari 3ae0c20200 Fix platform not supported error in build.py (#4102) 2018-05-04 14:18:59 -07:00
Daniel Nelson 7c0754ebe5
Move usage string to internal to fix `go run` 2018-05-04 14:16:21 -07:00
Daniel Nelson 757e23a5f2
Remove -i flag from `make telegraf` 2018-05-04 14:08:23 -07:00
Daniel Nelson fd63591b15
Fix grammar 2018-05-03 17:26:01 -07:00
Daniel Nelson 2108582b43
Clarify max_retry option in kafka output 2018-05-03 17:22:49 -07:00
Daniel Nelson c125cb1d27
Update gopsutil version 2018-05-03 12:32:53 -07:00
Daniel Nelson 2fb3f7a585
Update changelog 2018-05-03 11:41:18 -07:00
Daniel Meiners 9647ea88ea Ignore UTF8 BOM in JSON parser (#4099) 2018-05-03 11:40:28 -07:00
Daniel Nelson c1d4b0b154
Update telegraf.conf 2018-05-02 11:50:11 -07:00
Daniel Nelson 239333ad90
Remove dead link from logparser sample config 2018-05-02 11:49:51 -07:00
Daniel Nelson fd64487be5
Update changelog 2018-05-01 18:57:26 -07:00
Daniel Nelson cff7ee8edf
Fix handling of uint64 in datadog output (#4091) 2018-05-01 18:56:39 -07:00
Daniel Nelson c03e8918a2
Update changelog, add mcrouter to README 2018-05-01 12:01:08 -07:00
Craig Thayer 83345ec2b3 Add input plugin for McRouter (#4077) 2018-05-01 11:58:15 -07:00
Daniel Nelson f094f83da5
Update changelog 2018-04-30 19:21:12 -07:00
Mariusz Brzeski 0768022240 Support busybox ping in the ping input (#3877) 2018-04-30 19:20:13 -07:00
Daniel Nelson 92956104d6
Update changelog 2018-04-30 17:51:04 -07:00
Daniel Nelson 964856eb5f
Fix win_perf_counters to collect counters per instance (#4036) 2018-04-30 17:48:45 -07:00
Daniel Nelson 377547aa4c
Document one field per line requirement in logparser 2018-04-30 16:15:51 -07:00
Grégoire Bellon-Gervais 1662b6feb9 Metrics values have same names as old cassandra plugin (#4080) 2018-04-27 15:12:59 -07:00
Daniel Nelson 908170b207
Update changelog 2018-04-27 14:56:31 -07:00
Vincent Caron ec47cab950 Use same timestamp for fields in system input (#4078) 2018-04-27 14:55:10 -07:00
Daniel Nelson 06671777e9
Update changelog 2018-04-25 19:02:00 -07:00
Adrián López 46a8bdbfe5 Add parameter to force the interval of gather for sysstat (#4068) 2018-04-25 18:59:42 -07:00
Daniel Nelson abdff033cc
Note options that only work with influxdb HTTP 2018-04-25 13:47:16 -07:00
Daniel Nelson 535e9e9a68
Update changelog 2018-04-25 13:47:16 -07:00
Jack Zampolin c256f17870 Fix timeout parsing error in nvidia_smi (#4070) 2018-04-24 14:40:19 -07:00
Yosuke Hara b8d5df2076 Add support for LeoFS v1.4 to leofs input (#4044) 2018-04-24 14:14:31 -07:00
Daniel Nelson 538baee8a4
Fix nightly build 2018-04-24 13:42:42 -07:00
Daniel Nelson d3d8d52e2f
Fix links to jolokia example configs 2018-04-24 12:46:40 -07:00
Daniel Nelson 286f14f730
Update changelog 2018-04-23 15:15:08 -07:00
Daniel Nelson 9f4752ba12
Add docker input server version (#4035) 2018-04-23 15:09:04 -07:00
Daniel Nelson f639f994b5
Ignore writer error in file output (#4055) 2018-04-23 15:08:04 -07:00
Daniel Nelson 911f0e4b57
Deprecate the cassandra input plugin (#4050) 2018-04-23 15:06:26 -07:00
Daniel Nelson 86a3b8cad4
Update changelog 2018-04-23 14:01:38 -07:00
Daniel Nelson a3500cc33a
Fix handling of floats with multiple leading zeroes (#4065) 2018-04-23 13:29:49 -07:00
Daniel Nelson bf0c59f56c
Return errors in mongodb SSL/TLS configuration (#4066) 2018-04-23 13:29:12 -07:00
Fred Cox c7b3667ac4 Add server argument as first argument in unbound input (#4062) 2018-04-23 13:27:29 -07:00
Daniel Nelson 638853be05
Update changelog 2018-04-20 18:49:55 -07:00
Daniel Nelson ee9a2f73a1
Fix duplicate tags when overriding tag (#4056) 2018-04-20 18:39:31 -07:00
Daniel Nelson 648d7ae922
Run 32-bit tests in CircleCI 2018-04-20 15:10:22 -07:00
Daniel Nelson 13937d511d
Update changelog 2018-04-20 15:05:39 -07:00
Daniel Nelson fe4d3cd117
Fix ints being capped at 32-bits on 32-bit archs (#4054) 2018-04-20 14:56:28 -07:00
Leandro Piccilli eacf11fcd8 Update gopsutils to include fixes for #4037 and #3750 (#4045) 2018-04-20 14:32:19 -07:00
Daniel Nelson 3a8ca4d08d
Update changelog 2018-04-19 16:58:59 -07:00
Daniel Nelson 00e3363d45
Add only valid field types in cassandra input (#4048) 2018-04-19 16:56:46 -07:00
Daniel Nelson 29b37e67c2
Allow metrics to be unserializable in influx.Reader (#4047)
Metrics that are unserializable will be logged at debug level, but the
rest of the batch will be sent.  Unserializable metrics can occur during
normal operation such as if you remove all fields from a metric or the
metric cannot fit within the line size limit.
2018-04-19 16:24:31 -07:00
Daniel Nelson 42fee824f8
Update changelog 2018-04-18 16:57:15 -07:00
Daniel Nelson 120be7e87b
Report available fields if utmp is unreadable (#4043) 2018-04-18 16:55:18 -07:00
Daniel Nelson 9e4a330ee5
Update github.com/gorilla/mux version (#4042) 2018-04-18 16:55:02 -07:00
Daniel Nelson 78d4a95ce6
Test using Go 1.8-1.10; official builds with 1.10 (#4041) 2018-04-18 16:14:06 -07:00
Daniel Nelson 571ce86d10
Update changelog 2018-04-18 12:14:58 -07:00
Daniel Nelson dd2c60e620
Fix graphite serialization of unsigned ints (#4033) 2018-04-18 12:13:25 -07:00
Daniel Nelson 1486ae25c0
Tidy up last change to socket listener/writer 2018-04-17 17:48:30 -07:00
Daniel Nelson da5b46e770
Update changelog 2018-04-17 17:36:35 -07:00
Matt 9ef902f4a1 Add snmp input option to strip non fixed length index suffixes (#4025) 2018-04-17 17:34:39 -07:00
Daniel Nelson 058510464c
Update changelog 2018-04-17 17:03:18 -07:00
Bob Shannon 0b4f4b089f Add TLS support to socket_writer and socket_listener plugins (#4021) 2018-04-17 17:02:04 -07:00
Daniel Nelson 7c592558d8
Update changelog 2018-04-17 15:45:49 -07:00
James Maidment 1e1d9e8acb Update mem values to gauge (#4034) 2018-04-17 15:43:10 -07:00
Daniel Nelson 3b3d16273d
Update changelog adding nvidia_smi 2018-04-17 13:43:36 -07:00
Jack Zampolin 3046f957d5 Add nvidia_smi input to monitor nvidia GPUs (#4026) 2018-04-17 13:40:55 -07:00
Daniel Nelson bcf1cf59c1
Fix docs about outputs and fieldpass/fielddrop
This has been allowed since 1.1.0
2018-04-17 13:35:27 -07:00
Daniel Nelson c8d2ba2bc8
Remove RateLimiter tests due to race conditions
These tests are fundamentally racy, removing to improve reliability of
test cases.
2018-04-16 18:52:52 -07:00
Daniel Nelson 04ab9a4fe4
Set 1.6 release date in changelog 2018-04-16 12:04:31 -07:00
Daniel Nelson e4009234e9
Fix HashID conflicts in pathological cases
Use "\n" as delimiter as it cannot occur in the series name.
2018-04-12 18:09:31 -07:00
Daniel Nelson 8d516d26e9
Fix MQTT sample config 2018-04-12 14:34:55 -07:00
Daniel Nelson 0a02363c03
Update changelog 2018-04-11 16:52:40 -07:00
jvassev 2c19d74829 Prevent loading config twice in K8S (#3999)
When config dir is mounted from configmap, filepath.Walk() finds the same
.conf file twice as 20-acme.conf is a link to ..data/20-acme.conf for example.

This patch skips all folder names starting with '..' which is pretty
uncommon and mainly used by Kubernetes mounts.
2018-04-11 16:51:19 -07:00
Daniel Nelson 3f4e1af222
Add --console and --service to usage message in Windows (#3993) 2018-04-11 16:44:55 -07:00
Daniel Nelson 10c7324d74
Update changelog 2018-04-10 18:18:27 -07:00
Daniel Nelson 55cfc383f3
Allow grok pattern to contain newlines (#4005) 2018-04-10 18:16:21 -07:00
Daniel Nelson 7b8f12b377
Update changelog 2018-04-10 18:15:02 -07:00
Daniel Nelson 15f19375e7
Typesetting changes to fibaro README 2018-04-10 18:14:27 -07:00
Pierrick Brossin 93e2381f42 Add Fibaro input plugin (#2741) 2018-04-10 18:04:58 -07:00
Daniel Nelson 387bae9b9f
Fix host ordering in mongodb unit tests 2018-04-10 17:24:40 -07:00
Daniel Nelson 34416e0da8
Updated changelog 2018-04-10 17:11:25 -07:00
Jake Champlin 32f56140a3 Add per-host shard metrics in mongodb input (#3819) 2018-04-10 17:10:29 -07:00
Boris Schrijver 64a23c0b18 Fix make test-ci run (#4002) 2018-04-10 15:35:58 -07:00
Daniel Nelson af68975e2f
Document that InfluxDB input metrics vary with version 2018-04-09 19:30:18 -07:00
Daniel Nelson 0223b22b3e
Update changelog 2018-04-09 17:06:34 -07:00
Daniel Nelson 1890efbb70
Rename repl_oplog_window_s to repl_oplog_window_sec
To match existing metric style.
2018-04-09 17:05:45 -07:00
Daniel Nelson e4f8a82ee6
Fix newline escaping in line protocol (#3992) 2018-04-09 15:29:52 -07:00
Daniel Nelson a28de4b5cd
Update changelog 2018-04-06 16:45:07 -07:00
Daniel Nelson caac224276
Add details about MongoDB permissions 2018-04-06 16:43:03 -07:00
Daniel Nelson fe31ce9d7d
Modernize mongodb docs 2018-04-06 16:36:03 -07:00
Matvey Kruglov 01ede2ea0b Add repl_oplog_window_s metric to mongodb input (#3964) 2018-04-06 16:34:47 -07:00
alekseyp fb6390e7ab Fix typo in phpfpm README (#3985) 2018-04-06 16:20:36 -07:00
Mark Wilkinson - m82labs ff40da6019 Use explicit casts to avoid datatype issues (#3980) 2018-04-06 14:58:33 -07:00
Daniel Nelson 43a044542e
Update changelog 2018-04-06 13:19:02 -07:00
Daniel Nelson 00203fa889
Export all vars defined in /etc/default/telegraf (#3981)
This keeps the format of this file the same between systemd and
sysvinit.
2018-04-06 13:17:24 -07:00
Daniel Nelson 7177e0473f
Fix conversion of unsigned ints in prometheus output (#3978) 2018-04-05 16:38:41 -07:00
Daniel Nelson 252101b7c6
Update changelog 2018-04-05 11:19:01 -07:00
Daniel Nelson efdf36746c
Update gosnmp revision (#3973) 2018-04-05 11:15:20 -07:00
Daniel Nelson df78133bf3
Log error if scheme is unsupported 2018-04-05 11:08:31 -07:00
Jeff Ashton bf915fa79c Fix https in InfluxDB output (#3976) 2018-04-05 10:50:32 -07:00
Daniel Nelson c160b56229
Fix build.py next_version 2018-04-04 21:53:20 -07:00
Daniel Nelson 627f0e5d9d
Use automatic extension naming when running go build 2018-04-04 19:00:28 -07:00
Daniel Nelson 4551b4c5d2
Enable ntpq tests on Windows (#3972) 2018-04-04 18:35:05 -07:00
Daniel Nelson a9afd2f030
Add config-directory documentation for Windows service 2018-04-04 16:30:22 -07:00
Daniel Nelson caf860bc88
Don't print name of plugin or interval size during --test 2018-04-04 16:30:22 -07:00
Daniel Nelson beeab2c509
Sort field names when running --test 2018-04-04 16:30:22 -07:00
Scott Anderson a50acadc44 Add details about why not all logstash patterns are supported (#3971) 2018-04-04 14:42:58 -07:00
Daniel Nelson 265d0e6d84
Fix bug preventing database from being recreated (#3962) 2018-04-02 16:18:33 -07:00
Daniel Nelson 413cf6dd23
Set next version to 1.7 on master 2018-04-02 14:44:09 -07:00
Daniel Nelson 7b23287e20
Update sample telegraf.conf 2018-04-02 14:40:51 -07:00
Daniel Nelson f4c0aac898
Update changelog 2018-04-02 14:34:25 -07:00
Daniel Nelson bcaaeda49c
Fix precision truncation when no timestamp included (#3961) 2018-04-02 14:32:33 -07:00
Daniel Nelson 9d2f3fcbb9
Update changelog 2018-04-02 14:31:36 -07:00
Daniel Nelson 0aad487cab
Fix go vet and use go test -race 2018-04-02 14:30:46 -07:00
Daniel Nelson 19c102cf4b
Fix parsing of dos line endings in smart input (#3960) 2018-04-02 13:55:10 -07:00
Daniel Nelson 109c1a4344
Update gopsutil version to v2.18.03 2018-04-02 13:54:16 -07:00
Daniel Nelson 82448a9dd1
Add metric_version option to mysql input (#3954) 2018-04-02 13:10:43 -07:00
Daniel Nelson 64b239663c
Add mutex to influx parser 2018-04-02 12:52:23 -07:00
Daniel Nelson 7e3ec16e15
Allow empty string field values 2018-03-30 16:57:35 -07:00
Mark Wilkinson - m82labs a971ffb880 Remove host tag from Database IO v2 Query (#3953) 2018-03-30 13:22:24 -07:00
Daniel Nelson 461c0dccd8
Update changelog 2018-03-30 13:20:07 -07:00
Daniel Nelson 971debb582
Add filters for container state to docker input (#3950) 2018-03-30 13:17:48 -07:00
Daniel Nelson 6d585beedf
Fix http_proxy variable name in http_response plugin 2018-03-30 11:11:12 -07:00
Daniel Nelson 38ec968b0b
Move Handler interface into machine where it is used 2018-03-30 11:11:12 -07:00
Daniel Nelson 0c1293ad5e
Add MmapStats when using rocksdb storage engine (#3930) 2018-03-29 13:32:05 -07:00
Daniel Nelson b99cd14129
Add influx uint support as a runtime option (#3948) 2018-03-29 13:31:43 -07:00
Daniel Nelson c2108fcf09
Update changelog 2018-03-29 12:44:33 -07:00
Daniel Nelson 04b9afff68
Add TLS support to zookeeper input (#3949) 2018-03-29 12:42:25 -07:00
Matt a320f91516 Add line protocol uint64 support (#3946) 2018-03-28 16:43:25 -07:00
Daniel Nelson ef112e6ee7
Revert to 'f' formatting for floats in line protocol
Using 'g' with -1 precision switches over to scientific notation for too
small of numbers, and setting a larger precision results in larger than
desired representations.
2018-03-28 14:38:39 -07:00
rabhis 5be1198274 Reconnect AMQP consumer to broker (#3947) 2018-03-28 14:00:56 -07:00
Daniel Nelson 8a73dc05c0
Update changelog 2018-03-27 18:38:39 -07:00
Daniel Nelson 43bd23e555
Add support for connecting to InfluxDB over a unix domain socket (#3942) 2018-03-27 18:36:08 -07:00
Daniel Nelson b0b18df0bf
Update changelog 2018-03-27 18:07:37 -07:00
Daniel Nelson cc97b48ca8
Add support for skipping database creation (#3941) 2018-03-27 17:59:57 -07:00
Daniel Nelson 36b8220181
Update changelog 2018-03-27 17:44:13 -07:00
Daniel Nelson 1c0f63a90d
Add new line protocol parser and serializer, influxdb output (#3924) 2018-03-27 17:30:51 -07:00
Daniel Nelson 503881d4d7
Update to latest fsnotify release 2018-03-27 17:21:00 -07:00
Daniel Nelson 63de4ffc51
Update to latest gopsutil release 2018-03-27 15:12:57 -07:00
Daniel Nelson 4cefe3eadd
Add documentation for existing TLS settings in consul input (#3931) 2018-03-26 19:22:17 -07:00
Daniel Nelson b63073deb2
Update DC/OS guidance for cardinality 2018-03-26 19:20:27 -07:00
Daniel Nelson e60abdf8ea
Update passenger input documentation (#3938) 2018-03-26 19:11:08 -07:00
Daniel Nelson e5e75a62cc
Update changelog 2018-03-23 19:17:03 -07:00
Daniel Nelson a4870e6a6d
Fix DC/OS URL creation race (#3932) 2018-03-23 19:14:07 -07:00
Daniel Nelson 3469e74dd9
Update changelog 2018-03-23 11:57:42 -07:00
Evan Kinney def76ace3b Add HTTP basic auth support to the http_listener input (#3496) 2018-03-23 11:56:49 -07:00
Daniel Nelson 05393da939
Update changelog 2018-03-23 11:54:06 -07:00
Daniel Nelson e8fc3ca70c
Add TLS support to kapacitor input (#3927) 2018-03-23 11:53:18 -07:00
Daniel Nelson 729388f4dd
Update changelog 2018-03-23 11:52:00 -07:00
Daniel Nelson be9d4f4be0
Add tag for target url to phpfpm input (#3928) 2018-03-23 11:50:52 -07:00
Daniel Nelson 3658ac8f53
Skip hanging test on darwin 2018-03-22 14:41:37 -07:00
Mark Wilkinson - m82labs d7f279e3d3 Fix SQL Server 2008 compatibility (#3916)
* Fixed a bug in the performance counter query when run against SQL Server 2016 SP1-CU2. The performance counter DMV contains duplicate entries which are not handled by the query.

* Adding more stats related to workload groups.

* Adding new RG stats, removing "host" tag

* Removed workload group query

* Fixing some 2008 compat issues, removed the host field from the result set.

* Adding fixes for SQL Server 2008 compat around RG columns. Also converted perf counter query to support named instances.
2018-03-22 10:38:40 -07:00
Daniel Nelson e28f422d21
Update fsnotify path in license of dependencies 2018-03-21 23:06:14 -07:00
Daniel Nelson cd919066d5
Use copy of fsnotify from tail vendor 2018-03-21 10:23:28 -07:00
Pierre Tessier 6200683c29 Remove noisy debug message from Wavefront output (#3899) 2018-03-19 11:04:35 -07:00
Daniel Nelson 76ce71f7fa
Fix breaker stat name in elasticsearch comment 2018-03-16 12:58:39 -07:00
Daniel Nelson 2160779126
Set 1.5.3 release date 2018-03-14 16:32:18 -07:00
Daniel Nelson 6e5e2f713d
Update changelog 2018-03-14 12:10:16 -07:00
Jonas Hahnfeld 8e515688eb Add output of stderr in case of error to exec log message (#3862)
If the command failed with a non-zero exit status there might be an error
message on stderr. Append the first line to the error message to ease the
search for its cause.
2018-03-14 12:09:01 -07:00
Daniel Nelson 6d6631382c
Remove gdm -parallel false 2018-03-14 11:36:03 -07:00
Daniel Nelson f1b681cbdc
Use previous image on appveyor 2018-03-14 11:02:33 -07:00
Daniel Nelson 4118ec7629
Update changelog 2018-03-13 21:09:54 -07:00
Chris Ottinger f114f6a124 Added config flag to skip collection of network protocol metrics (#3880) 2018-03-13 21:08:21 -07:00
Daniel Nelson 8cfd001441
Disable parallel restore in gdm
May be aggrevating timeout issue on appveyor builds.
2018-03-13 20:44:51 -07:00
Daniel Nelson 9ce70aad77
Use Go 1.9.4 for builds 2018-03-09 14:37:26 -08:00
Patrick Hemmer 07dbbb27dc Fix socket_listener setting ReadBufferSize on TCP sockets (#3874) 2018-03-09 09:44:35 -08:00
Daniel Nelson 0e14e31b0a
Update changelog 2018-03-08 15:16:46 -08:00
Daniel Nelson 8b3767fd6e
Update http_response documentation 2018-03-08 15:13:26 -08:00
Germán Jaber 81a93fcddf Add result related tags and fields to http_response (#3814) 2018-03-08 14:55:59 -08:00
Margarita Bliznikova 8005883de8 Fix intermittent TestTailBadLine failures (#3869) 2018-03-08 13:03:48 -08:00
Daniel Nelson f7207f514e
Update changelog 2018-03-08 10:54:03 -08:00
Dennis Schön f1c8abd68c Fix uptime metric in passenger input plugin (#3871) 2018-03-08 10:52:58 -08:00
Daniel Nelson e4ce057885
Update changelog 2018-03-07 14:17:11 -08:00
dilshatm a6d366fb84 Fix collation difference in sqlserver input (#3786) 2018-03-07 14:16:17 -08:00
Daniel Nelson de22480e7d
Update example config 2018-03-07 13:49:04 -08:00
Daniel Nelson 2b65915b96
Update docs for addition of override processor 2018-03-07 13:47:54 -08:00
Karsten Schnitter 9d8b1b1e87 Add override processor (#3773)
This plugin can perform the standard metric modifications using override semantics.
2018-03-07 13:27:43 -08:00
Daniel Nelson b9ddbbd5ed
Update changelog 2018-03-06 13:12:16 -08:00
Margarita Bliznikova c377c8fb7c Add host to ping timeout log message (#3853) 2018-03-06 13:10:44 -08:00
Daniel Nelson 45c22e42da
Update changelog 2018-03-06 12:12:26 -08:00
Marcel ad5e954047 Add ability to override proxy from environment in http response (#3626) 2018-03-06 12:11:38 -08:00
Demian Dekoninck 93b2870b28 Add link to ServiceInput interface in contributing guide (#3828) 2018-03-06 10:14:14 -08:00
Patrick O'Keeffe 3501b65f7c Improve fail2ban use_sudo docs (#3852) 2018-03-05 16:32:45 -08:00
Jiri Tyr 35378ae9cc Fixing error in snmp example config (#3855) 2018-03-05 15:29:26 -08:00
Daniel Nelson 1212b2ddc5
Update changelog 2018-03-05 15:28:09 -08:00
Carl Pacey 0a37386c5e Add sum stat to basicstats aggregator (#3797) 2018-03-05 15:26:31 -08:00
Daniel Nelson 00a52a67b9
Update changelog 2018-03-05 11:42:01 -08:00
Michael Boudreau dc96c34e2c Add Solr 3 compatibility (#3799) 2018-03-05 11:41:10 -08:00
Daniel Nelson 5928219454
Update changelog 2018-02-25 01:06:44 -08:00
Daniel Nelson 8c932abff6
Disable keepalive in mqtt output. (#3779)
This functionality currently has race conditions that can result in the
output deadlocking.
2018-02-25 01:04:04 -08:00
Daniel Nelson fcd6d4eb09
Update changelog 2018-02-20 17:33:25 -08:00
Pranay Kanwar b355536b20 Convert boolean metric values to float in datadog output (#3804) 2018-02-20 17:32:18 -08:00
Daniel Nelson e988c83068
Update changelog 2018-02-20 16:07:10 -08:00
Fred Cox 80d9417315 Add server option to unbound plugin (#3713) 2018-02-20 16:06:13 -08:00
Daniel Nelson f4fa05530a
Update changelog 2018-02-20 13:56:44 -08:00
Jake Champlin 18aef35c58 Add shard server stats to the mongodb input plugin (#3808) 2018-02-20 13:55:56 -08:00
Daniel Nelson 8147d60973
Fix metric buffer limit in internal plugin after reload 2018-02-19 20:55:28 -08:00
Daniel Nelson df80fa6099
Update changelog 2018-02-16 14:08:11 -08:00
S 53221d87eb Add option to disable labels in prometheus output for string fields (#3765) 2018-02-16 14:07:26 -08:00
Dwight Spencer ddde8809f4 Add README.md for mqtt output (#3764) 2018-02-16 13:51:20 -08:00
Daniel Nelson 0ca3900abe
Method new dropwizard parser more prominently. 2018-02-15 20:33:57 -08:00
Daniel Nelson a777ce9293
Update changelog 2018-02-15 20:11:52 -08:00
everpcpc 3242f97deb Support deadline in ping plugin (#3783) 2018-02-15 20:11:07 -08:00
Daniel Nelson 6e35071c89
Update changelog 2018-02-15 20:06:01 -08:00
Jorge Canha cd620ac144 Add keep alive support to the TCP mode of statsd (#3781) 2018-02-15 20:04:49 -08:00
Daniel Nelson 6406abbc89
Update changelog 2018-02-15 19:09:50 -08:00
Daniel Nelson 9aabf56795
Use proxy from environment in http input 2018-02-15 19:06:22 -08:00
Daniel Nelson 4ac78d5c6d
Deprecate httpjson input 2018-02-15 19:06:22 -08:00
Daniel Nelson 3fe3d75bb3
Add configurable method to http input 2018-02-15 19:06:22 -08:00
Daniel Nelson a55456b56c
Check parser initialization earlier 2018-02-15 19:06:22 -08:00
Daniel Nelson 6c656d92a0
Add url tag only if not already set 2018-02-15 19:06:20 -08:00
Daniel Nelson 2ee270f274
Allow setting basic auth with empty username 2018-02-15 19:05:36 -08:00
Daniel Nelson 5b37fd3ae9
Update http input documentation 2018-02-15 19:05:36 -08:00
Nicolas Grange f82f03b92c Add http input plugin which supports any input data format (#3546) 2018-02-15 16:00:10 -08:00
Mark Wilkinson - m82labs 42ccc9f324 Added additional SQL Server performance counters (#3770)
* Included system databases in server properties, added backup/restore throughput counter, error counters, and user settable counters.

* Added more resource governor counters.

* Added Target and Total Server Memory counters.

* Removed the c_type tag from the performance counters query, added more documentation instead.
2018-02-09 12:45:22 -08:00
Daniel Nelson a00d5b48f8
Update changelog 2018-02-09 12:13:07 -08:00
efficks f5ea13a9ab Fix ping plugin not reporting zero durations (#3778) 2018-02-09 12:11:19 -08:00
Daniel Nelson 32dd1b3725
Adjust time of nightly build 2018-02-07 18:37:33 -08:00
Daniel Nelson 1b0e87a8b0
Update changelog 2018-02-07 18:37:32 -08:00
Daniel Nelson efa9095829
Add TLS support to the mesos input plugin (#3769) 2018-02-07 18:36:38 -08:00
Daniel Nelson 89974d96d7
Install new requirements for fpm gem install 2018-02-06 11:33:18 -08:00
Daniel Nelson 8c51d629eb
Update changelog 2018-02-05 12:55:22 -08:00
Andy Cobaugh ea0be51985 Add additional metrics and reverse metric names option to openldap (#3722) 2018-02-05 12:48:41 -08:00
Daniel Nelson 5639d5608d
Update paho mqtt to latest release 2018-02-05 12:20:14 -08:00
Daniel Nelson 9a1d69a2ae
Update changelog 2018-02-05 11:17:36 -08:00
Philipp Weber b7a68eef56 Remove userinfo from url tag in prometheus input (#3743) 2018-02-05 11:16:00 -08:00
Daniel Nelson be688ec761
Update sample config in contributing docs 2018-02-02 12:31:31 -08:00
Daniel Nelson 3208fc32ee
Run nightly build sequentially 2018-02-02 12:31:31 -08:00
Daniel Nelson 1f87c10dd4
Fix Makefile on Windows and use in AppVeyor build (#3748) 2018-02-02 12:25:59 -08:00
Pierre Tessier 281f4d3688 Fix example source_override values in wavefront output (#3744) 2018-02-02 10:51:00 -08:00
Daniel Nelson 3dcf66aed6
Update gitignore 2018-02-01 16:18:01 -08:00
Daniel Nelson 01479af096
Update changelog 2018-02-01 16:12:57 -08:00
Daniel Nelson 23933e1139
Improve procstat readme 2018-02-01 16:12:08 -08:00
Ben Aldrich a7571d5730 Add native Go method for finding pids to procstat (#3559) 2018-02-01 15:14:27 -08:00
Paul Myjavec 12d62e60b3 Use CircleCI 2.0 for builds (#3731) 2018-02-01 15:05:39 -08:00
Daniel Nelson 4153d2ca42
Update changelog 2018-02-01 12:15:24 -08:00
Daniel Nelson 8c8c9200e7
Update sqlserver readme; enable query_version = 2 in default config
If unset, query_version is still treated as version 1 for compatibility.
2018-02-01 12:13:49 -08:00
Mark Wilkinson - m82labs 426360d61f Add new sql server output data model (#3618) 2018-02-01 11:50:26 -08:00
John Eismeier 86e08e6ce7 Fix spelling mistakes in zipkin and apache inputs (#3741) 2018-02-01 11:15:12 -08:00
Daniel Nelson a462b555a7
Update changelog 2018-02-01 11:13:14 -08:00
Philipp Weber a2635573a8 Add TLS and http basic_auth to prometheus_client output (#3719) 2018-02-01 11:12:16 -08:00
Daniel Nelson ec8e923fda
Update documetation style for smart input 2018-02-01 10:51:03 -08:00
Daniel Nelson d43e8262b7
Update changelog 2018-01-31 12:30:03 -08:00
Laurent Sesquès 7b365180d0 Add Ipset input plugin (#3346) 2018-01-31 12:25:27 -08:00
Daniel Nelson 32732d42f8
Update changelog 2018-01-30 18:08:31 -08:00
Daniel Nelson 10e51e4b49
Set path to / if HOST_MOUNT_PREFIX matches full path (#3736) 2018-01-30 18:06:53 -08:00
Daniel Nelson 3a85e7b1f0
Set release date for 1.5.2 2018-01-30 14:00:34 -08:00
Daniel Nelson 5d87ad85a1
Update changelog 2018-01-30 14:00:33 -08:00
Daniel Nelson c28d0e1b16
Exclude master_replid fields from redis input (#3725) 2018-01-30 13:58:44 -08:00
Daniel Nelson 1b0a4e49cd
Do not build nats input on freebsd
This plugin can work on freebsd, but will only build with cgo
enabled.  For now, disable this plugin to avoid this requirement.
2018-01-30 12:04:21 -08:00
Daniel Nelson f9c48ee2f0
Update changelog 2018-01-29 14:02:44 -08:00
Philipp Weber 1b84ac08ab Add support for setting bsd source address to the ping input (#3726) 2018-01-29 14:01:00 -08:00
Daniel Nelson bcefe90846
Update changelog 2018-01-29 12:16:15 -08:00
Ildar Svetlov da12c64791 Add ability to select which queues will be gathered to rabbitmq input (#3702) 2018-01-29 12:14:49 -08:00
Daniel Nelson de03ee3caa
Update nats readme 2018-01-26 17:15:02 -08:00
Daniel Nelson fbd3544a9d
Add nats input to readme and changelog 2018-01-26 15:18:15 -08:00
Menno Finlay-Smits fb947e8fe7 Add NATS Monitoring Input Plugin (#3674) 2018-01-26 15:14:54 -08:00
Daniel Nelson 5b130b6ea0
Update changelog 2018-01-26 15:03:19 -08:00
Ivan Lopez 48092ed598 Add RabbitMQ cluster and running nodes count and running node status (#3703) 2018-01-26 15:00:58 -08:00
Daniel Nelson efb9d5b4cb
Return Accumulator interface from NewAccumulator 2018-01-26 11:40:34 -08:00
Peter c17427631d Expand on tagvalue option in postgresql_extensible (#3720) 2018-01-25 15:38:11 -08:00
Daniel Nelson 8527a1b7b8
Update changelog 2018-01-25 15:05:46 -08:00
Logan d831dbc51d Allow running as console application on Windows (#2754) 2018-01-25 15:04:09 -08:00
Daniel Nelson f9c0aa1e23
Update changelog 2018-01-25 13:47:21 -08:00
Pierre Tessier 3e4c91880a Add timeout to wavefront output write (#3711) 2018-01-25 13:44:25 -08:00
Daniel Nelson 899c3a2ae1
Update changelog 2018-01-22 12:06:10 -08:00
Daniel Nelson 4558aeddeb
Remove graphite serializer replacement of dot with underscore in field key (#3705) 2018-01-22 12:04:16 -08:00
Daniel Nelson 36c9113917
Update changelog 2018-01-22 12:01:09 -08:00
Daniel Nelson 5270aa451c
Avoid loop creation in second processor pass (#3656) 2018-01-22 11:16:07 -08:00
Daniel Nelson 91fc2765b1
Limit wait time for writes in mqtt output (#3699) 2018-01-22 11:15:13 -08:00
Daniel Nelson ef776f120b
Make error loading tls config fatal in mysql input 2018-01-19 12:16:28 -08:00
Daniel Nelson 5bac08662e
Update changelog 2018-01-18 17:39:03 -08:00
Piotr Popieluch 601dc99606 Align aggregator period with internal ticker to avoid skipping metrics (#3693)
By the time the aggregator.run() was called about 600ms already passed since setting now which was skewing up the aggregation intervals and skipping metrics.
2018-01-18 17:37:53 -08:00
Daniel Nelson 0f55d9eba2
Update changelog 2018-01-17 15:28:35 -08:00
Piotr Popieluch f374a295d9 Reconnect before sending graphite metrics if disconnected (#3680) 2018-01-17 15:27:24 -08:00
Daniel Nelson 548157852c
Update changelog 2018-01-17 15:14:07 -08:00
Daniel Nelson 822cfbc8e8
Add support for using globs in devices list of diskio input plugin (#3687) 2018-01-17 15:12:05 -08:00
Daniel Nelson fa5f1bf6d9
Use go-redis for the redis input (#3661) 2018-01-17 14:57:46 -08:00
Daniel Nelson ad921a3840
Update changelog 2018-01-17 14:38:47 -08:00
Michael Boudreau 9d559292a5 Fix index out of bounds error in solr input plugin (#3683) 2018-01-17 14:37:34 -08:00
Daniel Nelson 6e24056757
Update changelog 2018-01-16 13:46:41 -08:00
Noah Crowley 87830a1c38 Ignore empty lines in Graphite plaintext (#3684) 2018-01-16 13:44:56 -08:00
atzoum d188b78d9e Add string and boolean support to dropwizard; fix escaping of tags/fields (#3664) 2018-01-16 12:12:14 -08:00
Daniel Nelson 6e4650da3a
Update changelog 2018-01-12 17:46:20 -08:00
Jacob McCann 7ab0d50116 Add container health metrics to docker input (#3666) 2018-01-12 17:43:51 -08:00
Daniel Nelson 97f6c9d8e1
Skip intermittent test on CircleCI 2018-01-12 16:49:05 -08:00
Jacob McCann 666eb47613 Listen on localhost interface in tests (#3667) 2018-01-12 12:08:19 -08:00
Daniel Nelson 90b6b760d1
Set 1.5.1 release date 2018-01-10 13:27:58 -08:00
Daniel Nelson f3147cc44d
Skip CircleCI test of tail plugin due to intermittent deadlock 2018-01-09 15:01:20 -08:00
Daniel Nelson 3cf0ba1ccf
Pin crate docker image for testing 2018-01-09 13:10:40 -08:00
Daniel Nelson 2b972dcd56
Update release notes 2018-01-08 16:29:59 -08:00
Daniel Nelson ce06d0cee0
Update changelog 2018-01-08 15:21:20 -08:00
Daniel Nelson 24ae3293bc
Update changelog 2018-01-08 15:18:31 -08:00
Daniel Nelson 0ddb1d26a0
Add gjson and match to dependency license file 2018-01-08 15:15:23 -08:00
atzoum 317de40ac4 Add support for dropwizard input format (#2846) 2018-01-08 15:11:36 -08:00
Daniel Nelson 9cfa3b292b
Reorder httpjson config to keep variables out of toml table 2018-01-08 15:06:58 -08:00
Daniel Nelson 0bf63a29f1
Update changelog 2018-01-05 16:04:12 -08:00
James 1d86064fb7 Use persistent connection to postgresql database (#2701) 2018-01-05 16:03:09 -08:00
Daniel Nelson 53e7537c5c
Fix link to cratedb readme 2018-01-05 16:01:06 -08:00
Daniel Nelson 6dd5c3b2c0
Update changelog 2018-01-05 16:00:44 -08:00
Daniel Nelson 2938c2fa79
Add user privilege level setting to IPMI sensors (#3643) 2018-01-05 15:59:25 -08:00
Daniel Nelson 35f1b9f500
Update changelog 2018-01-05 14:56:54 -08:00
gerardocorea92 ae848e9539 Add available_entropy field to kernel input plugin (#3524) 2018-01-05 14:54:29 -08:00
Daniel Nelson 163f18f959
Update release notes for 1.5 2018-01-04 18:05:21 -08:00
Daniel Nelson 37757b7782
Add link to docs for configuring the openldap monitoring backend 2018-01-04 15:34:55 -08:00
Daniel Nelson 315fd1e987
Update changelog 2018-01-04 15:29:56 -08:00
Daniel Nelson b0c2bb870e
Escape environment variables during config toml parsing (#3637) 2018-01-04 15:28:00 -08:00
Daniel Nelson 11c6a7f9c9
Update changelog 2018-01-03 17:47:13 -08:00
Richard Elling 92acef1664 Add support for additional metrics on Linux in zfs input (#3565) 2018-01-03 17:45:48 -08:00
Daniel Nelson 5397c02570
Update changelog 2018-01-03 17:40:37 -08:00
kerams 87f1d45ee0 Add support for exchanges to RabbitMQ input (#3619) 2018-01-03 17:38:11 -08:00
Daniel Nelson 07cb749e04
Update changelog 2018-01-03 13:44:33 -08:00
kerams acea7109d4 Fix deliver_get field in rabbitmq input (#3633) 2018-01-03 13:43:17 -08:00
Daniel Nelson 009b649a13
Update changelog 2018-01-02 16:38:20 -08:00
Daniel Nelson b900967b78
Add wired field to mem input (#3632) 2018-01-02 16:37:11 -08:00
Daniel Nelson 81f42e8b17
Update changelog 2018-01-02 16:36:04 -08:00
Adam Johnson 56be3d3236 Reintroduce AWS credential check to cloudwatch output (#3587) 2018-01-02 16:33:15 -08:00
Daniel Nelson a440ed8d8c
Add information about how to set permissions for postfix input (#3594) 2018-01-02 14:09:14 -08:00
Daniel Nelson 06c21fb9f7
Update changelog 2017-12-28 16:24:04 -08:00
Daniel Nelson 4f7afb8cb5
Set content-type charset in influxdb output and allow it be overridden (#3593) 2017-12-28 16:22:19 -08:00
Daniel Nelson ef6e5c5a85
Update changelog 2017-12-28 16:19:04 -08:00
Daniel Nelson 005face7c0
Fix DC/OS login expiration time (#3625) 2017-12-28 16:17:40 -08:00
Daniel Nelson 1011cd0c94
Update changelog 2017-12-28 16:12:56 -08:00
Daniel Nelson 6c075c4346
Fix name error in jolokia2_agent sample config (#3624) 2017-12-28 16:10:00 -08:00
Daniel Nelson 7f3f556b39
Fix grammar in haproxy docs 2017-12-21 18:46:03 -08:00
Daniel Nelson 6639f44c17
Fix grammar in dcos readme 2017-12-21 16:26:50 -08:00
Daniel Nelson 801a248668
Update changelog 2017-12-18 20:39:26 -08:00
kerams 496452144c Add messages_delivered_get to rabbitmq_overview (#3596) 2017-12-18 20:36:59 -08:00
Daniel Nelson 3029d58cad
Update changelog 2017-12-14 16:59:58 -08:00
Jeff Ashton fcc9c82d34 Add control over which stats to gather in basicstats aggregator (#3580) 2017-12-14 16:56:10 -08:00
Daniel Nelson 4f1ea13ebf
Update bond input description 2017-12-14 16:03:29 -08:00
timhallinflux b90ee4a43c Improve bond plugin description (#3588) 2017-12-14 15:59:20 -08:00
Daniel Nelson 4537eb2c5d
Update haproxy documentation 2017-12-14 15:50:03 -08:00
Daniel Nelson d6fd9ce738
Set release date for 1.5.0 2017-12-14 10:58:33 -08:00
Daniel Nelson 5b40173bcb
Remove AWS credential check from cloudwatch output (#3583)
This method is reported to not work with IAM Instance Profiles, and we
do not want to make any calls that would require additional permissions.
2017-12-13 17:51:55 -08:00
Brian Knight 6638fc68de Update README with missing Redis measurements (#3582) 2017-12-13 11:24:48 -08:00
Antoine Augusti 9ad0297b1f Fix refType documentation for GitHub webhooks (#3579) 2017-12-13 11:22:47 -08:00
Daniel Nelson 15266bb7eb
Update changelog 2017-12-13 11:17:36 -08:00
Ildar Svetlov d935dfa9ed Don't add system input uptime_format as a counter (#3578) 2017-12-13 11:13:56 -08:00
Daniel Nelson 8785c7d78d
Update changelog 2017-12-13 10:58:50 -08:00
Logan fb3d66cdd3 Typo and sentence consistency (#3581) 2017-12-13 10:51:15 -08:00
Daniel Nelson de180d1e56
Update changelog 2017-12-12 13:32:47 -08:00
Mike Danko df9c7590b3 Fix various mysql data type conversions (#3554) 2017-12-12 13:22:11 -08:00
Steve Banik d7d224d511 Fixed typo in README.md (#3574) 2017-12-12 11:21:32 -08:00
Daniel Nelson abcad439eb
Update changelog 2017-12-11 18:01:50 -08:00
Daniel Nelson 8484de6c12
Fix separation of multiple prometheus_client outputs (#3570) 2017-12-11 18:00:19 -08:00
Daniel Nelson ab8376de03
Update exec plugin documentation 2017-12-11 17:58:06 -08:00
Daniel Nelson ff634c5056
Update changelog 2017-12-11 15:34:52 -08:00
Daniel Nelson 14b31a2354
Add idle state to processes test 2017-12-11 15:33:44 -08:00
Ted Zlatanov 663a5b1f50 Support I (idle) process state on procfs+Linux (#3530) 2017-12-11 15:31:52 -08:00
Daniel Nelson 93d16a4603
Use auto type detection for scanned devices in smart input (#3561) 2017-12-08 18:03:12 -08:00
Daniel Nelson 88746b01c3
Update changelog 2017-12-08 18:02:01 -08:00
Daniel Nelson 37095ef47d
Update sarama-cluster to latest release (#3560) 2017-12-08 17:59:06 -08:00
Daniel Nelson 4f42d8a298
Add benchmark test for single metric 2017-12-08 13:23:08 -08:00
Daniel Nelson 574034c301
Use device name instead of abs path for devices tag in smart input (#3550) 2017-12-08 13:22:41 -08:00
Daniel Nelson 654e953a89
Update changelog 2017-12-07 11:32:54 -08:00
Arkady Emelyanov 4d91162abd Add health status mapping from string to int in elasticsearch input (#3551) 2017-12-07 11:31:03 -08:00
Daniel Nelson 177e7e2c73
Log connect error only in wavefront output (#3549) 2017-12-06 14:55:29 -08:00
Daniel Nelson d8966d5067
Fix formatting in changelog 2017-12-04 13:18:14 -08:00
Daniel Nelson bdda6ceb70
Update next version number for dev builds 2017-12-01 11:52:46 -08:00
Daniel Nelson ca8911fec0
Update example config 2017-12-01 11:49:07 -08:00
Daniel Nelson 2c5a5373f6
Update changelog 2017-12-01 11:42:00 -08:00
Daniel Nelson cabe10b88a
Update changelog 2017-12-01 11:23:18 -08:00
Daniel Nelson 7f66863b87
Fix HOST_MOUNT_PREFIX in docker with disk input (#3529) 2017-12-01 11:21:39 -08:00
Daniel Nelson e400ec2b57
Update changelog 2017-11-30 18:42:14 -08:00
Daniel Nelson 44320a5421
Add option to amqp output to publish persistent messages (#3528) 2017-11-30 18:40:12 -08:00
Daniel Nelson a9951710b3
Add time import 2017-11-29 17:05:13 -08:00
Daniel Nelson 6426bca1f8
Update changelog 2017-11-29 16:36:00 -08:00
Nathan Ferch f92a4f528f Add input plugin for OpenBSD/FreeBSD pf (#3405) 2017-11-29 16:32:50 -08:00
Daniel Nelson 3ba5458220
Update changelog 2017-11-29 12:17:46 -08:00
Bob Shannon beb9d7560d Add support for glob patterns in net input plugin (#3140) 2017-11-29 12:16:34 -08:00
Daniel Nelson 24d82aebe6
Update changelog 2017-11-29 12:10:56 -08:00
Daniel Nelson 7dc256e845
Update gopsutil version to include netstat fix (#3513) 2017-11-29 12:06:47 -08:00
Daniel Nelson 297897ae0a
Add dcos plugin to changelog and readme 2017-11-29 11:54:33 -08:00
Daniel Nelson 414a7e34fb
Add input plugin for DC/OS (#3519) 2017-11-29 11:50:32 -08:00
Patrick Hemmer bf65e19486 Fix postfix plugin age to use ctime, not mtime (#3525) 2017-11-29 11:25:31 -08:00
Daniel Nelson 2c70958c24
Update changelog 2017-11-29 10:52:59 -08:00
Daniel Nelson d727a6f85c
Add slab to mem plugin (#3518) 2017-11-29 10:49:45 -08:00
Daniel Nelson 4e9b19f7a6
Add bond input to readme and update changelog 2017-11-28 15:19:30 -08:00
Ildar Svetlov 132fb50150 Add bond input plugin (#3424) 2017-11-28 15:16:19 -08:00
Daniel Nelson d1ba75176d
Update changelog 2017-11-28 10:10:36 -08:00
Patrick Hemmer 76240b9f18 Add postfix input plugin (#2553) 2017-11-28 10:08:41 -08:00
Daniel Nelson 06e22ee7ac
Update changelog 2017-11-27 17:06:50 -08:00
Lukasz Jagiello a18eedb970 Use deb-systemd-invoke to restart service (#3506)
From man page:
```
deb-systemd-invoke is a Debian-specific helper script which asks
       /usr/sbin/policy-rc.d before performing a systemctl call.

deb-systemd-invoke is intended to be used from maintscripts to start
       systemd unit files. It is specifically NOT intended to be used
       interactively by users. Instead, users should run systemd and use
       systemctl, or not bother about the systemd enabled state in case they
       are not running systemd.
```

This PR replace regular `systemctl` with `deb-systemd-invoke`.
2017-11-27 17:05:32 -08:00
Lukasz Jagiello 6514399baf Add shadow-utils dependency to rpm package (#3505) 2017-11-27 17:02:16 -08:00
Dylan Meissner 27994abcb5 Jolokia2 handles unordered mbean object name properties (#3504) 2017-11-27 13:43:19 -08:00
Daniel Nelson a9ada5f65b
Update changelog 2017-11-27 12:32:36 -08:00
Laurent Gosselin f758d0c6c3 Fix global variable collection when using interval_slow option in mysql input (#3500) 2017-11-27 12:29:51 -08:00
Daniel Nelson 7442b5645f
Update changelog 2017-11-20 16:50:18 -08:00
Daniel Nelson d5bd426e0c
Fix snmp tools output parsing when they contain Windows eols (#3396) 2017-11-20 16:48:30 -08:00
Daniel Nelson 154b263f14
Update changelog 2017-11-20 16:27:18 -08:00
Leandro Piccilli 92ca661662 Add support for tags in the index name in elasticsearch output (#3470) 2017-11-20 16:25:36 -08:00
Daniel Nelson 54b0b9e727
Update changelog 2017-11-20 14:40:45 -08:00
aromeyer dc2c8791d0 Add opensmtpd input plugin (#3449) 2017-11-20 14:39:13 -08:00
Daniel Nelson 367bbdeb7e
Update changelog 2017-11-20 14:37:09 -08:00
aromeyer e544d742f9 Add unbound input plugin (#3434) 2017-11-20 14:32:06 -08:00
Daniel Nelson 393c4c6c2d
Update changelog 2017-11-20 14:23:16 -08:00
Leandro Piccilli 4d1bc620b2 Add index by week number to Elasticsearch output (#3490) 2017-11-20 14:22:29 -08:00
Daniel Nelson db8e767f1f
Update changelog 2017-11-20 14:20:05 -08:00
Chris Goller afe05fcfef Use hexadecimal ids and lowercase names in zipkin input (#3488) 2017-11-20 14:19:32 -08:00
Daniel Nelson 9422cca2cc
Update changelog 2017-11-16 16:51:02 -08:00
erayaslan a06ee58785 Use MAX() instead of SUM() for latency measurements in sqlserver (#3471) 2017-11-16 16:49:51 -08:00
Daniel Nelson b13eea89b1
Update changelog and add particle webhook to readme 2017-11-16 16:11:20 -08:00
David G. Simmons b813e2ecae Add Particle Webhook Plugin (#3477) 2017-11-16 16:03:19 -08:00
Pierre Fersing 8364417009 Whitelist allowed char classes for graphite output (#3473) 2017-11-15 14:44:20 -08:00
Daniel Nelson 136c15ba33
Skip test requiring cratedb server in short test mode 2017-11-13 15:22:57 -08:00
Daniel Nelson 19839c0167
Update changelog 2017-11-13 15:09:05 -08:00
Daniel Nelson 72682973bd
Fix typo in error message 2017-11-13 15:07:54 -08:00
faye-sama a411306fba Fail metrics parsing on unescaped quotes (#3409)
Before this change Fields() method on a metric parsed from a line with
unescaped quotes could panic. This change makes such line unparseable.

Fixes #3326
2017-11-13 15:06:47 -08:00
Patrick Hemmer cbd346117a Add tests for procstat systemd & cgroup matching (#3469) 2017-11-13 14:45:31 -08:00
Daniel Nelson 181a56018f
Update changelog 2017-11-13 11:02:01 -08:00
Patrick Hemmer 6ee6d55751 Add systemd unit pid and cgroup matching to procstat (#3459) 2017-11-13 10:59:27 -08:00
Daniel Nelson ebd73b7279
Update changelog 2017-11-10 14:39:11 -08:00
Trevor Pounds 6a57395731 Compile with Go 1.9.2 (#3458) 2017-11-10 14:39:00 -08:00
Daniel Nelson be13f69305
Update changelog 2017-11-09 14:05:36 -08:00
Felix Geisendörfer 62ec3e50d9 Add CrateDB output plugin (#3210) 2017-11-09 14:03:16 -08:00
Daniel Nelson 07297e80a8
Set 1.4.4 release date 2017-11-08 15:21:20 -08:00
Daniel Nelson f0578b8c83
Update changelog 2017-11-07 16:48:44 -08:00
Lukasz Jagiello 493af043d3 Add Solr input plugin (#2019) 2017-11-07 16:44:09 -08:00
Daniel Nelson 47d013132a
Update changelog 2017-11-07 14:37:04 -08:00
Pierre Tessier dcff769fed Add modification_time field to filestat input plugin (#3305) 2017-11-07 14:32:48 -08:00
Daniel Nelson 5141f8a2a0
Update contributing documentation 2017-11-07 13:59:06 -08:00
Daniel Nelson bb14589469
Update changelog 2017-11-07 13:59:06 -08:00
Daniel Nelson b81bea658f
Always ignore autofs filesystems in disk input (#3440) 2017-11-07 11:45:09 -08:00
Daniel Nelson 2c2dc97702
Update changelog 2017-11-07 11:43:15 -08:00
Daniel Nelson cbbdf1043b
Use current time if container read time is zero value (#3437) 2017-11-07 11:41:53 -08:00
Daniel Nelson c55f285de0
Update changelog 2017-11-07 11:36:29 -08:00
Daniel Nelson e1295c41c8
Update gopsutil to v2.17.10 (#3441) 2017-11-07 11:26:11 -08:00
Daniel Nelson e0df62c27b
Update changelog 2017-11-06 17:42:42 -08:00
Bob Shannon fdf12ce6b4 Redact datadog API key in log output (#3420) 2017-11-06 17:41:14 -08:00
Daniel Nelson e5a265c8c7
Revert particle webhook changes on master 2017-11-06 10:47:10 -08:00
David G. Simmons 112955a9f5 Merge branch 'master' of https://github.com/influxdata/telegraf into dn-particle-plugin 2017-11-04 09:30:17 -04:00
David G. Simmons da0ca8a870 Revert "Undo Revert "Revert changes since 9b0af4478""
This reverts commit 6e6aefe5da.
2017-11-04 09:19:37 -04:00
David G. Simmons 6e6aefe5da Undo Revert "Revert changes since 9b0af4478"
This reverts commit 2c31345c70.
2017-11-04 09:14:52 -04:00
David G. Simmons ae2635b547
Readme update 2017-11-04 08:43:13 -04:00
Daniel Nelson c14478f025
Update http_listener certs 2017-11-03 21:52:45 -07:00
Daniel Nelson 2c31345c70
Revert changes since 9b0af4478 2017-11-03 21:10:56 -07:00
David G. Simmons 4a9fa7ef4b Merge branch 'master' of https://github.com/influxdata/telegraf into dn-particle-plugin 2017-11-03 13:48:45 -04:00
David G. Simmons 7db06d2aa4 Revert "New Particle Plugin"
This reverts commit ba462f5c94.
2017-11-03 13:28:54 -04:00
David G. Simmons 871fae6eb3 Revert "bug fixes and refactoring"
This reverts commit 86961cc814.
2017-11-03 13:28:35 -04:00
David G. Simmons 8e587e74f5 Revert "Update README.md"
This reverts commit 8ed00af10a.
2017-11-03 13:28:00 -04:00
David G. Simmons 440918a03b Revert "Updated README.md"
This reverts commit a6ada03b91.
2017-11-03 13:27:06 -04:00
David G. Simmons f64b23b724 Revert "Small fixes"
This reverts commit a987118b01.
2017-11-03 13:27:06 -04:00
David G. Simmons c11739d143 Revert "Updated Test JSON"
This reverts commit 92caf33fff.
2017-11-03 13:27:06 -04:00
David G. Simmons 883696c224 Revert "Updated Test JSON"
This reverts commit 92caf33fff.
2017-11-03 13:16:09 -04:00
David G. Simmons 0ea0519e89
Merge branch 'master' into dn-particle-plugin 2017-11-03 12:13:49 -04:00
David G. Simmons 4596ae70a9 ignore mac-files 2017-11-03 12:07:03 -04:00
David G. Simmons 92caf33fff Updated Test JSON 2017-11-03 12:07:03 -04:00
David G. Simmons a987118b01 Small fixes
Hoping to pass CircleCI this time
2017-11-03 12:07:03 -04:00
David G. Simmons a6ada03b91 Updated README.md 2017-11-03 12:07:03 -04:00
David G. Simmons 8ed00af10a Update README.md 2017-11-03 12:07:03 -04:00
David Norton 86961cc814 bug fixes and refactoring 2017-11-03 12:07:03 -04:00
David G. Simmons ba462f5c94 New Particle Plugin 2017-11-03 12:07:03 -04:00
David G. Simmons 1d1d5e6089
Updated Test JSON 2017-11-02 17:21:50 -04:00
David G. Simmons 8560c2f88d
Fixed Readme 2017-11-02 17:19:37 -04:00
David G. Simmons 5d135cece3
test son update 2017-11-02 14:19:01 -04:00
Daniel Nelson 9b0af4478b
Remove incorrect comment about linker options 2017-11-01 18:17:51 -07:00
Daniel Nelson 26ccc1f205
Add teamspeak to readme and update changelog 2017-11-01 13:30:43 -07:00
Patric Kanngießer 76ed70340b Add Teamspeak 3 input plugin (#3315) 2017-11-01 13:27:59 -07:00
Maximilien Richer 5f215c22fe Fix typos in comments (#3415) 2017-10-31 17:00:06 -07:00
Maximilien Richer 63842d48fd Add config to input-varnish README (#3414) 2017-10-31 16:58:45 -07:00
Daniel Nelson 777b84d1dc
Clarify what it means to filter metrics from processors 2017-10-30 16:32:39 -07:00
Daniel Nelson c116af35c7
Update changelog 2017-10-30 15:35:34 -07:00
Daniel Nelson fcfcc803b1
Use explicit schemas in mqtt_consumer input (#3401) 2017-10-30 15:33:20 -07:00
Daniel Nelson 4d5de8698b
Update changelog 2017-10-30 13:53:45 -07:00
Aditya C S 23ad959d71 Add support for SSL settings to ElasticSearch output plugin (#3406) 2017-10-30 13:52:40 -07:00
Aditya C S d9fa916711 Update docker plugin README (#3404) 2017-10-30 12:26:39 -07:00
Daniel Nelson 53b13a20d0
Update changelog 2017-10-27 11:55:17 -07:00
Maximilien Richer ffa8a4a716 Add instance name option to varnish plugin (#3398)
This change add a new configuration option to allow probing of
namespaced varnish instances, usually reached using the '-n' switch on
the varnish cli.
2017-10-27 11:53:59 -07:00
Daniel Nelson 8b4708c82a
Update changelog 2017-10-26 13:37:54 -07:00
Vladimir S 88ec171293 Perform DNS lookup before ping (#3385) 2017-10-26 13:35:37 -07:00
Daniel Nelson 5885ef2c1c
Update changelog 2017-10-25 15:29:56 -07:00
Daniel Nelson a519abf13f Gather concurrently from snmp agents (#3365) 2017-10-25 15:28:55 -07:00
Daniel Nelson 6ea61b55d9
Set release date for 1.4.3 2017-10-25 14:15:10 -07:00
Daniel Nelson 206397d475
Update changelog 2017-10-24 16:31:22 -07:00
Jeremy Doupe a6797a44d5 Add history and summary types to telegraf and prometheus plugins (#3337) 2017-10-24 16:28:52 -07:00
Daniel Nelson 13c1f1524a
Update changelog 2017-10-24 16:25:49 -07:00
Daniel Nelson 9a062498e7 Use golang.org/x/sys/unix instead of syscall in diskio (#3384) 2017-10-24 16:22:31 -07:00
Daniel Nelson f64cf89db1
Update changelog 2017-10-24 15:46:47 -07:00
Daniel Nelson 6d1777276c If the connector name cannot be unquoted, use the raw value (#3371) 2017-10-24 15:36:23 -07:00
Daniel Nelson 65580759fc
Update changelog 2017-10-23 12:36:31 -07:00
Sergei Smolianinov d2f9fc7d8c Fix ACL token usage in consul input plugin (#3376) 2017-10-23 12:31:27 -07:00
Daniel Nelson 77cc071796
Update changelog 2017-10-19 17:06:14 -07:00
Daniel Nelson 4deb6238a3 Add support for decimal timestamps to ts-epoch modifier (#3358) 2017-10-19 16:36:32 -07:00
Daniel Nelson 7088d98304
Update changelog 2017-10-19 16:27:29 -07:00
Daniel Nelson 4243403432 Remove warning when JSON contains null value (#3359) 2017-10-19 16:25:58 -07:00
Mamat Rahmat 3bbc2beeed Fix small typo in documentation (#3364) 2017-10-19 14:47:40 -07:00
Daniel Nelson 0e6a70b199
Update changelog 2017-10-18 17:43:01 -07:00
Daniel Nelson ec4efe5b03 Use labels in prometheus output for string fields (#3350) 2017-10-18 17:42:30 -07:00
Daniel Nelson adb1f5588c
Update changelog 2017-10-18 14:53:34 -07:00
Daniel Nelson 6e5915c59f Fix prometheus passthrough for existing value types (#3351) 2017-10-18 14:51:08 -07:00
Daniel Nelson 9b59cdd10e
Update changelog 2017-10-18 13:57:58 -07:00
clheikes 02baa696c3 Fix TELEGRAF_OPTS expansion in systemd service unit (#3354) 2017-10-18 13:57:32 -07:00
Daniel Nelson a4fa19252f
Update changelog 2017-10-18 12:47:58 -07:00
Daniel Nelson 7ba376964c
Update changelog 2017-10-18 12:25:46 -07:00
Ayrdrie a75ab3e190 Fix mongodb input panic when restarting mongodb (#3355) 2017-10-18 12:24:30 -07:00
Daniel Nelson 2208657d73
Add release date info to FAQ 2017-10-17 10:43:53 -07:00
Daniel Nelson 9d8e935734
Update changelog 2017-10-16 14:26:12 -07:00
Pierre Fersing f5a9d1bc75 Fix CPU system plugin gets stuck after system suspend (#3342) 2017-10-16 14:25:00 -07:00
Daniel Nelson 4b05edea53
Update changelog 2017-10-16 14:19:16 -07:00
Craig Wickesser 246ffab3e0 Add UDP IPv6 support to statsd input (#3344) 2017-10-16 14:18:36 -07:00
Daniel Nelson 3ea41e885c
Update changelog 2017-10-16 11:27:00 -07:00
Daniel Nelson 1f348037b7 Fix case sensitivity issue in sqlserver query (#3336) 2017-10-16 11:26:16 -07:00
Daniel Nelson 86f19dee2b
Fix typo in ipmi_sensor readme 2017-10-16 11:10:06 -07:00
Daniel Nelson a1796989f7
Add ipmi_sensor permission documentation 2017-10-13 13:53:18 -07:00
Daniel Nelson 6b67fedfdc
Remove timing sensitive riemann test 2017-10-13 11:30:30 -07:00
Daniel Nelson 5cd3327d5f
Update changelog 2017-10-13 11:12:27 -07:00
Adam Johnson bf9f94eb9d Fix cloudwatch output requires unneeded permissions (#3335) 2017-10-13 11:04:40 -07:00
Daniel Nelson 0f9f757da7
Update changelog 2017-10-12 17:26:58 -07:00
Windkit Li 2f8d0f4d47 Fix snmpwalk address format in leofs input (#3328) 2017-10-12 17:26:14 -07:00
Daniel Nelson 024dea2ff9
Update changelog 2017-10-12 15:52:01 -07:00
Daniel Nelson fa25e123d8 Fix container name filters in docker input (#3331) 2017-10-12 15:50:09 -07:00
Patrick Hemmer bed14e5037 Fix documented equation for diskio average queue depth (#3334) 2017-10-12 15:08:51 -07:00
Daniel Nelson c74c29b164
Remove suggested plugins from readme.
These are confusing since we don't support all of the examples.
2017-10-11 12:56:33 -07:00
Daniel Nelson 4e0c8e6026
Set 1.4.2 release date 2017-10-10 13:29:31 -07:00
Daniel Nelson d7ea83f39b
Update readme and changelog for basicstats aggregator 2017-10-10 12:04:41 -07:00
Toni Moreno b641f06552 Add new basicstats aggregator (#2167) 2017-10-10 12:02:01 -07:00
Pierre Tessier c7a6d4eaa4 Fix link for wavefront plugin in changelog (#3317) 2017-10-10 11:21:46 -07:00
Daniel Nelson 61b0336d97
Use 5 second timeout overhead when waiting for ping to complete 2017-10-09 15:09:07 -07:00
Daniel Nelson 761544f56d
Add HasPoint method to testutil.Accumulator 2017-10-09 15:02:57 -07:00
Daniel Nelson 0f452ad0df
Document /etc/default/telegraf file 2017-10-06 16:57:57 -07:00
Daniel Nelson 4093bc98b7
Update changelog 2017-10-06 16:17:09 -07:00
Christian Meilke 75567d5b51 Add ability to limit node stats in elasticsearch input (#3304) 2017-10-06 16:16:32 -07:00
Daniel Nelson 59bb31e765
Use golang 1.9.1 2017-10-05 16:19:53 -07:00
Daniel Nelson 13c7802b84
Update changelog 2017-10-05 16:15:43 -07:00
Daniel Nelson cce40c515a Use chunked transfer encoding in InfluxDB output (#3307) 2017-10-05 16:14:21 -07:00
Daniel Nelson 6e1fa559a3
Update changelog 2017-10-05 16:05:51 -07:00
Daniel Nelson f56dda0ac8 Fix panic in cpu input if number of cpus changes (#3306) 2017-10-05 16:02:21 -07:00
Daniel Nelson 4fab572b6b
Release buffer back to pool earlier 2017-10-05 12:12:14 -07:00
Daniel Nelson b9f319529f
Update changelog 2017-10-04 15:30:11 -07:00
Christian Meilke 0bb32570ba Add cluster health level configuration to elasticsearch input (#3269) 2017-10-04 15:29:32 -07:00
Daniel Nelson a4ea4c7a25
Add smart to changelog and readme 2017-10-04 15:18:15 -07:00
Rickard von Essen e69c3f9d1c Add smart input plugin for collecting S.M.A.R.T. data (#2449) 2017-10-04 15:15:58 -07:00
Daniel Nelson 002ccf3295
Update changelog 2017-10-03 15:25:19 -07:00
Daniel Nelson a163effa6d Add support for proxy environment variables to http_response (#3302) 2017-10-03 15:22:57 -07:00
Daniel Nelson 93ff811358
Update changelog 2017-10-03 14:37:02 -07:00
Aditya C S dd4299e925 Collect Docker Swarm service metrics in docker input plugin (#3141) 2017-10-03 14:36:26 -07:00
Daniel Nelson b610276485
Skip invalid urls in nginx input 2017-10-03 10:54:31 -07:00
David Norton 6aee40fac1 bug fixes and refactoring 2017-10-03 09:07:15 -04:00
Pierre Tessier 79f66dc5b3 Added newline to each metric line in wavefront output (#3290) 2017-10-02 17:42:21 -07:00
Daniel Nelson 0a55ab42b4
Update changelog 2017-10-02 17:39:32 -07:00
Jimena Cabrera Notari aba269e94c Add extra wired tiger cache metrics to mongodb input (#3281) 2017-10-02 17:38:51 -07:00
Daniel Nelson f67350107d
Update changelog 2017-10-02 17:16:38 -07:00
Daniel Nelson 8e3ed96d6f Fix case sensitivity error in sqlserver input (#3287) 2017-10-02 17:15:34 -07:00
Daniel Nelson 771fbc311a
Regenerate TLS certs due to expiration 2017-10-02 15:44:55 -07:00
David G. Simmons d7b88b10ad New Particle Plugin 2017-10-02 16:50:23 -04:00
Daniel Nelson cdca81c999
Fix mqtt_consumer connection_timeout test 2017-10-02 12:28:31 -07:00
Daniel Nelson ed6f438c9d
Add Wavefront output to changelog and readme 2017-09-29 16:15:48 -07:00
Pierre Tessier 366f3f560c Add Wavefront output plugin (#3160) 2017-09-29 16:13:08 -07:00
Daniel Nelson e4f5547d37
Update example config 2017-09-29 16:09:31 -07:00
Daniel Nelson e1bf655ef9
Add deprecation notice to jolokia sample config 2017-09-29 16:08:31 -07:00
Daniel Nelson 29b6f4168c
Update changelog 2017-09-29 15:59:56 -07:00
Daniel Nelson 3d62e045af Fix format of connection_timeout in mqtt_consumer (#3286) 2017-09-29 15:58:38 -07:00
Daniel Nelson ad4a5aa7a0
Document how to exclude kubernetes annotation 2017-09-29 14:07:19 -07:00
Daniel Nelson f2cb1da7cf
Update changelog 2017-09-29 11:50:15 -07:00
François de Metz c3d15f0aff Add support for the rollbar occurrence webhook event. (#1692) 2017-09-29 11:49:22 -07:00
David G. Simmons b2453e3ec3 Revert "New Particle.io Plugin for Telegraf"
This reverts commit c3b11f9cfb.
Accidentally pushed to master, instead of my fork. Backing it out.
2017-09-29 12:57:13 -04:00
David G. Simmons c3b11f9cfb New Particle.io Plugin for Telegraf
Only the tests need to be fixed.
2017-09-29 12:45:06 -04:00
Daniel Nelson cd1791494a
Update changelog 2017-09-27 11:38:43 -07:00
Daniel Nelson 402460f038
Use underscore as default opentsdb seperator
Preserves backwards compatibility
2017-09-27 11:36:41 -07:00
owlet123 f85db90780 Add configurable separator for metrics and fields in opentsdb output (#3106) 2017-09-27 11:29:40 -07:00
Daniel Nelson 9bddd50a64
Add deprecation notice to jolokia plugin 2017-09-27 10:52:10 -07:00
Daniel Nelson b8a0b8461a
Update changelog and readme for jolokia2 plugin 2017-09-26 17:42:38 -07:00
Dylan Meissner ee26191eb5 Add redesigned Jolokia input plugin (#2278) 2017-09-26 17:34:46 -07:00
Daniel Nelson cadafa6405
Update changelog 2017-09-26 16:03:04 -07:00
Daniel Nelson 22a9ffbb9d Allow JSON data format to contain zero metrics (#3268) 2017-09-26 15:58:33 -07:00
Daniel Nelson 2e1457a496
Update changelog 2017-09-26 15:38:22 -07:00
Daniel Nelson 8614445235 Fix parsing of JSON with a UTF8 BOM in httpjson (#3267) 2017-09-26 15:36:00 -07:00
Daniel Nelson f23d1eb078
Update changelog 2017-09-26 15:28:07 -07:00
Daniel Nelson ef5c12bd86 Fix dmcache tests with 32bit int 2017-09-26 15:25:57 -07:00
Daniel Nelson c013cc1497 Fix cgroup tests with 32bit int 2017-09-26 15:25:57 -07:00
Daniel Nelson bb665cf013 Fix ceph tests with 32bit int 2017-09-26 15:25:57 -07:00
Daniel Nelson 5dff5932fd Fix nginx_plus tests with 32bit int 2017-09-26 15:25:57 -07:00
Daniel Nelson f823fc73f6 Allow 64bit integers in kernel_vmstat 2017-09-26 15:25:57 -07:00
Daniel Nelson fd702e6bb8
Set 1.4.1 release date in changelog 2017-09-26 14:19:02 -07:00
Daniel Nelson 50024c1860
Update changelog 2017-09-25 16:34:04 -07:00
Lukasz Jagiello a4b8805f7f Add support for NSQLookupd to nsq_consumer (#3215) 2017-09-25 16:33:05 -07:00
James 837e6b1a32 Add additional numeric type handling tests for postgresql_extensible (#3066) 2017-09-25 10:58:10 -07:00
Agniva De Sarker 063f3f68df Improve statsd plugin perf by using a byte buffer pool (#3254) 2017-09-25 10:55:02 -07:00
Daniel Nelson b24663b0bd
Remove nightly versioning scheme 2017-09-22 18:07:08 -07:00
Daniel Nelson 366bda45c3
Remove out of date Vagrantfile 2017-09-22 17:35:58 -07:00
Daniel Nelson c010fb1c3c
Fix build versioning; add dev.docker file 2017-09-22 17:35:58 -07:00
Daniel Nelson 08c197f73a
Fix golang version 2017-09-22 17:35:58 -07:00
Daniel Nelson cafb22d145
Fix unittest for golang 1.9 2017-09-22 17:35:58 -07:00
Christian Meilke 73df179bd6 Tag original URL for k8s services in prometheus input (#3257) 2017-09-22 17:26:19 -07:00
Daniel Nelson c3bea59f3b
Update changelog 2017-09-22 11:46:47 -07:00
Daniel Nelson 52393582d2 Unlock Statsd when stopping to prevent deadlock (#3258) 2017-09-22 11:45:45 -07:00
Daniel Nelson ce29ca78e3
Add nginx_plus to changelog and readme 2017-09-19 11:49:55 -07:00
Patrick O'Brien 6e6ed075dc Add new nginx_plus input plugin (#3214) 2017-09-19 11:46:01 -07:00
Daniel Nelson c0a4bd99a1
Update changelog 2017-09-19 11:27:57 -07:00
Paulo Cabido decb09e760 Add configurable metrics endpoint to prometheus output (#3245) 2017-09-19 11:27:11 -07:00
Daniel Nelson a63f80e017
Build with go 1.9 on circleci 2017-09-18 16:30:09 -07:00
Daniel Nelson daee48c861
Update prometheus input documentation 2017-09-18 16:21:45 -07:00
Daniel Nelson dea8bf7ac0
Update changelog 2017-09-18 15:07:18 -07:00
Christian Meilke 292c5229bf Add support for k8s service DNS discovery to prometheus input (#3236) 2017-09-18 15:06:11 -07:00
Daniel Nelson 0048bf2120
Update changelog 2017-09-18 14:25:17 -07:00
Daniel Nelson b8e134cd37 Fix arm64 packages contain 32-bit executable (#3246) 2017-09-18 14:22:54 -07:00
Patrick Hemmer 0339dc7faf Add process resource limits to procstat input (#3231) 2017-09-15 11:16:44 -07:00
Daniel Nelson 575a07c985
Update input plugin example readme. 2017-09-14 15:50:55 -07:00
Daniel Nelson b94cda6b46
Update changelog 2017-09-14 15:28:47 -07:00
Trevor Pounds 73372872c2 Fix panic in statsd p100 calculation (#3230) 2017-09-14 15:27:42 -07:00
Daniel Nelson 103ae3b710
Update changelog 2017-09-14 15:22:46 -07:00
Trevor Pounds 171332c579 Add support for timing sums in statsd input (#3234) 2017-09-14 15:21:54 -07:00
Daniel Nelson 875ab3c4b7
Update changelog 2017-09-14 15:05:03 -07:00
Mark Wilkinson - m82labs 1c5ebd4be3 Fix duplicate keys in perf counters sqlserver query (#3175) 2017-09-14 15:04:13 -07:00
Daniel Nelson 103d24bfba
Update changelog 2017-09-14 15:00:55 -07:00
Daniel Nelson d5f48e3e96 Fix skipped line with empty target in iptables (#3235) 2017-09-14 14:59:28 -07:00
Daniel Nelson 7a41d2c586
Update changelog 2017-09-14 13:06:58 -07:00
Trevor Pounds fa1982323a Fix counter and gauge metric types. (#3232) 2017-09-14 13:05:37 -07:00
Daniel Nelson cdf63c5776
Update changelog 2017-09-13 17:31:39 -07:00
Daniel Nelson 0a8c2e0b3b Whitelist allowed char classes for opentsdb output. (#3227) 2017-09-13 17:30:52 -07:00
Daniel Nelson 9197a59cdb
Update changelog 2017-09-13 17:28:33 -07:00
Dimitris Rozakis 9c8f4afa37 Respect path prefix in influx output uri (#3224) 2017-09-13 17:27:01 -07:00
Daniel Nelson eebee9759f
Fix fluentd test 2017-09-12 17:57:55 -07:00
Daniel Nelson ee85f9275e
Update changelog 2017-09-12 17:27:50 -07:00
Daniel Nelson 4e53464fe2
Remove unneeded error check 2017-09-12 17:24:57 -07:00
Adrián López 2163981872 Add timeout option for kubernetes (#3211) 2017-09-12 17:22:15 -07:00
Daniel Nelson c5cfde667a
Update changelog 2017-09-12 17:17:41 -07:00
Daniel Nelson 8a68e7424c
Fix optional field types in fluentd input 2017-09-12 17:15:19 -07:00
Daniel Nelson cc63b3b667
Update changelog 2017-09-11 12:27:39 -07:00
DanKans 5488f4b3ac Fix MQTT input exits if Broker is not available on startup (#3202) 2017-09-11 12:24:51 -07:00
Daniel Nelson 14a4b108b4
Update changelog 2017-09-11 11:57:18 -07:00
Daniel Nelson 32f313a6a6 Add polling method to logparser and tail inputs (#3213) 2017-09-11 11:56:04 -07:00
Daniel Nelson c720200883
Update changelog 2017-09-11 11:54:18 -07:00
DanKans f62e543003 Fix address already in use with webhooks input during reload (#3206) 2017-09-11 11:51:45 -07:00
Daniel Nelson be83c8c8f0
Update changelog 2017-09-08 16:02:15 -07:00
Jeff Nickoloff c809debfd4 TLS and MTLS enhancements to HTTPListener input plugin (#3191) 2017-09-08 16:01:16 -07:00
Daniel Nelson 247c2e71fd
Update changelog 2017-09-08 15:36:26 -07:00
Daniel Nelson 7b08f9d099 Add support for standard proxy env vars in outputs. (#3212) 2017-09-08 15:35:20 -07:00
Daniel Nelson d0b690f040 Fix short tests on darwin (#3099) 2017-09-08 13:03:37 -07:00
Daniel Nelson 98ca22597d
Update changelog 2017-09-06 14:29:03 -07:00
Raúl Benencia 99dfc69fbb Include mount mode option in disk metrics (#3027) 2017-09-06 14:28:11 -07:00
Daniel Nelson 144862354a
Update changelog 2017-09-06 14:20:38 -07:00
Daniel Nelson 402a0f16e1
Fix typo 2017-09-06 14:19:42 -07:00
Pavel Gurkov 5d4eec606f Add Kafka output plugin topic_suffix option (#3196) 2017-09-06 14:18:26 -07:00
Daniel Nelson ab1c11b06d
Add 1.4.0 release date 2017-09-05 17:14:11 -07:00
Daniel Nelson 864ea1efaf
Improve question title in FAQ 2017-09-05 17:12:36 -07:00
Daniel Nelson 4fb1c3a2bc
Add FAQ doc with dns resolver information 2017-09-05 13:12:11 -07:00
Daniel Nelson 9796d3c99d
Use ip address for default InfluxDB ip in config
Helps with initial setup if localhost cannot be resolved due to the pure
go resolver.
2017-09-05 12:55:21 -07:00
Daniel Nelson 98e784faf3
Sort metrics before comparing in graphite test 2017-09-05 12:50:30 -07:00
rdxmb 16d6011ca1 Fix docker image name in docs (#3193) 2017-09-05 11:44:51 -07:00
Daniel Nelson f43af72785
Update changelog 2017-08-31 13:43:47 -07:00
Daniel Nelson 28d16188b3 Fix panic when handling string fields with escapes (#3188) 2017-08-30 21:16:37 -07:00
Daniel Nelson 19f3264073
Update changelog 2017-08-29 16:27:02 -07:00
Daniel Nelson 8225bd0173
Convert bool fields to int in graphite serializer 2017-08-29 16:22:03 -07:00
Seua Polyakov 3806424aab Skip non-numerical values in graphite format (#3179) 2017-08-29 15:59:38 -07:00
Daniel Nelson ef8876b70b
Move changelog item to 1.4 2017-08-28 17:17:03 -07:00
Daniel Nelson 5fd8ab36d3
Update changelog 2017-08-28 17:08:44 -07:00
Jeff Nickoloff ac1fa05672 Added CloudWatch metric constraint validation (#3183) 2017-08-28 16:56:03 -07:00
Daniel Nelson 73d57c8a02
Update changelog 2017-08-28 16:30:51 -07:00
Nevins 95fe0e43f5 Add support for sharding based on metric name (#3170) 2017-08-28 16:24:38 -07:00
Daniel Nelson 02f7b0d030
Update changelog 2017-08-28 16:11:00 -07:00
Dylan Meissner a9a40cbf87 HTTP headers can be added to InfluxDB output (#3182) 2017-08-28 16:08:50 -07:00
Daniel Nelson a98496591a
Update changelog 2017-08-25 18:08:33 -07:00
Ashton Kinslow 0a6541dfa8 Fix NSQ input plugin when used with version 1.0.0-compat 2017-08-25 18:06:48 -07:00
Daniel Nelson 8ecc58639a
Close response bodies in http_listener test 2017-08-25 13:58:45 -07:00
Daniel Nelson 6abecd0ac7
Update changelog 2017-08-25 12:59:19 -07:00
Rickard von Essen 0502b65316 Don't fail parsing of zpool stats if pool health is UNAVAIL on FreeBSD (#3149) 2017-08-25 12:57:35 -07:00
Daniel Nelson e400fcf5da
Update changelog 2017-08-25 11:55:59 -07:00
Jan Willem Janssen d449833de9 Fix parsing of SHM remotes in ntpq input (#3163) 2017-08-25 11:54:06 -07:00
Daniel Nelson 58751fa4df
Update fail2ban documentation 2017-08-25 11:42:07 -07:00
Daniel Nelson 656ce31d98
Fix amqp_consumer data_format documentation
closes #3164
2017-08-24 13:17:29 -07:00
Daniel Nelson 485e273187
Add links to nightly builds 2017-08-23 15:42:25 -07:00
Daniel Nelson f95c239a3f
Update changelog 2017-08-23 15:21:48 -07:00
Daniel Nelson ae24a0754b Escape backslash within string fields (#3161) 2017-08-23 15:17:26 -07:00
Daniel Nelson f253623231
Update changelog 2017-08-23 15:16:04 -07:00
Rickard von Essen f0db4fd901 Enable hddtemp on all platforms (#3153)
Also disables dmcache tests on non-linux.
2017-08-23 15:14:32 -07:00
Daniel Nelson 8c68bd9ddb
Update changelog 2017-08-22 17:03:00 -07:00
Daniel Nelson 9fc7220c2e Don't start Telegraf on install in Amazon Linux (#3156) 2017-08-22 17:01:59 -07:00
Daniel Nelson 6597b55477
Update changelog 2017-08-22 16:55:15 -07:00
Daniel Nelson 1f4a997164 Don't retry points beyond retention policy (#3155) 2017-08-22 16:52:26 -07:00
Daniel Nelson 5224b526f4
Hide output of git describe 2017-08-22 13:32:52 -07:00
Rickard von Essen 371638ce56 Enable fail2ban on all platforms (#3151) 2017-08-22 12:58:00 -07:00
Rickard von Essen 53c5d3a290 Enable chrony for all platforms (#3152) 2017-08-22 11:49:51 -07:00
Daniel Nelson b480022330
Update config directory documentation 2017-08-22 11:33:26 -07:00
Daniel Nelson ccf17a9f93
Cache intermediate objects during build 2017-08-21 17:26:55 -07:00
Chris Goller 13a6b917c3 Add JSON input support to zipkin plugin (#3150) 2017-08-21 17:24:54 -07:00
Daniel Nelson 1f1e9cc49f
Add win_services to the readme 2017-08-18 17:57:30 -07:00
Daniel Nelson 70c2b83f00 Update histogram aggregator documentation (#3133) 2017-08-18 13:24:05 -07:00
Daniel Nelson 4de264ffc8
Remove version test 2017-08-18 11:08:48 -07:00
Daniel Nelson 36c2c88fd2
Update example config 2017-08-17 18:54:06 -07:00
Daniel Nelson e31d91f0f9 Add queues to rabbitmq documentation (#3135) 2017-08-17 18:52:27 -07:00
Daniel Nelson 3006ccbf2f
Update master for 1.5 development 2017-08-16 16:54:15 -07:00
Daniel Nelson 8b588ea37f
Update sample config 2017-08-16 16:46:40 -07:00
Daniel Nelson 7608251633
Add tomcat input to changelog and readme 2017-08-16 15:36:56 -07:00
Daniel Nelson 1e9d7cd6e9
Add error status handle to tomcat input 2017-08-16 15:33:47 -07:00
mlindes a91457e001 Add tomcat input plugin (#3112) 2017-08-16 15:33:20 -07:00
Daniel Nelson fd3a9bf46a
Update changelog 2017-08-16 12:26:00 -07:00
Daniel Nelson ca394fcfb2 Discard logging from tail library (#3128) 2017-08-16 12:06:07 -07:00
Daniel Nelson 3819607511 Allow using system plugin in Windows (#3127) 2017-08-16 12:05:46 -07:00
Daniel Nelson eb0215c382 Remove log message on ping timeout (#3126) 2017-08-16 11:59:41 -07:00
Daniel Nelson 09153c815c
Move http_response headers to end of configuration.
If the subtable comes before other options, they will be placed in the
subtable.
2017-08-15 11:50:08 -07:00
Daniel Nelson 9bc13f143e
Test for nil metric before reading tags in logparser 2017-08-15 11:43:16 -07:00
Daniel Nelson 032348c7a5
Update changelog 2017-08-14 14:51:28 -07:00
Bob Shannon 5fbdd09aaf Add gzip content-encoding support to influxdb output (#2978) 2017-08-14 14:50:15 -07:00
Daniel Nelson 7d5dae5a08 Improve apache input docs (#3120) 2017-08-11 17:50:51 -07:00
Daniel Nelson 54be037911
Use double hyphen in cli examples 2017-08-11 16:26:54 -07:00
Daniel Nelson 5003809e97
Merge LDFLAGS from env into build 2017-08-11 16:26:54 -07:00
G-Research 1b50f14d55 Build NTPQ input on Windows (#3117) 2017-08-11 13:36:25 -07:00
Patrick Hemmer b0109b3550 Add weighted_io_time to diskio input (#3119) 2017-08-11 11:49:42 -07:00
Daniel Nelson 257b460f61
Update changelog 2017-08-10 12:41:09 -07:00
Daniel Nelson 287a44de5e Skip compilcation of logparser and tail on solaris (#3113)
Allows compilation for solaris
2017-08-10 12:36:11 -07:00
Daniel Nelson 73897d1f1c
Update changelog 2017-08-10 10:22:11 -07:00
Daniel Nelson 1e2d594af0 Converge to typed value in prometheus output (#3104) 2017-08-10 10:19:28 -07:00
Daniel Nelson 83c003e594
Update changelog 2017-08-09 11:48:36 -07:00
Daniel Nelson 84ce9629a8
Tweak formatting of varnish README 2017-08-09 11:48:12 -07:00
Daniel Nelson 3c14b46f6f
Fix ordering of all target 2017-08-09 11:47:55 -07:00
Benjamin Stromski 8a2373e8c8 Add option to run varnish under sudo (#3097) 2017-08-09 11:38:54 -07:00
Daniel Nelson cb04fa1e9c
Add diskio %util sample query 2017-08-09 11:28:27 -07:00
Seva Poliakov 92af42a847 Remove tag_env duplicate from docker README (#3109) 2017-08-09 10:21:22 -07:00
Daniel Nelson bceb020d72
Update changelog and readme 2017-08-08 11:50:16 -07:00
Rodolphe Blancho d9deb266df Add salesforce input plugin (#3075) 2017-08-08 11:48:01 -07:00
Slawomir Skowron f3435f1c59 Add TCP listener for statsd input (#2293) 2017-08-08 11:41:26 -07:00
Daniel Nelson f9573ad969
Remove Godeps_windows from build.py 2017-08-07 17:43:06 -07:00
Daniel Nelson 40aacd9046
Fix artifact redirection 2017-08-07 17:41:52 -07:00
Daniel Nelson 5e73f3e816
Only upload nightly if on master branch 2017-08-07 17:24:35 -07:00
Daniel Nelson a1e7a5f474
Upload as nightly builds if PACKAGE set 2017-08-07 17:16:34 -07:00
Daniel Nelson 828c5817f9
Update changelog 2017-08-07 16:18:01 -07:00
Daniel Nelson 3e27134872 Add path tag to logparser containing path of logfile (#3098) 2017-08-07 16:16:31 -07:00
Daniel Nelson 1fb5373962
Build releases with -w -s ldflags 2017-08-07 15:47:20 -07:00
Daniel Nelson 75e6ebcf93
Update changelog 2017-08-07 14:39:22 -07:00
Vlasta Hajek e21f2de8b8 Add Windows Services input plugin (#3023) 2017-08-07 14:36:15 -07:00
Daniel Nelson 795f02ab88 Cleanup Makefile (#3089) 2017-08-03 11:54:05 -07:00
Daniel Nelson 360d03e301
Update changelog and readme 2017-08-02 18:02:41 -07:00
Daniel Nelson 137b312fa9 Add Zipkin input plugin (#3080) 2017-08-02 17:58:26 -07:00
Daniel Nelson ce12913bc2
Update precision documentation and examples
Precision is no longer used by the InfluxDB output.

closes #3079
2017-08-01 15:02:36 -07:00
Daniel Nelson d82c5062b8 Add Appveyor continuous integration (#3074) 2017-07-31 16:12:09 -07:00
Daniel Nelson 6666e6a5a7
Update changelog 2017-07-31 11:37:32 -07:00
Vladislav Mugultyanov 9c0aadf445 Add histogram aggregator plugin (#2387) 2017-07-31 11:33:51 -07:00
Daniel Nelson 3bd14ed229
Update changelog 2017-07-31 11:30:27 -07:00
DanKans 5e95367f6c Sanitize password from couchbase metric (#3033) 2017-07-31 11:29:14 -07:00
Jeff Ashton c31e7d0b91 Fix win_perf_counters tests (#3068) 2017-07-31 11:03:26 -07:00
Oscar Sironi f8c84302a4 Add config file path troubleshooting advice for Windows (#3071) 2017-07-31 10:58:12 -07:00
Daniel Nelson 9143670d6e
Update changelog 2017-07-27 17:19:33 -07:00
Daniel Nelson f0bd69d904 Add tls options to docker input (#3063) 2017-07-27 17:18:44 -07:00
Daniel Nelson 7179290dea
Update changelog 2017-07-27 15:21:52 -07:00
Daniel Nelson c4297f40ad Allow iptable entries with trailing text (#3060) 2017-07-27 15:21:06 -07:00
Daniel Nelson 0d4c954e01
Update changelog 2017-07-27 15:15:11 -07:00
Daniel Nelson d6cf9f4f30 Fix docker memory and cpu reporting in Windows (#3043) 2017-07-27 15:12:29 -07:00
Daniel Nelson 5f88be022c
Add circleci parameter to build packages 2017-07-26 17:13:50 -07:00
Daniel Nelson 284ab79a37
Set 1.3.5 release date 2017-07-26 15:53:49 -07:00
Daniel Nelson 2bd6c80506
Update changelog 2017-07-25 17:12:45 -07:00
Daniel Nelson 0ca936a12e Default to localhost if zookeeper has no servers set (#3056) 2017-07-25 17:08:32 -07:00
Daniel Nelson a26fc52181 Fix panic in logparser if file cannot be opened (#3055) 2017-07-25 17:08:03 -07:00
Daniel Nelson 83f575fcea Add redis_version field to redis input (#3054) 2017-07-25 17:07:43 -07:00
Daniel Nelson ffd1f25b75
Update changelog 2017-07-25 16:09:48 -07:00
Daniel Nelson 1658404cea
Update changelog 2017-07-25 15:43:13 -07:00
Daniel Nelson 82ea04f188 Fix prometheus output cannot be reloaded (#3053) 2017-07-25 15:41:18 -07:00
xin053 273d0b85b0 Correct spelling of toml field in mysql input (#3051) 2017-07-25 10:57:27 -07:00
Théophile Helleboid - chtitux f3917ec5ff Fix typo in postgresql_extensible/README.md (#3052) 2017-07-25 10:39:14 -07:00
Daniel Nelson 428455e032
Update changelog 2017-07-24 18:26:29 -07:00
Daniel Nelson 573bd4aa32 Start first aggregator period at startup time (#3050)
Fixes issue where metrics collected immediately after startup would not
be aggregated.
2017-07-24 18:25:05 -07:00
Oskar ab5205f8c3 Fix go vet under windows (#3046) 2017-07-24 12:36:33 -07:00
Daniel Nelson 85aa212467
Update changelog 2017-07-21 16:57:28 -07:00
Daniel Nelson 840d19db35 Add network option to dns_query (#3042) 2017-07-21 16:56:08 -07:00
Daniel Nelson 1c267e9b16
Update changelog 2017-07-21 15:46:22 -07:00
Andy Cobaugh 1ff6e92193
Add input plugin for OpenLDAP (#2612) 2017-07-21 15:44:20 -07:00
Daniel Nelson c82c0e596b
Update changelog 2017-07-21 14:31:25 -07:00
Daniel Nelson 31ce98fa91 Don't match pattern on any error (#3040)
This prevents a pattern with no wildcards from matching in case
permissions is denied.
2017-07-21 14:28:14 -07:00
Daniel Nelson 4d66db1603
Update changelog 2017-07-21 14:26:39 -07:00
Yann Cézard 681d20083a Only report cpu usage for online cpus in docker input (#3035) 2017-07-21 14:25:17 -07:00
Daniel Nelson 4ee74ff54b
Document GNU make requirement 2017-07-21 11:15:00 -07:00
Daniel Nelson 16073e4172
Update changelog 2017-07-21 10:57:39 -07:00
Daniel Nelson 3c204d409d
Line wrap documentation 2017-07-21 10:57:12 -07:00
DanKans d903a9142d Fix filtering when both pass and drop match an item (#3036)
Adjust logic in functions responsible for passing metrics in order to be able
to process them correctly in case where pass and drop are defined together.
2017-07-21 10:53:57 -07:00
Daniel Nelson a2d4453269
Update changelog 2017-07-19 13:09:49 -07:00
DanKans 34c042c7dc Fix combined tagdrop/tagpass filtering (#3031) 2017-07-19 13:08:40 -07:00
Daniel Nelson 4dfe2312d0
Switch skipped kafka test 2017-07-18 18:18:57 -07:00
Daniel Nelson c740dce36d
Update download information in readme 2017-07-18 13:54:38 -07:00
Daniel Nelson 475a926d43
Update changelog 2017-07-18 11:03:07 -07:00
DanKans d2626f1da6 Fix ntpq parse issue when using dns_lookup (#3026) 2017-07-18 11:01:08 -07:00
soldierkam f5a8415c78
Add read timeout to socket_listener 2017-07-17 18:34:36 -07:00
Daniel Nelson 1d416a4213
Remove command in example output 2017-07-17 15:08:17 -07:00
Daniel Nelson 731ab9773d
Update changelog 2017-07-17 12:01:35 -07:00
Daniel Nelson d8f7b76253
Prevent startup if intervals are 0 2017-07-17 11:58:47 -07:00
Daniel Nelson dbe2f79019
Update changelog 2017-07-14 10:45:32 -07:00
Bob Shannon ef63908541 Add result_type field to net_response input plugin (#2990) 2017-07-14 10:43:36 -07:00
Daniel Nelson 27e47614c6
Add credits for new plugins to changelog 2017-07-13 16:14:18 -07:00
Daniel Nelson dc4a133b11
Update changelog 2017-07-13 16:00:09 -07:00
DanKans f4d67d8c3c Add fluentd input plugin (#2661) 2017-07-13 15:58:20 -07:00
Daniel Nelson 785798611e
Update changelog 2017-07-13 15:39:45 -07:00
Daniel Nelson b165ce4cd5 Prevent possible deadlock when using aggregators (#3016)
Looping the metrics back through the same channel could result in a
deadlock, by using a new channel and locking the processor we can ensure
that all stages can make continual progress.
2017-07-13 15:34:21 -07:00
Daniel Nelson d9d1ca5a46
Add release date for 1.3.4 2017-07-12 17:15:38 -07:00
Daniel Nelson 2c10806fef
Update changelog 2017-07-12 12:04:43 -07:00
Daniel Nelson 5d2c093105 Prevent Write from being called concurrently (#3011) 2017-07-12 12:03:23 -07:00
Daniel Nelson f68bab1667
Update changelog 2017-07-11 15:55:44 -07:00
Daniel Nelson 1388e2cf92 Do not allow metrics with trailing slashes (#3007)
It is not possible to encode a measurement, tag, or field whose last
character is a backslash due to it being an unescapable character.
Because the tight coupling between line protocol and the internal metric
model, prevent metrics like this from being created.

Measurements with a trailing slash are not allowed and the point will be
dropped.  Tags and fields with a trailing a slash will be dropped from
the point.
2017-07-11 15:54:38 -07:00
Daniel Nelson af318f4959
Update changelog 2017-07-11 14:10:09 -07:00
JSH 9f244cf1ac Fix chrony plugin does not track system time offset (#2989) 2017-07-11 14:08:40 -07:00
Daniel Nelson 885aa8e6e1
Update changelog 2017-07-10 19:07:28 -07:00
Daniel Nelson 945446b36f Fix handling of escapes within fieldset (#3003)
Line protocol does not require or allow escaping of backslash, the only
requirement for a byte to be escaped is if it is an escapable char and
preceeded immediately by a slash.
2017-07-10 19:05:18 -07:00
Daniel Nelson 4209ebfa6e
Update changelog 2017-07-10 12:23:16 -07:00
Daniel Nelson 79f8ed874a Update elastic version to 5.0.41 (#2999) 2017-07-10 12:18:56 -07:00
Daniel Nelson 739d97639a
Update dependencies 2017-07-10 12:01:22 -07:00
Wesley Merkel ac8e28f436 Add link to Graylog input to README.md (#2995) 2017-07-10 11:22:37 -07:00
Daniel Nelson 2740a3ba44
Update changelog 2017-07-05 14:29:59 -07:00
Song Wenhao 0f850400f2 Display error message if prometheus output fails to listen (#2984) 2017-07-05 14:28:44 -07:00
Daniel Nelson 74a764d549
Update changelog 2017-06-29 16:17:08 -07:00
Aleksey Shirokih a8a637809e Change default prometheus_client port (#2973) 2017-06-29 14:03:42 -07:00
Daniel Nelson 75dbf2b0f8
Set release date for 1.3.3 2017-06-28 13:05:06 -07:00
Daniel Nelson 90909ae708 Fix build on Windows (#2972) 2017-06-27 16:31:28 -07:00
Daniel Nelson d40e441240 Use git sha1 as version if not tagged (#2969) 2017-06-27 13:24:06 -07:00
Adam Perlin cc3d420551 Fix several bugs in minecraft input (#2970) 2017-06-27 13:14:07 -07:00
Daniel Nelson f2bb4acd4a
Update changelog 2017-06-26 15:25:06 -07:00
Bob Shannon a7595c918a Fix panic in elasticsearch input if cannot determine master (#2954) 2017-06-26 15:23:53 -07:00
Daniel Nelson a52f90122b
Update changelog 2017-06-26 15:15:31 -07:00
Bob Shannon d217cdc1a6 Add optional usage_active and time_active CPU metrics (#2943) 2017-06-26 15:13:38 -07:00
Daniel Nelson d5b6f92f3f
Log aerospike field value on error 2017-06-26 14:48:22 -07:00
Daniel Nelson 1a636abaaf
Update changelog 2017-06-26 14:31:17 -07:00
vodolaz095 1fdbfa4719 Add support for RethinkDB 1.0 handshake protocol (#2963)
Allow rethinkdb input plugin to work with RethinkDB 2.3.5+ databases that requires username,password authorization and Handshake protocol v1.0

* remove top level header not required in sample config

* remove top level header not required in sample config
2017-06-26 14:29:48 -07:00
Daniel Nelson 22fc130e97
Update changelog 2017-06-23 16:56:36 -07:00
Ayrdrie a726579d50 Add Minecraft input plugin (#2960) 2017-06-23 16:54:12 -07:00
Daniel Nelson d774c2a170
Update changelog 2017-06-23 11:13:00 -07:00
MatthewCh 6d5bb35f84 Support HOST_PROC in processes and linux_sysctl_fs inputs (#2924) 2017-06-23 11:11:33 -07:00
Daniel Nelson e028f10586
Update changelog 2017-06-23 11:04:13 -07:00
Daniel Nelson 9276318faf Fix bug parsing default timestamps with modified precision (#2949) 2017-06-23 10:59:04 -07:00
Daniel Nelson 82a04d904d Use strings.Join in statsd input (#2947) 2017-06-21 16:24:23 -07:00
Daniel Nelson 364da9a83d
Update changelog 2017-06-21 12:46:57 -07:00
grugrut ca9cec2c84 Add input plugin for Fail2ban (#2875) 2017-06-21 12:42:13 -07:00
Daniel Nelson 9211985c63
Update changelog 2017-06-21 12:39:09 -07:00
Daniel Nelson 929ba0a637 Remove label value sanitization in prometheus output (#2939) 2017-06-21 12:36:29 -07:00
Daniel Nelson dcdcb70cb1
Update changelog 2017-06-19 11:52:53 -07:00
Eugene Shilin cb5a12de3d Add standard SSL options to mysql input (#2933) 2017-06-19 11:42:43 -07:00
Artem Kovardin 193e8fa5ad More explicit 404 error in cassandra input (#2936) 2017-06-19 11:06:49 -07:00
trastle 00b37a7c0d Update README for Prometheus Client Output (#2452) 2017-06-19 11:04:08 -07:00
Daniel Nelson 736322dfc9
Set default ping count in Windows
fixes #2934
2017-06-16 13:39:55 -07:00
Daniel Nelson ba364988de
Document that ping_interval is non-linux only 2017-06-16 13:32:04 -07:00
Daniel Nelson a729a44284
Update changelog 2017-06-16 13:18:27 -07:00
Daniel Nelson 3ecfd32df5 Allow dos line endings in tail and logparser (#2920)
Parsing dos line ending delimited line protocol is still illegal in most
cases.
2017-06-16 13:16:48 -07:00
Daniel Nelson ea1888bd26
Update changelog 2017-06-16 12:06:40 -07:00
Simone Rotondo 674c24f987 Add HTTP Proxy support to influxdb output (#2929) 2017-06-16 12:05:08 -07:00
Daniel Nelson ca72df5868
Update 1.3.2 release date 2017-06-14 12:16:47 -07:00
Daniel Nelson ea787b83bf
Update changelog 2017-06-13 18:07:12 -07:00
Daniel Nelson 949072e8dc Ensure prometheus metrics have same set of labels (#2857) 2017-06-13 18:04:26 -07:00
Daniel Nelson 246f342e6a
Update changelog 2017-06-13 17:19:33 -07:00
Daniel Nelson 619b5d4c14 Change node_name to be a tag in aerospike input (#2918) 2017-06-13 17:09:38 -07:00
Daniel Nelson b0efc22140
Update changelog 2017-06-13 14:10:33 -07:00
Heston Kan 5d1efdbfda Add min/max response time on linux/darwin to ping (#2908) 2017-06-13 14:09:17 -07:00
Daniel Nelson e3ccd473d2
Update changelog 2017-06-13 13:44:07 -07:00
Dheeraj Dwivedi f0cbfe4d67 Add secure connection support to graphite output (#2602) 2017-06-13 13:42:11 -07:00
Daniel Nelson 40d8e582ee
Update changelog 2017-06-12 18:32:50 -07:00
Daniel Nelson 02b55fe77f Update aws-sdk-go dependency to latest release. (#2912) 2017-06-12 18:31:27 -07:00
Daniel Nelson 0c53de6700
Update changelog 2017-06-08 16:55:27 -07:00
Daniel Nelson b277e6e2d7 Fix support for mongodb/leofs urls without scheme (#2900)
This was broken by changes in go 1.8 to url.Parse.  This change allows
the string but prompts the user to move to the correct url string.
2017-06-08 16:52:01 -07:00
Daniel Nelson de4a312eba
Update changelog 2017-06-08 13:20:44 -07:00
Matteo Cerutti 4b3b16ef1a Add wildcard support for container inclusion/exclusion (#2793) 2017-06-08 13:17:31 -07:00
Daniel Nelson 4c534433aa
Skip kafka_consumer_integration_test due to issue on CircleCI 2017-06-07 18:31:52 -07:00
Daniel Nelson f9447d01d4
Add release note to changelog regarding kafka_consumer 2017-06-07 18:27:12 -07:00
Seuf 2092443cd7 Add Kafka 0.9+ consumer support (#2487) 2017-06-07 18:22:28 -07:00
Bob Shannon 1c73caba04 Add SSL/TLS support to nginx input plugin (#2883) 2017-06-07 17:52:10 -07:00
Daniel Nelson 84dbf8bb25
Update changelog 2017-06-07 13:46:06 -07:00
Daniel Nelson a275e6792a Fix metric splitting edge cases (#2896)
Metrics needing one extra byte to fit the output buffer would not be split, so we would emit lines without a line ending. Metrics which overflowed by exactly one field length would be split one field too late, causing truncated fields.
2017-06-07 13:37:54 -07:00
Daniel Nelson de7fb2acfe
Update changelog 2017-06-06 13:55:11 -07:00
Frederick Roth 91f2764cd5 Add result_type field for http_response input (#2814) 2017-06-06 13:39:07 -07:00
Daniel Nelson 4e91b18bbe
Update changelog 2017-06-06 11:56:19 -07:00
Mariusz Brzeski 56a7ffe0e4 Fix timeout option in Windows ping input sample configuration (#2885) 2017-06-06 11:55:01 -07:00
Daniel Nelson f9462d4fff
Update changelog 2017-06-05 14:47:34 -07:00
Sebastian Borza 035905d65e Add timezone support to logparser timestamps (#2882) 2017-06-05 14:45:11 -07:00
Daniel Nelson a47e6e6efe
Update changelog 2017-06-05 12:46:50 -07:00
Daniel Nelson 5bab4616ff Fix udp metric splitting (#2880) 2017-06-05 12:44:29 -07:00
Daniel Nelson 37e01808b5
Set 1.3.1 release date 2017-05-31 15:00:31 -07:00
Daniel Nelson 0b6db905ff
Generate sha256 hashes when packaging 2017-05-31 12:29:39 -07:00
Daniel Nelson 9529199a44
Update changelog 2017-05-30 17:40:37 -07:00
Daniel Nelson be03abd464 Fix length calculation of split metric buffer (#2869) 2017-05-30 17:38:32 -07:00
Daniel Nelson 04aa732e94
Update changelog 2017-05-30 11:04:39 -07:00
Steve Nardone e7f9db297e Fix panic in mongo input (#2848) 2017-05-30 11:02:26 -07:00
Daniel Nelson 24ea9fdc4d
Update changelog 2017-05-26 12:12:18 -07:00
Matteo Cerutti 02d168705c MySQL input: log and continue on field parse error (#2855) 2017-05-26 12:09:43 -07:00
Daniel Nelson 7d7206b3e2
Update changelog 2017-05-25 16:20:29 -07:00
Daniel Nelson 03ca3975b5
Update gopsutil version
fixes #2856
2017-05-25 16:11:49 -07:00
Daniel Nelson e1088b9eee
Update changelog 2017-05-25 13:39:16 -07:00
Daniel Nelson f47924ffc5 Fix influxdb output database quoting (#2851) 2017-05-25 13:25:52 -07:00
Olivier Lambert a96f85c847 Add documentation for fetching metrics on Caddy HTTP and Prometheus (#2853) 2017-05-25 13:07:49 -07:00
Sylvain Boily 9148871608 Documentation privilege requirements for specific procstat metrics (#2787) 2017-05-25 13:06:27 -07:00
Matteo Cerutti 7d198f0a68 Add timeout option to ipmi_sensor plugin - solves #2817 (#2818) 2017-05-22 13:41:34 -07:00
Daniel Nelson 1459fab4d6
Remove changelog item from pull request template
Person who merges PR is now expected to update the CHANGELOG.
2017-05-22 12:06:48 -07:00
Daniel Nelson b0bd4d55f5
Update CHANGELOG with fixed issue #1137 2017-05-22 12:01:22 -07:00
Steven Burgart 9ab688d62c Fix multiple plugin loading in win_perf_counters (#2800) 2017-05-22 11:58:00 -07:00
Daniel Nelson 8fdc2aec80
Update dependency license file 2017-05-19 18:03:49 -07:00
Lukasz Jagiello 91690b1d3e Consul plugin README typo (#2829) 2017-05-19 11:37:31 -07:00
Daniel Nelson c61cd73eff
Update changelog 2017-05-18 18:11:49 -07:00
rsingh2411 93e638d63e Add Docker container environment variables as tags. Only whitelisted #2580 (#2581) 2017-05-18 16:58:34 -07:00
mced 501c22478e [enh] set db_version at 0 if query version fails (#2819) 2017-05-18 13:52:56 -07:00
Daniel Nelson 7155e90f66
Update changelog for #2815 2017-05-16 17:37:51 -07:00
Timo Mihaljov c53d9fa9b7 Handle process termination during read from /proc (#2816)
Fixes #2815.
2017-05-16 17:33:35 -07:00
Frederick Roth ac5ac3161f Fixed inconsistency between HasIntField and IntField (#2813) 2017-05-16 15:25:30 -07:00
Daniel Nelson bfeb3020a3
Add release date for 1.3.0 2017-05-15 19:52:35 -07:00
Daniel Nelson b01ecdccff
Add back the changelog entry for 2141 2017-05-15 12:54:03 -07:00
Daniel Nelson da99777f6f Only split metrics if there is an udp output (#2799) 2017-05-12 15:34:05 -07:00
Zack Zatkin-Gold dd537b3382 Fix telegraf example arguments (#2788)
Many of the examples provided within documentation are using a single
dash for the command line arguments, but the telegraf executable
explicitly has two dashes.

There are also some inconsistencies with the ordering of the command
line argument examples.  I've ordered them so that the examples will
show: config, config-directory, input-filter, test
2017-05-12 15:22:29 -07:00
Sebastian Borza f74687dcc0
split metrics based on UDPPayload size (#2795) 2017-05-12 14:45:50 -07:00
Daniel Nelson a47aa0dcc2
Merge branch 'reuse-transport' 2017-05-10 18:19:21 -07:00
Daniel Nelson 17d883c602
Ensure keep-alive is not used in http_response input.
Using Keep-Alive would change the timing for already established
connections.  Previous to this commit, Keep-Alive worked only when using
a response_string_match due to failure to close the request body.
2017-05-10 14:40:55 -07:00
Daniel Nelson a1446a60f7
Update changelog 2017-05-10 13:11:33 -07:00
Daniel Nelson 1931aac284
Fix http_response input creation of transport on every gather 2017-05-09 16:23:38 -07:00
Daniel Nelson b88eb0f59d
Fix prometheus input creation of transport on every gather 2017-05-09 16:21:49 -07:00
Daniel Nelson e7ad2d0463
Fix apache input creation of transport on every gather. 2017-05-09 16:19:56 -07:00
Daniel Nelson c28ffb11cb
Merge branch 'update-readme' 2017-05-09 13:50:19 -07:00
Daniel Nelson 018fd5ce5b
Add missing plugins to README 2017-05-09 13:50:12 -07:00
Daniel Nelson cd0ec0185a
Update contributing section
Hoping this will encourage more non-plugin contributions.
2017-05-09 13:50:12 -07:00
Adrian Sadłocha 8124cfa3ed Improve PostgreSQL plugin documentation (#2777) 2017-05-09 12:58:43 -07:00
Lukasz Jagiello 5af985ef5f Add support for self-signed certs to InfluxDB input plugin (#2773) 2017-05-08 15:20:24 -07:00
Sylvain Boily 1ebd1aaa41 Systemd does not see all shutdowns as failures (#2716) 2017-05-08 11:48:29 -07:00
Daniel Nelson de3f52b990
Update cloudwatch documentation
Mention that some metrics are available only at larger intervals than 5
minutes.  Update dead links to new locations and example config.

closes #1907
2017-05-08 11:31:20 -07:00
Daniel Nelson 4200018a0b
Enable s390x builds
closes #2766
2017-05-05 14:39:56 -07:00
Daniel Nelson 67cd1669cc Add SLES11 support to rpm package (#2768) 2017-05-05 14:29:40 -07:00
Sébastien a8cfe03ba8 fix systemd path in order to add compatibility with SuSe (#2499) 2017-05-05 14:04:33 -07:00
ceseuron e2983383e4 Fixed sqlserver input to work with case sensitive server collation. (#2749)
Fixed a problem with sqlserver input where database properties are not returned by Telegraf when SQL Server has been set up with a case sensitive server-level collation.

* Added bugfix entry to CHANGELOG.md for sqlserver collation input fix.
2017-05-04 10:47:03 -07:00
Daniel Nelson 8cf0dc769b
Add 1.4 section to changelog 2017-05-03 17:29:34 -07:00
Daniel Nelson 613de8a80d
Remove documentation in kafka_consumer for metric_buffer 2017-05-03 11:51:49 -07:00
Damien Krotkine f5c890cc1d reflect zookeeper chroot config in readme (#2759) 2017-05-03 11:50:08 -07:00
Daniel Nelson f7f1eaef65 Return an error if no valid patterns. (#2753) 2017-05-02 14:54:38 -07:00
Alexander Blagoev 188703e204 Improve redis input documentation (#2708) 2017-05-02 11:43:07 -07:00
Patrick Hemmer 52c19af0ba fix close on closed socket_writer (#2748) 2017-05-02 11:06:49 -07:00
Daniel Nelson 5c88965084 Add initial documentation for rabbitmq input. (#2745) 2017-05-01 18:55:48 -07:00
Daniel Nelson 6e76731b7e Don't log error creating database on connect (#2740)
closes #2739
2017-04-28 15:58:46 -07:00
Daniel Nelson c7a0e40c87
Update telegraf.conf 2017-04-28 13:47:32 -07:00
Daniel Nelson 086a2f5f12
Clarify retention policy option for influxdb output
closes #2696
2017-04-28 13:46:23 -07:00
Daniel Nelson 1da1c4753e
Clarify retention policy option for influxdb output
closes #2696
2017-04-28 13:40:58 -07:00
Daniel Nelson a083e1af7d Use go 1.8.1 for CI and Release builds (#2732) 2017-04-27 16:18:11 -07:00
Daniel Nelson 052e88ad5e
Fix grammar 2017-04-27 14:59:18 -07:00
Daniel Nelson b9ce455bba
Update telegraf.conf 2017-04-27 11:53:32 -07:00
Seuf cd103c85db Added SASL options for ouput kafka plugin (#2721) 2017-04-27 11:50:25 -07:00
Ross McDonald a3feacbd2f Kapacitor input plugin (#2031) 2017-04-27 11:47:22 -07:00
Daniel Nelson e1a734c525
Fix logfile documentation 2017-04-27 11:38:49 -07:00
Daniel Nelson 53ab56de72
Update haproxy README 2017-04-27 11:23:37 -07:00
Seuf 4e2fe598ac Added SSL configuration for input haproxy (#2723) 2017-04-27 11:20:41 -07:00
Daniel Nelson 5fe5c46c6d Fix amqp output block on write if disconnected (#2727)
fixes #2603
2017-04-27 11:10:30 -07:00
Damien Krotkine 153304d92b it's -> its (#2728) 2017-04-27 11:10:00 -07:00
Damien Krotkine cb9aecbf04 it's -> its (#2729) 2017-04-27 11:06:40 -07:00
Nevins c66e2896c6 add option to randomize Kinesis partition key (#2705) 2017-04-26 10:54:24 -07:00
Jeff Zellner 9b874dff8d Update README.md (#2719) 2017-04-25 13:17:15 -07:00
Daniel Nelson b243faa22b Don't close stdout on config reload. (#2707)
fixes #2528
2017-04-24 16:18:58 -07:00
Patrick Hemmer 8f5cd6c2ae add keep-alive support to socket_listener & socket_writer (#2697)
closes #2635
2017-04-24 13:14:42 -07:00
Alexander Blagoev 3c28b93514 Improve procstat input documentation (#2699)
closes #1895
2017-04-24 11:18:55 -07:00
Patrick Hemmer 06baf7cf78 use AddError everywhere (#2372) 2017-04-24 11:13:26 -07:00
Alexander Blagoev 801f6cb8a0 System net input documentation (#2698)
closes #2166
2017-04-24 11:03:53 -07:00
Daniel Nelson 3684ec6315
Update EXAMPLE_README.md 2017-04-21 14:27:36 -07:00
Daniel Nelson da0773151b Use C locale when running sadf (#2690)
fixes #1911
2017-04-21 10:55:54 -07:00
Daniel Nelson 38e1c1de77
Update commit hash of tail fork 2017-04-20 16:29:39 -07:00
Daniel Nelson 799c8bed29
Add fix for network aliases to changelog
Change was made in gopsutil
2017-04-20 15:34:30 -07:00
Alexander Blagoev a237301932 Memcached input documentation (#2685)
Closes #2615
2017-04-20 11:25:22 -07:00
Oleg Grytsynevych b03d78d00f win_perf_counters: Format errors reported by pdh.dll in human-readable format (#2338) 2017-04-20 11:22:44 -07:00
Martin 748ca7d503 Fixed install/remove of telegraf on non-systemd Debian/Ubuntu systems (#2360) 2017-04-20 11:19:33 -07:00
Daniel Nelson bf30ef89ee Fix ipmi_sensor config is shared between all plugin instances (#2684) 2017-04-19 17:02:44 -07:00
Daniel Nelson 3690e1b9bf
Add diskio for darwin to changelog 2017-04-19 13:42:24 -07:00
Patrick Hemmer 2542ef6d62 change jolokia input to use bulk requests (#2253) 2017-04-18 13:00:41 -07:00
Nikolay Denev eb7ef5392e Simplify system.DiskUsage() (#2630) 2017-04-18 11:42:58 -07:00
Ross McDonald 70b3e763e7 Add input for receiving papertrail webhooks (#2038) 2017-04-17 13:49:36 -07:00
François de Metz 58ee962679 GitHub webhooks: check signature (#2493) 2017-04-17 11:42:03 -07:00
Daniel Nelson dc5779e2a7 Rename heap_objects_bytes to heap_objects in internal plugin. (#2674)
* Rename heap_objects_bytes to heap_objects in internal plugin.

This field does not contain bytes

fixes #2671
2017-04-14 17:32:14 -07:00
Daniel Nelson b968759d10
Use variadic disk.IOCounters() function 2017-04-14 13:48:02 -07:00
Daniel Nelson b90a5b48a1 Improve logparser README (#2664) 2017-04-14 13:47:43 -07:00
calerogers a12e082dbe Refactor interrupts plugin code (#2670) 2017-04-14 13:40:36 -07:00
calerogers cadd845b36 Irqstat input plugin (#2494)
closes #2469
2017-04-13 15:53:02 -07:00
ingosus dff216c44d Feature #1820: add testing without outputs (#2446) 2017-04-13 12:59:28 -07:00
Gregory Kman 45c9b867f6 Update ping-input-plugin Readme (#2651) 2017-04-12 17:46:48 -07:00
Chris Goffinet 9388fff1f7 Fixed content-type header in output plugin OpenTSDB (#2663) 2017-04-12 17:40:10 -07:00
Daniel Nelson 3e0c55bff9 Update grok version (#2662) 2017-04-12 17:10:17 -07:00
Jesús Roncero 49ab4e26f8 Nagios plugin documentation fix (#2659) 2017-04-12 12:04:44 -07:00
Daniel Nelson 360b10c4de Clarify precision documentation (#2655) 2017-04-12 10:42:11 -07:00
Daniel Nelson 2c98e5ae66 Add collectd parser (#2654) 2017-04-12 10:41:26 -07:00
Nick Irvine 0193cbee51 Add max_message_len in kafka_consumer input (#2636) 2017-04-11 12:05:39 -07:00
Daniel Nelson f55af7d21f Use name filter for IOCounters in diskio (#2649)
Use IOCountersForNames for disk counters.
2017-04-11 11:41:09 -07:00
Patrick Hemmer 516dffa4c4 set default measurement name on snmp input (#2639) 2017-04-10 16:45:02 -07:00
Daniel Nelson 62b5c1f7e7 Add support for precision in http_listener (#2644) 2017-04-10 16:39:40 -07:00
Daniel Nelson 07c428ef89
Use random port in http_listener tests 2017-04-10 14:39:39 -07:00
Vladimir S aa722fac9b Add dmcache input plugin (#1667) 2017-04-07 15:39:43 -07:00
Rajaseelan Ganeswaran 7cc4ca2341 Add sample config stanza for CPU (#2620) 2017-04-06 14:44:02 -07:00
Victor Yunevich 92fa20cef2 ipmi_sensor: allow @ symbol in password (#2633) 2017-04-06 14:40:34 -07:00
Daniel Nelson c9f8308f27 Update filtering documentation (#2631) 2017-04-06 12:06:08 -07:00
James 5ffc9fd379 fix postgresql connection leak (#2611) 2017-04-04 17:37:44 -07:00
Daniel Nelson 8bf193dc06 Update httpjson documentation (#2619)
closes  #2536
2017-04-03 18:34:04 -07:00
Patrick Hemmer f2805fd4aa socket_listener: clean up unix socket file on start & stop (#2618) 2017-04-03 18:06:51 -07:00
Shakeel Sorathia 35e4390168 Docker: optionally add labels as tags (#2425) 2017-04-03 13:43:15 -07:00
Patrick Hemmer 51c99d5b67 add support for linux sysctl fs metrics (#2609) 2017-03-31 14:01:02 -07:00
Daniel Nelson 540f98e228 Fix possible deadlock when output cannot write. (#2610) 2017-03-31 12:45:28 -07:00
Dmitry Ulyanov c980c92cd5 Added pprof tool (#2512) 2017-03-29 18:28:43 -07:00
Daniel Nelson 9495b615f5
Update changelog for #2587 2017-03-29 17:15:11 -07:00
tjmcs fb1c7d0154 Adds a new json_timestamp_units configuration parameter (#2587) 2017-03-29 17:12:29 -07:00
Patrick Hemmer 03ee6022f3 fix race in testutil Accumulator.Wait() (#2598) 2017-03-29 17:03:06 -07:00
djjorjinho cc5b2f68b6 fix timestamp parsing on prometheus plugin (#2596) 2017-03-29 15:04:29 -07:00
Daniel Nelson 2d7f612bd7 Use fork of hpcloud/tail (#2595) 2017-03-29 14:25:33 -07:00
Daniel Nelson 9e036b2d65
Remove wait loop in riemann tests
This testcase still has a race condition but I believe it is when the
test does not complete quickly enough.
2017-03-28 13:05:10 -07:00
mgresser 1100a98f11 Removed duplicate evictions metric (#2577) 2017-03-28 10:47:00 -07:00
Daniel Nelson 37689f4df6
Add elasticsearch output to changelog 2017-03-28 10:22:28 -07:00
Daniel Nelson 78c7f4e4af Add write timeout to Riemann output (#2576) 2017-03-27 15:49:45 -07:00
Daniel Nelson 84a9f91f5c
Skip elasticsearch output integration test in short mode 2017-03-27 15:05:06 -07:00
Daniel Nelson 5612df48f9
Update telegraf.conf 2017-03-27 14:49:04 -07:00
Daniel Nelson 0fa9001453
Clarify influxdb output url format
closes #2568
2017-03-24 16:04:18 -07:00
Patrick Hemmer 995546e7c6 snmp: support table indexes as tags (#2366) 2017-03-24 12:06:52 -07:00
Patrick Hemmer 1402c158b7 remove sleep from tests (#2555) 2017-03-24 12:03:36 -07:00
Oskar 616b66f5cb Multi instances in win_perf_counters (#2352) 2017-03-22 12:04:58 -07:00
Daniel Nelson 70a0a84882
Really fix procstat initialization 2017-03-21 11:40:51 -07:00
Daniel Nelson 5c33c760c7
Fix procstat initialization 2017-03-21 10:59:41 -07:00
Leandro Piccilli bb28fb256b Add Elasticsearch 5.x output (#2332) 2017-03-20 17:47:57 -07:00
Daniel Nelson a962e958eb Refactor procstat input (#2540)
fixes #1636 
fixes #2315
2017-03-17 16:49:11 -07:00
Patrick Hemmer 8514acdc3c return error on unsupported serializer data format (#2542) 2017-03-17 10:14:03 -07:00
Antoine Augusti 426182b81a Update default value for Cloudwatch rate limit (#2520) 2017-03-15 15:20:18 -07:00
Daniel Nelson 7a5d857846 Add support for new SSL configuration to mongodb (#2522)
closes #2519
2017-03-10 11:27:55 -08:00
jeremydenoun 13f314a507 Report DEAD (X) State Process (#2501)
Report count of processes in dead (X) process state from the processes input.  This process state is only valid on Linux.
2017-03-09 11:28:54 -08:00
Daniel Nelson ea6e0b8259
Fix typo in postgresql README 2017-03-09 10:13:31 -08:00
Cameron Sparr e811e2600d
create telegraf.d directory in tarball
closes #2513
2017-03-09 11:41:08 +00:00
Timothy 49c212337f Update CONFIGURATION.md (#2516)
Add information about default configuration file locations.  Also mention that the config directory option is available.
2017-03-09 11:21:03 +00:00
Dennis Dryden d243d69a09 Add configuration docs to Postgresql input plugin (#2515)
* Add configuration docs to Postgresql input plugin

Add configuration docs to PostgreSQL input plugin README (mostly from the source code) though I've not included the configuration example that seems to use all he connections on the database[1].

[1] https://github.com/influxdata/telegraf/issues/2410

* Fix typo in readme and sampleConfig string.
2017-03-09 11:19:03 +00:00
jeremydenoun ae6a5d2255 Remove warning if parse empty content (#2500)
closes #2448
2017-03-08 14:08:55 -08:00
Robpol86 56aa89e5c8 Exporting Ipmi.Path to be set by config. (#2498)
* Exporting Ipmi.Path to be set by config.

Currently "path" is not exported, giving this error when users try to
override the variable via telegraf.conf as per the sample config:

`field corresponding to `path' is not defined in `*ipmi_sensor.Ipmi'`

Exporting the variable solves the problem.

* Updating changelog.
2017-03-08 16:38:36 +00:00
vvvkamper 7513fcac4e
Fix part 2 of #1291
added PDH_FMT_NOCAP100 format option

closes #2483
2017-03-08 13:39:03 +00:00
Cameron Sparr 9df2974a0f
update gopsutil for file close fixes
hopefully this will fix #2472
2017-03-08 12:54:17 +00:00
Daniel Nelson ceb36adac7 Update issue template 2017-03-06 11:20:53 -08:00
Cameron Sparr 7a8e821731 Revert "Procstat: don't cache PIDs" (#2479) 2017-03-06 15:59:36 +00:00
François de Metz 76bcdecd21 Respond 200 when receiving a ping event. (#2492) 2017-03-06 12:34:41 +00:00
Jack Zampolin 10744646db AMQP Consumer plugin (#1678) 2017-03-03 10:24:50 -08:00
Charles-Henri 1873abd248 Iptables input: document better the ignored rules behavior (#2482)
During issue #2215 it was highlighted that the current behavior where
rules without a comment are ignored is confusing for several users.

This commit improves the documentation and adds a NOTE to the sample
config to clarify the behavior for new users.
2017-03-02 09:58:26 +00:00
Chris Koehnke 9618515926 Disk counter array newline (#2481)
Tweak formatting of `LogicalDisk` counter array to have one entry per
line.
2017-03-02 08:43:33 +00:00
Cameron Sparr a251adb838 Fix type conflict on windows ping plugin (#2462)
closes #1433
2017-03-01 11:22:42 +00:00
Cameron Sparr 9e810ac463
Handle nil os.FileInfo in filepath.Walk
closes #2466
2017-02-28 17:51:03 +00:00
Cameron Sparr b9457a1092
log error message when invalid regex is used
closes #2178
2017-02-28 12:48:14 +00:00
Cameron Sparr 6f2eeae498
Remove sleep from riemann test 2017-02-28 12:46:27 +00:00
Cameron Sparr 42a41d33cc
add cgroup plugin to README 2017-02-24 09:43:22 +00:00
Cameron Sparr 81408f9da7
switch out deprecated docker client library
closes #2071
2017-02-22 10:55:00 +00:00
Rickard von Essen c4212d69c9 Updated readme, now requires Go 1.8 (#2455) 2017-02-21 22:13:22 +01:00
Carlos e17164d3f0 Added default config to file output pugin's README (#2426) 2017-02-20 11:50:39 +01:00
Cameron Sparr e5349393f8
Check for errors in user stats & process list
closes #2414
2017-02-17 15:38:33 +00:00
Cameron Sparr 06176ef410
Only set the buffer size once
fixes #2380
2017-02-17 14:11:15 +00:00
Cameron Sparr 2a3448c8f3
socket_writer output plugin README 2017-02-16 23:13:14 +00:00
Leandro Piccilli 5da40d56ad
Check if tag value is empty before allocation
closes #2390
closes #2404
2017-02-16 23:07:27 +00:00
Cameron Sparr 54c9a385d5
Fix prometheus_client reload behavior
fixes #2282
2017-02-16 21:57:13 +00:00
Priyank Trivedi 25c55419df Fix typo - Default from Defalt (#2417) 2017-02-16 19:03:17 +00:00
Yaron de Leeuw c19fb1535e README: update golang requirement to 1.7 (#2412)
The docker engine-api package we use needs golang 1.7+, see:
https://github.com/docker/engine-api/pull/382#issuecomment-244512952

So telegraf won't compile without 1.7
2017-02-15 17:17:26 +00:00
François de Metz 45a168e425 Fix setting the username and the password to the influxdb output. (#2401) 2017-02-13 15:30:30 +00:00
Cameron Sparr 22243a8354
Skip service input plugins in test mode 2017-02-13 10:40:38 +00:00
Cameron Sparr ff9369f1a1
prepend 'inputs.' to --test output check 2017-02-13 10:33:51 +00:00
Cameron Sparr 21cf79163c
don't use influxdata/config, just use influxdata/toml 2017-02-10 17:27:18 +00:00
Cameron Sparr f05fac74cb
update naoina/toml to do config validation 2017-02-10 17:05:13 +00:00
Cameron Sparr c8cc01ba6a
deprecate udp_listener & tcp_listener 2017-02-06 10:41:44 +00:00
Cameron Sparr 694955c87b
Remove metric.Point from metric interface 2017-02-03 16:53:07 +00:00
Cosmo Petrich b1945c0493
Increment gather_errors for all input errors
closes #2339
2017-02-03 11:22:31 +00:00
Cameron Sparr 1c4673e900
changelog update 2017-02-03 10:04:50 +00:00
Nick Irvine dfb4038654 Remove pidfile if pidfile was created (#2358)
Also, ensure pidfile perms are 644
2017-02-03 10:02:19 +00:00
Patrick Hemmer b3537ef2a8 add socket listener & writer (#2094)
closes #1516 
closes #1711 
closes #1721 
closes #1526
2017-02-02 16:24:03 +00:00
Yaron de Leeuw 0ce44648cf Procstat: don't cache PIDs (#2206)
* Procstat: don't cache PIDs

Changed the procstat input plugin to not cache PIDs. Solves #1636.
The logic of creating a process by pid was moved from `procstat.go` to
`spec_processor.go`.

* Procstat: go fmt

* procstat: modify changelog for #2206
2017-02-02 14:12:22 +00:00
Patrick Hemmer 55d3f70771 add missing fields to haproxy input (#2323) 2017-02-02 13:46:53 +00:00
Matteo Cerutti a610f8bd03
allow querying sensors via the open interface
closes #2244
closes #1547
2017-02-02 13:31:04 +00:00
Cameron Sparr dfba3ff37a
fix telegraf swallowing panics in --test mode
this defer function was causing telegraf to call os.Exit(0) instead of
panicking when it was supposed to.

closes #2341
2017-02-02 12:14:35 +00:00
Cameron Sparr 285be648c4
Godeps update
closes #2356
2017-02-02 09:52:06 +00:00
Cameron Sparr f7d551a807
Add more nested globpath tests 2017-02-01 23:44:35 +00:00
Nathan Haugo 3f224a15d5 Update readme to link to k8s plugin (#2355) 2017-02-01 21:23:45 +00:00
Jérôme Vizcaino c0bbde03ea Ceph: represent pgmap states using tags (#2229)
* ceph: maps are already refs, no need to use a pointer

* ceph: pgmap_states are represented in a single metric "count", differenciated by tag

* Update CHANGELOG
2017-02-01 14:47:23 +00:00
Cameron Sparr 97050e9669
changelog update 2017-02-01 14:41:58 +00:00
James Gregory eafd1dcc7c Kubernetes input: Handle null startTime for stopped pods (#2335) 2017-02-01 14:41:04 +00:00
Cameron Sparr c528c53e5b
iptables changelog update 2017-02-01 14:39:16 +00:00
ldep30 07a6223932 Add lock option to the IPtables input plugin (#2201)
* Update README.md

* Add lock support to the IPtables input plugin

* Update iptables.go

Doc cleaning
2017-02-01 14:37:18 +00:00
Cameron Sparr aeb849d744
changelog fix 2017-02-01 14:22:31 +00:00
Len Smith 9003efc3fa http_response : Add in support for looking for substring in response (#2204)
* Add in support for looking for substring in response

* Add note to CHANGELOG.md

* Switch from substring match to regex match

* Requested code changes

* Make requested changes and refactor to avoid nested if-else.

* Convert tabs to space and compile regex once
2017-02-01 14:21:08 +00:00
Pierre Fersing 32e06a489d Keep -config-directory when running as Windows service (#2330)
* Keep -config-directory when running as Windows service

* Update changelog
2017-02-01 14:12:35 +00:00
njwhite 2932db8480 Make Logparser Plugin Check For New Files (#2141)
* Make Logparser Plugin Check For New Files

Check in the Gather metric to see if any new files matching the glob
have appeared. If so, start tailing them from the beginning.

* changelog update for #2141
2017-02-01 14:11:39 +00:00
Cameron Sparr 19dee32287
Go 1.7.5 update cherry-picked to 1.2.1 release 2017-02-01 10:11:16 +00:00
Cameron Sparr 4dad723088
Changelog update 2017-02-01 10:07:31 +00:00
Cameron Sparr 54cfbb5b87
metric: Fix negative number handling
closes #2324
2017-02-01 10:07:31 +00:00
Martin 3e37dda7b0 Go version 1.7.4 -> 1.7.5 (#2348) 2017-02-01 10:07:02 +00:00
Cameron Sparr fb7931591d
Changelog update 2017-02-01 08:59:54 +00:00
Cameron Sparr e87ce22af9
running output: Drop nil metrics
fixes #2317
2017-02-01 08:55:22 +00:00
John Engelman 738cbbdbb6 Add numerical representation of Consul health check state. (#2277) 2017-01-28 16:47:25 -08:00
Patrick Hemmer 074e6d177c
add support for diskio name templates & udev tags
closes #1453
closes #1386
closes #1428
2017-01-27 16:15:42 -08:00
Cameron Sparr 1d864ebd40
Fix riemann output unit tests 2017-01-27 15:08:21 -08:00
Cameron Sparr e9decadf75
Riemann rewrite changelog update 2017-01-27 14:59:35 -08:00
Fabio Berchtold 3fa37a9212 Rewriting Riemann output plugin (#1900)
* rename to riemann_legacy

Signed-off-by: Fabio Berchtold <fabio.berchtold@swisscom.com>

* initial draft for Riemann output plugin rewrite

Signed-off-by: Fabio Berchtold <fabio.berchtold@swisscom.com>

* add unit tests

Signed-off-by: Fabio Berchtold <fabio.berchtold@swisscom.com>

* add option to send string metrics as states

Signed-off-by: Fabio Berchtold <fabio.berchtold@swisscom.com>

* add integration tests

Signed-off-by: Fabio Berchtold <fabio.berchtold@swisscom.com>

* add plugin README.md

Signed-off-by: Fabio Berchtold <fabio.berchtold@swisscom.com>

* bump riemann library

* clarify settings description

Signed-off-by: Fabio Berchtold <fabio.berchtold@swisscom.com>

* update Readme.md with updated description

Signed-off-by: Fabio Berchtold <fabio.berchtold@swisscom.com>

* add Riemann event examples

Signed-off-by: Fabio Berchtold <fabio.berchtold@swisscom.com>

* use full URL for Riemann server address

Signed-off-by: Fabio Berchtold <fabio.berchtold@swisscom.com>

closes #1878
2017-01-27 14:54:59 -08:00
Cameron Sparr c9e87a39f8
Revert using fasthttp library to net/http 2017-01-25 16:42:23 -08:00
Cameron Sparr 4a5d313693
Improve the InfluxDB through-put performance
This changes the current use of the InfluxDB client to instead use a
baked-in client that uses the fasthttp library.

This allows for significantly smaller allocations, the re-use of http
body buffers, and the re-use of the actual bytes of the line-protocol
metric representations.
2017-01-25 11:54:16 -08:00
Cameron Sparr 168270ea5f
ntpq: correct number of seconds in an hour
closes #2256
2017-01-24 15:27:44 -08:00
Jonas Hahnfeld c4d4185fb5 snmp: Allow lines with empty or missing tags (#2172)
The changes in #1848 resulted in lines being dropped if they had an empty
tag. Let's allow all lines that have empty or missing tags!
2017-01-24 14:57:43 -08:00
Kali Hernandez 822333690f Debian package: check for group before useradd (#2107)
Fixes #2106
2017-01-24 14:54:19 -08:00
Will Pearson d7a8bb2214 Fix problem with graphite talking to closed connections (#2171)
We were having problems with telegraf talking to
carbon-relay-ng using the graphite output. When
the carbon-relay-ng server restarted the connection
the telegraf side would go into CLOSE_WAIT but telegraf
would continue to send statistics through the connection.

Reading around it seems you need to a read from the connection
and see a EOF error. We've implemented this and added a test
that replicates roughly the error we were having.

Pair: @whpearson @joshmyers
2017-01-24 12:50:29 -08:00
Pierre Fersing a505123e60 Improve win_perf_counters on non English systems (#2261) 2017-01-24 12:46:06 -08:00
Pierre Fersing be10b19760 Added more Windows metrics (#2290)
Signed-off-by: Pierre Fersing <pierre.fersing@bleemeo.com>
2017-01-24 12:38:10 -08:00
James b9ae3d6a57 fix postgresql 'name', and 'oid' data types by switching to a driver (#1750)
that handles them properly
2017-01-24 12:36:36 -08:00
Cameron Sparr c882570983
32-bit binary for windows and freebsd
closes #1346
closes #2218
2017-01-23 20:28:13 -08:00
Cameron Sparr 80411f99f0
influxdb output: treat field type conflicts as a successful write
If we write a batch of points and get a "field type conflict" error
message in return, we should drop the entire batch of points because
this indicates that one or more points have a type that doesnt match the
database.

These errors will never go away on their own, and InfluxDB will
successfully write the points that dont have a conflict.

closes #2245
2017-01-23 16:41:29 -08:00
Cameron Sparr 6df3f0fdae
Run scheduled flushes in background
doing this unblocks incoming metrics while waiting for a flush to take
place.

we have to create a semaphore so that we can
'skip' flushes that try to run while a flush is already running.

closes #2262
2017-01-23 14:41:40 -08:00
Cameron Sparr 22340ad984
Add newline to influx line-protocol if not present
closes #2297
2017-01-23 13:52:20 -08:00
Cameron Sparr c15504c509
opentsdb: add tcp:// prefix if not present
closes #2299
2017-01-23 13:45:16 -08:00
Claudius Zingerli 20bf90ee52 Add minimal documentation to the diskio plugin (#2296)
* Add documentation to diskio plugin

* Update spelling, fix iops_in_progress unit
2017-01-21 15:08:17 -08:00
Cameron Sparr 3de6bfbcb8
Direct people to downloads page for installation 2017-01-13 17:02:10 +00:00
Cameron Sparr e0c6262e0b
mysql build fixup and changelog update 2017-01-13 14:44:28 +00:00
Pierre Fersing 9b2f6499e7 Added more InnoDB metric to MySQL plugin (#2179) 2017-01-13 14:28:56 +00:00
Cameron Sparr 9262712f0a
Changelog update and go fmt 2017-01-13 14:27:20 +00:00
acezellponce 0c9da0985a Added userstats to mysql input plugin (#2137)
* Added GatherUserStatistics, row Uptime in gatherGlobalStatuses, and version fields & tags

* Updated README file

* pulling in latest from master

* ran go fmt to fix formatting

* fix unreachable code

* few fixes

* cleaning up and applying suggestions from sparrc
2017-01-13 14:25:25 +00:00
Viet Hung Nguyen b89c45b858 Ignore devfs on OSX (#2232) 2017-01-13 14:19:57 +00:00
Cameron Sparr b60b360f13
Changelog update 2017-01-13 13:50:07 +00:00
Kebus1 734988d732 Fixed Bug 2077 SQL Server (#2212) 2017-01-13 13:47:47 +00:00
Cameron Sparr 95bad9e55b
OpenTSDB filter types for HTTP AND telnet 2017-01-13 11:44:28 +00:00
Cameron Sparr e812a2efc6 Accept an HTTP request body without newline at end (#2266)
I don't like this behavior, but it's what InfluxDB accepts, so the
telegraf listener should be consistent with that.

I accidentally reverted this behavior when I refactored the telegraf
metric representation earlier in this release cycle.
2017-01-13 11:43:50 +00:00
Cameron Sparr 411853fc74
update etc/telegraf.conf 2017-01-12 11:14:12 +00:00
Patrick Hemmer b7d29ca0e9 allow changing jolokia delimiter (#2255) 2017-01-12 11:08:22 +00:00
Mohammad Ali Alfarra 947e1909ff Document basic auth for haproxy (#2258)
* Document basic auth for haproxy

* Typo in haproxy readme
2017-01-12 08:47:01 +00:00
Cameron Sparr 31a4f03031
mongodb: Remove superfluous ReplSet log message
closes #2248
2017-01-11 17:50:01 +00:00
Emil Haugbergsmyr 81f95e7a29 Fixes change in Kafka consumer input plugin (#2222)
* Fixes change to the error api in the kafka project.

* Updated test to reflect the change.

* Update kafka to match master branch.
2017-01-11 16:24:09 +00:00
Kurt Mackey 2aa2c796e5 Fix for broken librato output (#2225)
* Fix for broken librato output

These errors are delightful, but I'd rather avoid them:

```
Error parsing /etc/telegraf/telegraf.conf, line 2: field corresponding to `api_user' is not defined in `*librato.Librato'
```

* Fixed bad format from last commit
2017-01-09 14:48:32 +00:00
Patrick Hemmer a658e6c509 ensure proper context on snmp error messages (#2220) 2017-01-09 13:03:33 +00:00
Jérôme Vizcaino 5f6766f6e1 ceph: sample config should reflect actual defaults (#2228) 2017-01-09 12:51:15 +00:00
Cameron Sparr 7279018cfe
readme fixup & test output fixup 2017-01-09 12:28:13 +00:00
Cameron Sparr 4b08d127e0
mongodb: dont print unecessary & inaccurate auth failure
closes #2209
2017-01-06 13:11:24 +01:00
YKlausz fd1feff7b4 Remove print call in cassandra plugin (#2192) 2016-12-21 17:23:54 +00:00
Dominik Labuda 37bc9cf795 [plugins] jolokia input plugin: configurable http timeouts (#2098) 2016-12-21 12:41:58 +00:00
Cameron Sparr b762546fa7
docker: check type when totalling blkio & net metrics
closes #2027
2016-12-21 12:18:38 +00:00
Cameron Sparr bf5f2659a1
Do not try Uint parsing in redis plugin
this is just a waste of cpu cycles, since telegraf converts all uints to
int64 anyways.
2016-12-20 23:42:14 +00:00
Mark Wolfe d2787e8ef5 Fix for loop over value array range issue. (#2187) 2016-12-20 22:56:02 +00:00
Cameron Sparr a9f03a72f5
Mask username/password from error messages
closes #1980
2016-12-20 19:35:45 +00:00
Cameron Sparr 7fc57812a7
changelog update 2016-12-20 18:50:32 +00:00
Mark Wolfe 8a982ca68f Moved to using the inbuilt serializer. (#1942)
* Moved to using the inbuilt serializer.

* Remove Atomic variable as it is not required.

* Adjusted metric type in line with latest changes.
2016-12-20 18:49:28 +00:00
Cameron Sparr 200237a515
Do not create a global statsd "previous instance"
this basically reverts #887

at some point we might want to do some special handling of reloading
plugins and keeping their state intact, but that will need to be done at
a higher level, and in a way that is thread-safe for multiple input
plugins of the same type.

Unfortunately this is a rather large feature that will not have a quick
fix available for it.

fixes #1975
fixes #2102
2016-12-20 17:55:04 +00:00
Cameron Sparr 0ae1e0611c
changelog update 2016-12-20 16:30:49 +00:00
Matt O'Hara 1392e73125 Add clusterstats to elasticsearch plugin (#1979)
* add clusterstats to elasticsearch input plugin

* add clusterstats to elasticsearch input plugin

* add clusterstats to elasticsearch input plugin

* add clusterstats to elasticsearch input plugin

* add clusterstats to elasticsearch input plugin

* responses to requested changes

* remove unnecessary recommendation
2016-12-20 16:30:03 +00:00
Cameron Sparr a90afd95c6
Fix & unit test logparser CLF pattern with IPv6
deals partially with #1973

see also https://github.com/vjeantet/grok/issues/17
2016-12-20 15:57:32 +00:00
Cameron Sparr 9866146545
Support negative statsd counters
closes #1898
2016-12-20 13:21:51 +00:00
Cameron Sparr 8df325a68c
changelog update 2016-12-20 13:04:51 +00:00
Łukasz Harasimowicz 48ae105a11 Fixing consul with multiple health checks per service (#1994)
* plugins/input/consul: moved check_id from regular fields to tags.

When service has more than one check sending data for both would overwrite each other
resulting only in one check being written (the last one). Adding check_id as a tag
ensures we will get info for all unique checks per service.

* plugins/inputs/consul: updated tests
2016-12-20 13:03:31 +00:00
Jeff Ashton 4e808c5c20
Importing pdh from github.com/lxn/win
closes #1763
closes #2017
2016-12-20 12:06:40 +00:00
Ken Dilley eb96443a34 Update MySQL Readme to clarify connection string examples. (#2175)
* Update MySQL Readme to clarify connection string examples.

* Update mysql sample config to clarify connection string examples
2016-12-20 10:17:00 +00:00
Cameron Sparr e36c354ff5
internal.Duration build fixup 2016-12-17 13:10:33 +00:00
Pierre Tessier f09c08d1f3
Added response_timeout property
closes #2006
2016-12-17 13:06:04 +00:00
Steven Pall 0e8122a2fc Add trailing slash to jolokia context (#2105) 2016-12-17 12:51:46 +00:00
Cameron Sparr 6723ea5fe6
changelog update 2016-12-16 17:30:13 +00:00
Vincent e8bf968c78 fix mongodb replica set lag awalys 0 #1449 (#2125) 2016-12-16 17:29:04 +00:00
Cameron Sparr 9c8f24601f
rabbitmq, decrease timeout verbosity in config 2016-12-16 14:12:50 +00:00
Tevin Jeffrey 4957717df5 Add field for last GC pause time (#2121) 2016-12-16 14:03:53 +00:00
Cameron Sparr 21fac3ebec
changelog update 2016-12-16 14:02:11 +00:00
Patrick Hemmer ecbc634221 fix tail input seeking when used with pipe (#2090) 2016-12-16 14:01:49 +00:00
alekseyp 90cec20d1d Standard deviation (jitter) for Input plugin Ping (#2078) 2016-12-16 13:58:27 +00:00
Cameron Sparr bcbf82f8e8
changelog update 2016-12-16 13:54:51 +00:00
Alex Sherwin 3a45d8851d fixes #1987 custom docker repos with non-standard port (#2018)
* fixed parsing of docker image name/version

now accounts for custom docker repo's which contain a colon for a non-default port

* 1978: modifying docker test case to have a custom repo with non-standard port

* using a temp var to store index, ran gofmt

* fixes #1987, renaming iterator to 'i'
2016-12-16 13:53:16 +00:00
Pierre Tessier 4a83c8c518 Add Questions status variable for issue: #1988 (#2004) 2016-12-16 13:47:47 +00:00
Doug Reese bc13d32d53 MongoDB input plugin: Improve state data (#2001)
* MongoDB input plugin: Improve state data

Adds ARB as a "member_status" (replica set arbiter).
Uses MongoDB replica set state string for "state" value.

* MongoDB input plugin: Improve state data - changelog update
2016-12-16 13:46:32 +00:00
Frank Stutz e6fc32bdf0
fix for puppetagent config - test 1
put Makefile back to normal

removed comment from puppetagent.go

changed config_version to config_version_string and fixed yaml for build

changed workind from branch to environment for config_string

fixed casing and Changelog

fixed test case

closes #1917
2016-12-16 13:36:06 +00:00
Cameron Sparr a970b9c62c Revert "Rabbitmq plugin: connection-related metrics." (#2169) 2016-12-15 19:31:40 +00:00
Florian Klink 17b307a7bc ping: fix typo in README (#2163) 2016-12-14 19:47:48 +00:00
Jose Luis Navarro 393f5044bb
Collect JSON values recursively
closes #1993
closes #1693
2016-12-13 21:06:05 +00:00
Pieter Slabbert c630212dde
Enable setting a clientID for MQTT Output
closes #2079
closes #1910
2016-12-13 20:03:09 +00:00
Cameron Sparr f39db08c6d
Set default values for delete_ configuration options
closes #1893
2016-12-13 20:00:52 +00:00
Jonas Falck b4f9bc8745 Change hddtemp to always put temperature in temperature field (#1905)
Added unit tests for the changes

Fixes #1904
2016-12-13 19:40:55 +00:00
Cameron Sparr 5f06bd2566
Graylog output should set short_message field
closes #2045
2016-12-13 16:10:59 +00:00
Cameron Sparr 8a4ab3654d
Fix documentation for net_response plugin
closes #2103
2016-12-13 16:02:03 +00:00
Cameron Sparr e2f9617228
Support strings in statsd set measurements
closes #2068
2016-12-13 15:42:22 +00:00
Cameron Sparr e097ae9632
Fix possible panic when file info cannot be gotten
closes #2061
2016-12-13 14:54:07 +00:00
Cameron Sparr 07684fb030
Update changelog 2016-12-13 14:28:28 +00:00
Da1den 17fa6f9b17 Fixed bug that you cannot gather data on non english systems (#1944) 2016-12-13 14:24:41 +00:00
krise3k 8e3fbaa9dd Add missing slim (#1937) 2016-12-13 14:23:18 +00:00
Kishore Nallan dede3e70ad Rabbitmq plugin: connection-related metrics. (#1908)
* Rabbitmq plugin: connection-related metrics.

* Run go fmt.
2016-12-13 14:17:20 +00:00
Anthony Arnaud 7558081873 Output openTSDB HTTPS with basic auth (#1913) 2016-12-13 14:15:51 +00:00
Leon Barrett 6e241611be Fix bug: too many cloudwatch metrics (#1885)
* Fix bug: too many cloudwatch metrics

Cloudwatch metrics were being added incorrectly. The most obvious
symptom of this was that too many metrics were being added. A simple
check against the name of the metric proved to be a sufficient fix. In
order to test the fix, a metric selection function was factored out.

* Go fmt cloudwatch

* Cloudwatch isSelected checks metric name

* Move cloudwatch line in changelog to 1.2 features
2016-12-13 14:13:53 +00:00
Rikaard Hosein fc9f921b62
Can turn pid into tag instead of field
closes #1843
fixes  #1668
2016-12-13 13:21:39 +00:00
Cameron Sparr 12db3b9120
Check if metric is nil before calling SetAggregate
fixes #2146
2016-12-13 12:27:10 +00:00
Patrick Hemmer b58926dd26 snmp: use a shared global translation cache
Prevents the same data from being looked up multiple times. Also prevents multiple simultaneous lookups.

closes #2115
closes #2104
2016-12-12 13:32:42 +00:00
Patrick Hemmer 91143dda1a snmp: make snmptranslate not required (#2008) 2016-12-12 13:30:07 +00:00
Christian Eichelmann efb64a049f add a hint to possible basic authentication settings 2016-12-09 12:58:54 +00:00
Ross McDonald 4f6087a99d Update readme links for 1.1.1. (#2134) 2016-12-07 17:10:05 +00:00
Cameron Sparr 6b0e863556 Support a telegraf.Metric.Split function 2016-12-07 15:18:47 +00:00
Cameron Sparr 11bc82379c Go version 1.7.3 -> 1.7.4 2016-12-06 15:42:50 +00:00
Cameron Sparr a093ec1eaa Kafka output fixup 2016-12-06 15:38:59 +00:00
Cameron Sparr d71a42cd1b Implement telegraf collecting stats on itself
closes #1348
2016-12-05 18:56:54 +00:00
Nathan D Acuff d518d7d806 Add device name as a tag in disk stats (#1807)
* return partition stat alongside disk stat from disk usage method, and report device name (minus /dev/) as a tag in disk stats

* update system/disk tests to include new partition stat return value from disk usage method calls

* update changelog for #1807 (use device name instead of path to report disk stats)
2016-12-05 17:42:36 +00:00
Pierre Fersing 1d1afe6481 Fix RPM architecture for armhf (#2003)
Signed-off-by: Pierre Fersing <pierre.fersing@bleemeo.com>
2016-12-05 16:45:02 +00:00
Foxlik 5a3f2e61f3 Fix improper total of CPU times (#2123)
On linux, the cpu timer counters of user and nice include the respective guest and guest_nice counters. This results in improper calculation of percentages.

Please see:
https://github.com/torvalds/linux/blob/447976e/kernel/sched/cputime.c#L169
https://lists.linuxfoundation.org/pipermail/virtualization/2009-August/013459.html
https://github.com/giampaolo/psutil/pull/940
2016-12-05 08:35:59 +00:00
Cameron Sparr 504f4e69db file output plugin fixup 2016-12-02 11:36:22 +00:00
Cameron Sparr 9f6666beb3 unit test fixup 2016-12-01 19:17:44 +00:00
Cameron Sparr af6e7b9531 More unit tests for new metric 2016-12-01 19:07:14 +00:00
Cameron Sparr 6fd7361364 allocation & perf improvements 2016-12-01 18:17:02 +00:00
Cameron Sparr e5c7a71d8e Fix unit tests for new metric implementation 2016-12-01 18:17:02 +00:00
Cameron Sparr db7a4b24b6 Implement telegraf's own full metric type
main reasons behind this:
- make adding/removing tags cheap
- make adding/removing fields cheap
- make parsing cheaper
- make parse -> decorate -> write out bytes metric flow much faster

Refactor serializer to use byte buffer
2016-12-01 18:17:02 +00:00
Cameron Sparr 332f678afb JSON serializer: include unit test with escapes 2016-12-01 18:16:52 +00:00
John Engelman 04a2b36a52 Fix changelog for json parser. (#2100) 2016-11-28 18:20:32 +00:00
Cameron Sparr f862c6585d amqp precision is not used anymore 2016-11-24 10:17:24 +00:00
Cameron Sparr 5c32521a07 Add benchmarks for metric parsing and creating 2016-11-23 17:23:08 +00:00
Cameron Sparr 9db30250c3 'discard' output plugin 2016-11-23 14:03:30 +00:00
Cameron Sparr 2b0cd2037b Add Copy() function to Metric interface 2016-11-23 12:30:31 +00:00
Guillem Jover 536dbfb724 Switch to github.com/kballard/go-shellquote (#1950)
The old gonuts fork has no License and has not seen any commits
differing from the original project, while the original has seen some
activity, even if low.

Having no license is a problem for distributors, as by default, such
projects are undistributable.
2016-11-16 11:24:11 -05:00
karech b77398c4d3 Configurable RabbitMQ HTTP timeouts #1997 (#1998)
* [plugins] rabbitmq input plugin: add non default http timeouts

* update CHANGELOG.md
2016-11-16 16:18:56 +00:00
Chris Goller fbf5bee051 Update win_pref_counter to include Processor Queue Length in examples. (#2029) 2016-11-16 13:16:44 +00:00
leplan73 81004c808f Added IopsInProgress to diskio stats (#2037)
* Export IopsInProgress

* Export IopsInProgress

* Export IopsInProgress
2016-11-16 13:16:16 +00:00
Pieter Slabbert 196509cc53 Trim null characters in Value data format (#2049)
* Trim null characters in Value data format

Some producers (such as the paho embedded c mqtt client) add a null
character "\x00" to the end of a message.  The Value parser would fail on
any message from such a producer.

* Trim whitespace and null in all Value data formats

* No unnecessary reassignments in Value data format parser

* Update change log for Value data format fix
2016-11-16 13:13:31 +00:00
John Engelman 94ce67cc67 Add support to parse JSON array. (#1965) 2016-11-15 13:02:55 -05:00
Toni Moreno 33ed528afe Apache input enhancements ( added Basic Auth and SSL skipverify ) (#1964)
* added connection Timeout parámeter, basic HTTP autentication and HTTP support with Sslskipverify option

* updated README.md

* added optional SSL config , changed timeout name and type , and other minor fixes

* added some code style improvements

* Update README.md
2016-11-15 10:52:24 -05:00
Cameron Sparr 2435e47926 changelog update 2016-11-15 11:36:26 +00:00
Mike Ragalie ff67a4b96c Cache and expire metrics for prometheus output (#2016)
* Cache and expire metrics for prometheus output

* Fix test

* Use interval.Duration

* Default prometheus expiration interval to 60s

* Update changelog
2016-11-15 11:33:39 +00:00
Sebastian Borza f816b952cf Add udp_buffer_size option to udp_listener (#1883)
* patching udp_listener for fun

updating with errcode

adding debug flags to temp msgs

moving from debug to info

* updating PR 1883 based on feedback
2016-11-15 09:49:48 +00:00
Todd Persen b905bc1b5d Merge pull request #2024 from influxdata/cs2023-single-quote-duration
Fix single quote parsing of TOML durations
2016-11-11 09:40:32 -08:00
Cameron Sparr 0ecbf9e349 Fix single quote parsing of TOML durations
closes #2023
2016-11-10 09:47:46 +00:00
Cameron Sparr 1c7715780e Documentation improvements
- fully document aggregator and processor plugins
- improve readme.md

closes #1989
2016-11-08 13:55:37 +00:00
John Engelman 5d3850c44e Update docs on Cloudwatch. Set default period to 5m. (#2000) 2016-11-07 12:14:04 +00:00
Cameron Sparr e84b356a12 Update etc/telegraf.conf 2016-11-04 13:18:44 +00:00
John Engelman b349800f7a Fix up AWS plugin docs so they don't use single quotes. (#1991)
Also don't use named returns in fetchNamespaceMetrics since it's
non-standard for the rest of the codebase.
2016-11-04 13:16:41 +00:00
Cameron Sparr 47de43abf3 Use rfc3339 timestamps in telegraf log output
closes #1564

also add unit and benchmark tests
2016-11-03 18:39:02 +00:00
Johannes Rudolph 7a9fef80f5 Update README.md (#1868)
I think this is a copy paste bug? ;-)
2016-11-03 18:28:24 +00:00
Cameron Sparr dc28875437 Update gopsutil dependency
primarily for a fix in Windows network counter getting code

closes #1949
2016-11-03 18:06:10 +00:00
Cameron Sparr a6ed4d4c3a CircleCI script, do not explicitly set version tag 2016-11-03 17:21:06 +00:00
Cameron Sparr fe6162b2a1 Use short commit in Makefile build 2016-11-03 16:37:52 +00:00
Cameron Sparr 34182d9c9f Add release 1.2 section to changelog 2016-11-03 14:34:09 +00:00
Cameron Sparr 16081b2d1a Update etc/telegraf.conf 2016-11-03 14:31:55 +00:00
Matteo Cerutti e43cfc2fce fix leap_status value in chrony input plugin (#1983) 2016-11-03 10:46:54 +00:00
Prunar 137272afea Update README.md (#1963)
Typo
2016-11-02 14:25:09 +00:00
Cameron Sparr 2150510bd4 nats_consumer: buffer incoming messages
fixes #1956
2016-10-27 13:39:27 +01:00
albundy83 fc59757a1a Just fix typo (#1962) 2016-10-27 11:45:17 +01:00
Cameron Sparr 0cfa0d419a udp_listener & tcp_listener set default values
closes #1936
2016-10-27 10:25:24 +01:00
Paulo Pires 522658bd07 Fix NATS plug-ins reconnection logic (#1955)
* NATS output plug-in now retries to reconnect forever after a lost connection.

* NATS input plug-in now retries to reconnect forever after a lost connection.

* Fixes #1953
2016-10-26 15:45:33 +01:00
Jonathan Chauncey b1a97e35b9 fix(kubernetes): Only initialize RoundTripper once (#1951)
fixes #1933
2016-10-26 13:47:35 +01:00
Cameron Sparr c66363cba5 Update Go version: 1.7.1->1.7.3 2016-10-25 14:49:21 +01:00
Cameron Sparr 61269c3500 Update config generation docs
closes #1925
2016-10-25 14:46:50 +01:00
Priyank Trivedi 393d129982 Fix typo from 'Proctstas' to 'Procstat' in procstat plugin's README (#1945) 2016-10-25 13:57:55 +01:00
Cameron Sparr 80d4864844 Only install fpm,rpm,boto if we need them 2016-10-25 13:31:48 +01:00
Cameron Sparr f729fa990d Unit testing for internal.Duration Unmarshal
closes #1926
2016-10-25 13:11:32 +01:00
Alex Zorin 662db7a944 Fix panic in internal.Duration UnmarshalTOML 2016-10-25 18:30:01 +11:00
Cameron Sparr c849b58de9 http_listener input unit tests 2016-10-24 18:17:49 +01:00
Cameron Sparr 097b1e09db http listener refactor
in this commit:

- chunks out the http request body to avoid making very large
  allocations.
- establishes a limit for the maximum http request body size that the
  listener will accept.
- utilizes a pool of byte buffers to reduce GC pressure.
2016-10-24 18:17:49 +01:00
John Hu babd37bf35 Typo (#1924) 2016-10-21 14:11:03 +01:00
David Norton 91f48e7ad5 Merge pull request #1847 from jchauncey/kubernetes-plugin
feat(kubernetes): Add kubernetes input plugin
2016-10-17 15:58:47 -04:00
Jonathan Chauncey a12bd878e0 feat(kubernetes): Add kubernetes input plugin
closes #1774
2016-10-17 15:40:55 -04:00
Cameron Sparr a4e8f24b16 Set reasonable defaults in ping plugin
closes #1742
2016-10-17 15:21:09 +01:00
Cameron Sparr a65447d22e Use mysql.ParseDSN func instead of url.Parse
The MySQL DB driver has it's own DSN parsing function. Previously we
were using the url.Parse function, but this causes problems because a
valid MySQL DSN can be an invalid http URL, namely when using some
special characters in the password.

This change uses the MySQL DB driver's builtin ParseDSN function and
applies a timeout parameter natively via that.

Another benefit of this change is that we fail earlier if given an
invalid MySQL DSN.

closes #870
closes #1842
2016-10-12 17:10:28 +01:00
Cameron Sparr b00ad65b08 Log config file parsing errors properly
closes #1344
2016-10-12 16:50:22 +01:00
Cameron Sparr a84ce5d5cb drop metrics outside of the aggregators period 2016-10-12 14:56:03 +01:00
Cameron Sparr 8ca4a50c18 delete nil fields in the metric maker.
closes #1771
2016-10-12 14:50:19 +01:00
Cameron Sparr 03b2984ac2 Fixup some code based on feedback from @dgnorton 2016-10-12 14:50:19 +01:00
Cameron Sparr 9540a6532f Update influxdb dependency for new models.Tags 2016-10-12 14:50:19 +01:00
Cameron Sparr cace663bbf Processor & Aggregator Contrib doc 2016-10-12 14:50:19 +01:00
Cameron Sparr acfdd15aa9 Processor & Aggregator configuration doccing 2016-10-12 14:50:19 +01:00
Cameron Sparr 78f544c0aa Support --aggregator-filter & --processor-filter 2016-10-12 14:50:19 +01:00
Cameron Sparr 2175a72fcc Rebase fixup 2016-10-12 14:50:19 +01:00
Cameron Sparr b03c1d9691 Support ordering of processor plugins 2016-10-12 14:50:19 +01:00
Cameron Sparr fead80844e Refactor handling of MinMax functionality into RunningAggregator
allows for easier addition of a sliding window at a later time.

Also makes `period` be a generic argument for all aggregator plugins.
2016-10-12 14:50:19 +01:00
Cameron Sparr ef885eda62 Change minmax aggregator to store float64 2016-10-12 14:50:19 +01:00
Cameron Sparr 64a71263a1 Support Processor & Aggregator Plugins
closes #1726
2016-10-12 14:50:19 +01:00
Cameron Sparr 974221f0cf Fix phpfpm fcgi client panic when URL doesnt exist
closes #1886
2016-10-12 11:58:38 +01:00
Ririsoft bccef2856d Revert "Moving cgroup path name to field from tag to reduce cardinality (#1457)"
This was introducing a regression with influxdb output, leading to
collision an points missing.
This reverts commit 53f40063b3.

closes #1724
closes #1796
2016-10-12 11:04:28 +01:00
Patrick Hemmer 80df3f7634 snmp: fix initialization of table fields in manual tables (#1836) 2016-10-12 11:00:39 +01:00
Cameron Sparr e96f7a9b12 graphite parser, handle multiple templates empty filter
Previously, the graphite parser would simply overwrite any template that
had an identical filter to a previous template. This included the empty
filter.

Now we will still overwrite, but first we will sort to make sure that
the most "specific" template always matches.

closes #1731
2016-10-11 15:22:51 +01:00
Cameron Sparr 2bbb6aa6f2 Add doc for SNMP debug tips (#1831) 2016-10-11 14:48:08 +01:00
Cameron Sparr 1ff721ad84 Add riemann output plugin deprecation message 2016-10-11 12:28:20 +01:00
Eric 3e3b094270 Only log warning on type when in debug mode.
closes #1793
2016-10-11 11:35:43 +01:00
Eric 1f7a8fceef Fixed json serialization to make sure only value type supported by OpenTSDB are sent and made sure we send numbers un-quoted event though OpenTSDB API accepts them as this is not clean json. 2016-10-11 11:32:24 +01:00
Marko Crnic b702a9758b haproxy/README: make quotes consistent
closes #1700
2016-10-11 11:30:22 +01:00
Marko Crnic 3b607aa8ae haproxy: add README covering basics of the plugin 2016-10-11 11:29:04 +01:00
Marko Crnic 4a4a6892f9 haproxy: update HAproxy docs URL 2016-10-11 11:29:04 +01:00
Marko Crnic 56b627dfe2 haproxy_test: extend tests to cover name globbing 2016-10-11 11:29:04 +01:00
Marko Crnic 5c87b92976 haproxy_test: define expected results in one place
Map holding expected results was defined in multiple places, making test
cases a bit hard to read. This way we can change our expectations of
good results in one place and have them affect multiple test cases.
2016-10-11 11:29:04 +01:00
Marko Crnic dbcc312b0e haproxy: clarify handling of http and socket addresses
This behaviour was introduced along with socket support, but never got
documented properly.
2016-10-11 11:29:04 +01:00
Marko Crnic 2d842fefb8 haproxy: add support for socket name globbing 2016-10-11 11:29:04 +01:00
Marko Crnic d63e3c8cc4 haproxy: move socket address detection to own function 2016-10-11 11:29:04 +01:00
Stian Øvrevåge 187a894fe9 Create CONFIG-EXAMPLES.md with a switch interface example
Added a standard example for collecting interface metrics from switches or routers and tagging them properly.

closes #1666
2016-10-11 11:00:25 +01:00
Cameron Sparr ca55c4a55d Remove COMING SOON: multiple statsd fields 2016-10-11 10:57:34 +01:00
Cameron Sparr d627bdbbdb logparser: allow numbers in ident & auth parameters
fixes #1810
2016-10-10 11:27:35 +01:00
Edie Zhang 4f06f6b3d8 adding the tags in the graylog output plugin
closes #1861
2016-10-07 12:24:21 +01:00
Cameron Sparr 7f0fe78615 Changelog update for systemd log change 2016-10-06 17:48:23 +01:00
Ririsoft 5913f7cb36 Log to systemd journal
Let's align to InfluxDB 1.0 logging policy and log to systemd journal by
default.

closes #1732
2016-10-06 17:48:22 +01:00
James Carr 8dc42ad9f2 Add idle_since to emitted metrics (#1844) 2016-10-06 14:26:53 +01:00
Cameron Sparr 886bdd2ef2 changelog update 2016-10-06 14:25:28 +01:00
Patrick Hemmer 5a86a2ff26 snmp: return error on unknown conversion type (#1853) 2016-10-06 14:23:51 +01:00
zensqlmonitor 817d696628 SQL Server plugin: Fix WaitStats issue (#1859)
Issue #1854
2016-10-06 14:21:14 +01:00
Cameron Sparr 4ab0344ebf Update changelog & readme for 1.0.1 2016-10-05 08:41:58 +01:00
Patrick Hemmer 7b05170145 update to latest gosnmp (#1850) 2016-10-05 08:40:56 +01:00
Patrick Hemmer b48ad4b737 fix snmp emitting empty fields
closes #1848
closes #1835
2016-10-04 16:25:16 +01:00
Patrick Hemmer 9feb639bbd fix translating snmp fields not in MIB (#1846) 2016-10-04 16:22:15 +01:00
Cameron Sparr ce5054c850 Changelog update 2016-10-03 18:20:10 +01:00
Cameron Sparr c7834209d2 Major Logging Overhaul
in this commit:

- centralize logging output handler.
- set global Info/Debug/Error log levels based on config file or flags.
- remove per-plugin debug arg handling.
- add a I!, D!, or E! to every log message.
- add configuration option to specify where to send logs.

closes #1786
2016-10-03 17:13:03 +01:00
Cameron Sparr 78ced6bc30 Use a bufio.Scanner in http listener
this will prevent potential very large allocations due to a very large
chunk size send from a client.

fixes #1823
2016-09-29 16:07:51 +01:00
Cameron Sparr ca8e512e5b Update changelog 2016-09-28 16:12:32 +01:00
zensqlmonitor 573628dbdd Fix collation issue 2016-09-28 16:11:00 +01:00
Peter Murray e477620dc5 Making '-service' flags work from a non-interactive session, i.e. Ansible, related to #1760 2016-09-28 16:09:43 +01:00
Łukasz Harasimowicz 32268fb25b Disable mesos tasks statistics until we find a better way to deal with them.
Due to quite real problem of generating vast number of data series through
mesos tasks metrics this feature is disabled until better solution is found.
2016-09-28 16:07:35 +01:00
Łukasz Harasimowicz 80391bfe1f Fixed tags on mesos_task metrics.
Tagging values by executor_id can create quite a lot data series
in InfluxDB so we should stick to framework_id and server.
2016-09-28 16:07:35 +01:00
Cameron Sparr e19845c202 Load config directory using filepath.Walk
closes #1137
2016-09-28 16:01:52 +01:00
Cameron Sparr 52134555d6 globpath: only walk tree if ** is defined
closes #1517
2016-09-28 15:44:29 +01:00
Cameron Sparr e7e39df6a0 Default SNMP parameter changes
max-repetitions = 10 is the default of net-snmp utils according to
http://net-snmp.sourceforge.net/docs/man/snmpbulkwalk.html

retries = 3 is the default of gosnmp:
https://godoc.org/github.com/soniah/gosnmp#pkg-variables

Could deal with some parts of the performance issues reported
by #1665
2016-09-28 14:34:20 +01:00
Patrick Hemmer 055ef168ae add oid_index_suffix to snmp plugin 2016-09-27 11:30:25 +01:00
Patrick Hemmer 2778b7be30 add snmp conversions for MAC addresses & IPs 2016-09-27 11:30:25 +01:00
Patrick Hemmer 953db51b2c Adjust snmp translation to return conversion info.
Also consolidated the translation code to obtain all info with just 1 command execution.

Also split test command mocks out to their own file for cleanliness.
2016-09-27 11:30:25 +01:00
Cameron Sparr c043461f6c Fix varnish plugin to use default values
closes #1752
2016-09-23 16:06:33 +01:00
Cameron Sparr ddc07f9ef8 Fix powerdns integer parse error handling
closes #1751
2016-09-23 16:05:15 +01:00
lost_z 2cf1db0837 add mysql uptime (#1735) 2016-09-23 15:59:22 +01:00
Cameron Sparr 17e6496830 update changelog 2016-09-23 11:38:52 +01:00
Vinh Quốc Nguyễn 1d10eda84e Fix crash when allow pending messgae wasn't set (#1785)
The default is 0 so we hit a division by 0 error and crash. This checks
ensure we will not crash and `log` and continue to let telegraf run

Also we set default allow pending message number to 10000
2016-09-23 11:37:47 +01:00
Daniele Gozzi 9ea3dbeee8 Allow numeric and non-string values for tag_keys. (#1782)
* Allow numeric and non-string values for tag_keys.

According to the go documentation the JSON deserializer only produces these
base types in output:
- string
- bool
- float64
- nil
With this patch bool, float64 and nil values get converted to a string when
their field key is specified in tag_keys. Previously the field was simply
discarded.

* Updated handling of nil for passing tests.

The automated tests are less than trivial to reproduece locally for me,
so I hope CircleCI wonn't mind...

* Updated changelog entries with PR and issue links.
2016-09-21 18:07:35 +01:00
Rikaard Hosein 100501ba72 statsd input plugin correctly handles colons in data-dog tag values now (#1794)
* Code correctly handles colons in tag values now

* Modified existing datadog tag test to include a tag value containing a colon
2016-09-21 14:37:42 +01:00
Cameron Sparr f12368698b Update etc/telegraf.conf
closes #1789
2016-09-21 11:53:06 +01:00
Ross McDonald 6b25a73629 Add container state metrics to docker plugin (#1791)
* Add container state metrics to docker plugin.

* Update changelog.
2016-09-21 10:37:49 +01:00
David Moravek 90c7475c68 Fix sysstat resource leak (#1792) 2016-09-21 10:19:59 +01:00
Cameron Sparr 6648c101dd Add configurable timeout to influxdb input
closes #1773
2016-09-16 16:50:39 +01:00
Cameron Sparr 8d3285522c Prometheus output: do not remake metrics map each write
closes #1775
2016-09-16 16:50:39 +01:00
David Norton b613405f42 Merge pull request #1768 from influxdata/dgn-speedup-statsd-parser
speed up statsd parser
2016-09-15 10:46:56 -04:00
David Norton e999298078 speed up statsd parser 2016-09-15 08:11:06 -04:00
David Norton 0f0ab953f6 Merge pull request #1766 from influxdata/dgn-statsd-parsing-benchmarks
add statsd parsing benchmarks
2016-09-15 07:10:18 -04:00
David Norton aaddbd153e add statsd parsing benchmarks 2016-09-14 11:12:02 -04:00
Cameron Sparr 9b2e2cc41f kafka panic: Check that error is non-nil before
fixes #1764
2016-09-14 08:54:22 +01:00
Cameron Sparr bc22309459 Add commit & branch to Makefile 2016-09-13 09:31:30 +01:00
Gunnar b6f81b538a Add commit to Telegraf version string (#1756) 2016-09-13 08:41:02 +01:00
Cameron Sparr c3aa43a6bd Fix prometheus output panic on reload
closes #1530
2016-09-12 10:46:37 +01:00
Rene Zbinden b2ea39077e fix issue #1716 (#1749) 2016-09-12 10:30:35 +01:00
Cameron Sparr 811567a2f4 Update go version to 1.7, fix vet errors
closes #1728
2016-09-09 16:11:17 +01:00
Cameron Sparr ca8fb440cc Fix statsd scientific notation parsing
closes #1733
2016-09-09 15:13:11 +01:00
Cameron Sparr ac58a6bb3c Fix unmarshal of influxdb metrics will null tags
closes #1738
2016-09-09 14:49:21 +01:00
Sean Beckett 9757d39240 Update CHANGELOG.md 2016-09-08 09:11:24 -06:00
Cameron Sparr 5a9e7d77b8 Update readme & chglog for 1.0 2016-09-08 15:26:10 +01:00
Cameron Sparr e963b7f01b alphabetize service inputs, add logparser 2016-09-07 15:55:21 +01:00
Nathan D Acuff e7899d4dc5 Postgresql database blacklist configuration option (#1699)
* separate hello and authenticate functions, force connection close at end of write cycle so we don't hold open idle connections, which has the benefit of mostly removing the chance of getting hopelessly connection lost

* update changelog, though this will need to be updated again to merge into telegraf master

* bump instrumental agent version

* fix test to deal with better better connect/reconnect logic and changed ident & auth handshake

* Update CHANGELOG.md

correct URL from instrumental fork to origin and put the change in the correct part of the file

* go fmt

* Split out Instrumental tests for invalid metric and value.

* Ensure nothing remains on the wire after final test.

* Force valid metric names by replacing invalid parts with underscores.

* Multiple invalid characters being joined into a single udnerscore.

* Adjust comment to what happens.

* undo split hello and auth commands, to reduce roundtrips

* Add ignored_databases option to postgresql configuration files, to enable easy filtering of system databases without needing to whitelist all the databases on the server.  Add tests for database whitelist and blacklist.

* run go fmt on new postgresql database whitelist/blacklist code

* add postgresql database blacklist option to changelog

* remove a bad merge from the changelog
2016-09-07 09:39:55 +01:00
Cameron Sparr 301c79e57c Add a 404 and high-traffic test to http listener
also remove locking around adding metrics. Instead, keep a waitgroup on
the ServeHTTP function and wait for that to finish before returning from
the Stop() function

closes #1407
2016-09-06 17:21:01 +01:00
ncohensm 67c288abda initial http_listener implementation
fix incredibly stupid bugs

populate README

support query endpoint and change default listen port

set response headers for query endpoint

add unit tests

revert erroneous Godeps change

add plugin ref to top-level README

remove debug output and add empty post body test

fix linter errors

move stoppableListener into repo

use constants for http status codes

add CHANGELOG entry

address code review comments re. style/structure

address further code review comments

add note to README re. database creation calls per PR comments
2016-09-06 17:21:01 +01:00
Cameron Sparr 8dd2a8527a Refactor NATS ssl config 2016-09-06 13:52:29 +01:00
Cameron Sparr 2fe427b3b3 mongodb input: fix version 2.2 panic
closes #1628
2016-09-06 11:58:06 +01:00
Paulo Pires 6b1cc67664 Add NATS output plugin.
Added NATS server container needed for tests.

Added NATS output plug-in. Fixes #1487

NATS output plug-in use internal.GetTLSConfig to instrument TLS configuration.

Added NATS output plug-in to changelog.

closes #1487
closes #1697
2016-09-06 11:39:57 +01:00
Cameron Sparr 1271f9d71a jolokia input: add note about POST permissions
closes #1628
2016-09-06 11:11:27 +01:00
aaron jheng 49ea4e9f39 [Docker Plugin] add server hostname for each docker measurements (#1599)
* add server hostname for each docker measurements

* update CHANGELOG

* move feature to v1.1

* tweak docker_engine_host tag
2016-09-06 08:37:46 +01:00
Cameron Sparr 50ef3282b6 Refactor and code cleanup of filtering
started working on this with the idea of fixing #1623, although I
realized that this was actually just a documentation issue around
a toml eccentricity.

closes #1623
2016-09-05 16:30:18 +01:00
Phil b63dedb74d sanitize parenthesis (#1701) 2016-09-05 14:30:40 +01:00
Denis Orlikhin 5628049440 Handle negative integers coming as unsigned integers from Aerospike (#1679)
* Handle negative integers coming as unsigned integers from Aerospike stats

* skip values with overflow

* aerospike stat values parsing tests

* better tests
2016-09-05 14:29:14 +01:00
Cameron Sparr 54c9ba7639 Update documentation for Gauge & Counters 2016-09-05 12:58:07 +01:00
Cameron Sparr b18d375d6c Implement AddGauge & AddCounter functions
and utilize them in the in the 'system' input plugins.
2016-09-02 16:51:26 +01:00
Cameron Sparr 6dbbe65897 Remove Add() function from accumulator 2016-09-02 16:35:27 +01:00
Cameron Sparr 03d8abccdd Implement telegraf metric types
And use them in the prometheus output plugin.

Still need to test the prometheus output plugin.

Also need to actually create typed metrics in the system plugins.

closes #1683
2016-09-02 16:35:27 +01:00
David Caldwell 0f6d317a8e Fix MySQL plugin not sending 0 value fields (#1695)
closes #1695
2016-09-02 15:22:30 +01:00
Cameron Sparr 792682590c Remove snmp_legacy unit tests and docker image 2016-08-31 12:17:06 +01:00
François de Metz 2d3da343b3 Add basic filestack webhook.
closes #1542

Generalize event.

Add doc.

Update default config.

Add filestack to the list of plugins.

Check that video conversion event returns 400.

Update the readme.

Update the changelog.
2016-08-31 10:48:27 +01:00
Charles-Henri 094eda22c0 Add new iptables plugin
The iptables plugin aims at monitoring bytes and packet counters
matching a given set of iptables rules.

Typically the user would set a dedicated monitoring chain into a given
iptables table, and add the rules to monitor to this chain. The plugin
will allow to focus on the counters for this particular table/chain.

closes #1471
2016-08-31 10:42:44 +01:00
Butitsnotme 4886109d9c Added option to remove all CRs from input stream
Added the option removecr to inputs.exec to remove all carraige returns
(CR, ASCII 0x0D, Unicode codepoint \u0D, ^M). The option is boolean and
not enabled if not present in the config file.

closes #1606

Updated CHANGELOG.md with information about removecr

Ran go fmt ./...

Moved removal of CRs to internal/internal.go

Moved the code to remove carriage returns from
plugins/inputs/exec/exec.go to internal/internal.go. Additionally
changed the conditional on which it gets applied from using a
configuration file option to checking if it is running on Windows.

Moved Carriage Return check to correct place

Moved the carriage return removal back to the exec plugin. Added unit
testing for it. Fixed a bug (removing too many characters).

Ran go fmt ./...

Reverted CHANGELOG to master

Updated Changelog
2016-08-31 10:32:33 +01:00
Cameron Sparr 2dc47285bd Move CloudWatch rate limit to config (#1673)
* Move CloudWatch rate limit to config
Reference #1670

* make that variable a string

* ahem, apparently limiter wants an int

* add the ratelimit to the sample config

* update the test to include the rate

* set a default value of 10 for ratelimit

* Move default ratelimit to init
2016-08-31 10:29:24 +01:00
Eric 6e33a6d62f OpenTSDB HTTP output
closes #1539

First version of http put working

Refactored code to separate http handling from opentsdb module. Added batching support.

Fixed tag cleaning in http output and refactored telnet output.

Removed useless struct.

Fixed current unittest and added a new one.

Added benchmark test to test json serialization. Made sure http client would reuse connection.

Ran go fmt on opentsdb sources.

Updated README file

Removed useHttp in favor of parsing host string to determine the right API to use for sending metrics. Also renamed BatchSize to HttpBatchSize to better convey that it is only used when using Http API.

Updated changelog

Fixed format issues.

Removed TagSet type to make it more explicit.

Fixed unittest after removing TagSet type.

Revert "Updated changelog"

This reverts commit 24dba5520008d876b5a8d266c34a53e8805cc5f5.

Added PR under 1.1 release.

add missing redis metrics

This makes sure that all redis metrics are present without having to use a hard-coded list of what metrics to pull in.
2016-08-31 10:27:08 +01:00
Cameron Sparr a8f9eb23cc add missing redis metrics (#1689)
This makes sure that all redis metrics are present without having to use a hard-coded list of what metrics to pull in.
2016-08-31 08:44:47 +01:00
Patrick Hemmer 41a5ee6571 add missing redis metrics
This makes sure that all redis metrics are present without having to use a hard-coded list of what metrics to pull in.
2016-08-31 01:05:11 -04:00
Nathan Haneysmith 7d8de4b8e1 Move default ratelimit to init 2016-08-30 14:33:51 -07:00
Cameron Sparr cc2b53abf4 Fix changelog for #1650 2016-08-30 16:24:07 +01:00
Yaser Alraddadi 32aa1cc814 httpjson: support configurable response_timeout (#1651)
* httpjson: support configurable response_timeout

* make default ResponseTimeout in init

* Update CHANGELOG.md
2016-08-30 16:23:15 +01:00
Simon Murray 38d877165a Ceph Cluster Performance Input Plugin
The existing ceph input plugin only has access to the local admin daemon socket
on the local host, and as such has access to a limited subset of data.  This
extends the plugin to use CLI commands to get access to the full spread of Ceph
data.  This patch collects global OSD map and IO statistics, PG state and per pool
IO and utilization statistics.

closes #1513
2016-08-30 15:43:07 +01:00
Cameron Sparr 5c5984bfe1 Changelog update 2016-08-30 15:26:27 +01:00
tuier 30cdc31a27 Some improvment in mesos input plugin, (#1572)
* Some improvment in mesos input plugin,
     Removing uneeded statistics prefix for task's metric,
     Adding framework id tags into each task's metric,
     Adding state (leader/follower) tags to master's metric,
     Make sure the slave's metrics are tags with slave

* typo, replacing cpus_total with elected to determine leader

* Remove remaining statistics_ from sample

* using timestamp from mesos as metric timestamp

* change mesos-tasks to mesos_tasks, measurement

* change measurement name in test

* Replace follower by standby
2016-08-30 15:25:29 +01:00
Cameron Sparr 602a36e241 fix changelog #1607 2016-08-30 07:04:10 +01:00
Joel "The Merciless" Meador b863ee1d65 [Instrumental] Underscore metric name output (#1607)
* separate hello and authenticate functions, force connection close at end of write cycle so we don't hold open idle connections, which has the benefit of mostly removing the chance of getting hopelessly connection lost

* update changelog, though this will need to be updated again to merge into telegraf master

* bump instrumental agent version

* fix test to deal with better better connect/reconnect logic and changed ident & auth handshake

* Update CHANGELOG.md

correct URL from instrumental fork to origin and put the change in the correct part of the file

* go fmt

* Split out Instrumental tests for invalid metric and value.

* Ensure nothing remains on the wire after final test.

* Force valid metric names by replacing invalid parts with underscores.

* Multiple invalid characters being joined into a single udnerscore.

* Adjust comment to what happens.

* undo split hello and auth commands, to reduce roundtrips

* Split out Instrumental tests for invalid metric and value.

* Ensure nothing remains on the wire after final test.

* Force valid metric names by replacing invalid parts with underscores.

* Multiple invalid characters being joined into a single udnerscore.

* add an entry to CHANGELOG for easy merging upstream

* go fmt variable alignment

* remove some bugfixes from changelog which now more properly are in a different section.

* remove headers and whitespace should should have been removed with the last commit
2016-08-30 07:03:32 +01:00
Nathan Haneysmith ca49babf3a set a default value of 10 for ratelimit 2016-08-29 11:41:43 -07:00
SoleAngelus cf37b5cdcf Update WINDOWS_SERVICE.md (#1669)
1. Added further clarification on running commands in PowerShell.
2. Added double quotes to file paths.
2016-08-29 17:36:05 +01:00
Cameron Sparr 969f388ef2 Make elasticsearch timeout configurable
closes #1674
2016-08-29 11:06:30 +01:00
Nathan Haneysmith 0589a1d0a5 update the test to include the rate 2016-08-25 18:17:33 -07:00
Nathan Haneysmith 4e019a176d add the ratelimit to the sample config 2016-08-25 18:04:29 -07:00
Nathan Haneysmith a0e23d30fe ahem, apparently limiter wants an int 2016-08-25 17:56:33 -07:00
Nathan Haneysmith e931706249 make that variable a string 2016-08-25 17:53:46 -07:00
Nathan Haneysmith 2457d95262 Move CloudWatch rate limit to config
Reference #1670
2016-08-25 17:46:38 -07:00
Cameron Sparr e9d33726a9 start aerospike container 1st for unit tests
because it requires some time to initialize before it can respond to
metric requests.
2016-08-24 09:16:55 +01:00
Cameron Sparr 2462e04bf2 Rdme upd (#1660)
* Update README and CHANGELOG with 1.0 RC 1

* Increase circleci test docker sleep

* update aerospike dependency
2016-08-24 08:41:12 +01:00
Patrick Hemmer 7fac74919c Alternate SNMP plugin (#1389)
* Add a new and improved snmp plugin

* update gosnmp for duplicate packet fix

https://github.com/soniah/gosnmp/issues/68
https://github.com/soniah/gosnmp/pull/69
2016-08-22 16:37:53 +01:00
Robert Kánia b022b5567d Added missing column, refs #1646 (#1647) 2016-08-22 15:35:39 +01:00
Cameron Sparr dbf6380e4b update PR template with changelog note 2016-08-17 18:24:06 +01:00
Cameron Sparr a0e42f8a61 Sanitize graphite characters in field names
also sanitize the names at a higher scope for better clarity

closes #1637
2016-08-17 16:56:31 +01:00
Cameron Sparr 94e673fe85 Revert "add pgbouncer plugin"
This reverts commit fec9760f72.
2016-08-17 16:50:11 +01:00
Cameron Sparr 7600757f16 ntpq: don't index ntp fields that dont exist
closes #1634
2016-08-16 15:16:42 +01:00
Cameron Sparr 4ce8dd5f9a Rename snmp plugin to snmp_legacy 2016-08-11 16:11:35 +01:00
politician 26315bfbea Defines GOOS and GOARCH for windows builds (#1621)
* defines GOOS and GOARCH for windows builds

* default to amd64 on windows

* windows: use latest versions of missing packages
2016-08-11 15:35:00 +01:00
David Bayendor a282fb8524 Update README.md (#1622)
* Update README.md

Clean up minor typos and syntax.

* Update README.md

Fix typo in 'default'
2016-08-11 09:14:56 +01:00
Jack Zampolin dee98612e2 Modernize zookeeper readme (#1615)
* Modernize zookeeper readme

* Add configuration
2016-08-10 22:58:47 +01:00
Ross McDonald 69e4e862a3 Fix typo of 'quorom' to 'quorum' when specifying write consistency. (#1618) 2016-08-10 17:51:21 +01:00
Cameron Sparr c0e895c3a7 etc/telegraf.conf update 2016-08-10 15:16:01 +01:00
jsvisa fec9760f72 add pgbouncer plugin
add pgbouncer docker for testing

add pgbouncer testcase

update changlog

closes #1400
2016-08-10 15:14:15 +01:00
Rene Zbinden 1989a5855d remove cgo dependeny with forking sensors command
closes #1414
closes #649
2016-08-09 08:38:05 +01:00
Cameron Sparr abcd19493e If win stat buffer is empty, do not try to index
closes #1425
2016-08-09 08:29:37 +01:00
tuier e457b7a8df Source improvement for librato output (#1416)
* Source improvement for librato output

Build the source from the list of tag instead of a configuration specified
single tag

Graphite Serializer:
* make buildTags public
* make sure not to use empty tags

Librato output:
* Improve Error handling for librato API base on error or debug flag
* Send Metric per Batch (max 300)
* use Graphite BuildTag function to generate source

The change is made that it should be retro compatible

Metric sample:
server=127.0.0.1 port=80 state=leader env=test
measurement.metric_name value
service_n.metric_x

Metric before with source tags set as "server":
source=127.0.0.1
test.80.127_0_0_1.leader.measurement.metric_name
test.80.127_0_0_1.leader.service_n.metric_x

Metric now:
source=test.80.127.0.0.1.leader
measurement.metric_name
service_n.metric_x

As you can see the source in the "new" version is much more precise
That way when filter (only from source) you can filter by env or any other tags

* Using template to specify which tagsusing for source, default concat all
tags

* revert change in graphite serializer

* better documentation, change default for template

* fmt

* test passing with new host as default tags

* use host tag in api integration test

* Limit 80 char per line, change resolution to be a int in the sample

* fmt

* remove resolution, doc for template

* fmt
2016-08-09 08:29:15 +01:00
Mariusz Brzeski 3853d0d065 Fix problem with metrics when ping return Destination net unreachable ( windows ) (#1561)
* Fix problem with metrics when ping return Destination net unreachable
Add test case TestUnreachablePingGather
Add percent_reply_loss
Fix some other tests

* Add errors measurment

* fir problem with ping reply "TTL expired in transit" ( use regex for more specific condition - TTL in line but it's a not valid replay )
add test case for "TTL expired in transit" - TestTTLExpiredPingGather
2016-08-09 08:27:30 +01:00
Patrick Hemmer 53e31cf1b5 Fix postgres extensible text (#1601)
* convert postgresql_extensible byte slice values to strings

* code cleanup in postgresql_extensible
2016-08-09 08:25:59 +01:00
Cameron Sparr c99c22534b influxdb output: config doc update 2016-08-09 07:50:35 +01:00
Cameron Sparr 8e22526756 Adding c:\program files\telegraf\telegraf.conf
this will now be the default config file location on windows, basically
it is the windows equivalent of /etc/telegraf/telegraf.conf

also updating the changelog

closes #1543
2016-08-08 23:17:27 +01:00
Dennis Bellinger 7b6713b094 Telegraf support for built-in windows service.
Updated windows dependencies

Updated the windows dependencies so that the versions matched the
dependencies for Mac OS and Linux. Additionally added some that were
complained about being missing at compile time.

Incorporated kardianos/service for management

Incorporated the library github.com/kardianos/service to manage the
service on the various platforms (including Windows). This required an
alternate main function.

The original main function was renamed to reloadLoop (as that is what
the main loop in it does) (it also got a couple of parameters). The
service management library calls it as the main body of the program.

Merged service.go into telegraf.go

Due to compilation issues on Windows, moved the code from service.go
into telegraf.go and removed service.go entirely.

Updated dependencies and fixed Windows service

Updated the dependencies so that it builds properly on Windows,
additionally, fixed the registered command for starting it as
a service (needed to add the config file option). This currently
standardizes it as a C:\telegraf\telegraf.conf on Windows.

Added dependency for github.com/kardianos/service

Removed the common dependencies from _windows file

Removed all the common dependencies from the Godeps_windows file and
modified Makefile to load Godeps and then Godeps_windows when building
for Windows. This should reduce problems caused by the Godeps_windows
file being forgotten when updating dependencies.

Updated CHANGELOG.md with changes

Ran `go fmt ./...` to format code

Removed service library on all but Windows

The service library [kardianos/service](github.com/kardianos/service)
has been disabled on all platforms but windows, as there is already
existing infrastructure for other platforms.

Removed the dependency line for itself

It appears that gdm accidentally added the project itself to the
dependency list. This caused the dependency restoration to select an
earlier version of the project during build.

This only affected windows.
This only affected builds after 020b2c70

Updated documentation for Windows Service

Removed the documentation about using NSSM and added documentation on
installing telegraf directly as a Windows Service.

Added license info for kardianos/service

Added the license information for github.com/kardianos/service which is
licensed under the ZLib license, although that name is never mentioned
the license text matches word for word.

Changed the Windows Config file default location

Updated the default location of the configuration file on Windows from
C:\telegraf\telegraf.conf to C:\Program Files\Telegraf\telegraf.conf.
With this change includes updating the directions, including directing
that the executable be put into that same directory. Additionally, as
noted in the instructions, the location of the config file for the
service may be changed by specifying the location with the `-config`
flag at install time.

Fixed bug - Wrong data type: svcConfig

svcConfig service.Config => svcConfig *service.Config
(It needed to be a pointer)
2016-08-08 23:10:39 +01:00
Jack Zampolin b0ef506a88 Add Kafka output readme (#1609) 2016-08-08 23:10:07 +01:00
Jack Zampolin 22c293de62 Add request for sample queries (#1608) 2016-08-08 23:06:03 +01:00
Cameron Sparr d3bb1e7010 Rename internal_models package to models 2016-08-08 14:41:40 +01:00
Cameron Sparr 49988b15a3 Default config typo fix 2016-08-06 07:40:28 +01:00
Cameron Sparr f0357b7a12 CHANGELOG formatting update
put all 1.0 beta releases into a single 1.0 release manifest

also add #1586 change
2016-08-05 14:51:19 +01:00
Cameron Sparr 9d3ad6309e Remove IF NOT EXISTS from influxdb output 2016-08-05 13:55:02 +01:00
Cameron Sparr b55e9e78e3 gopsutil, fix /proc/pid/io naming issue
closes #1584
2016-08-05 09:53:14 +01:00
Cameron Sparr 4bc6fdb09e Removing INFLUXDB_HTTP_LOG from logparser usage/docs
this log format is likely soon going to be removed from a future
influxdb release, so we should not be recommending that users base any
of their log parsing infra on this.
2016-08-04 16:42:59 +01:00
Cameron Sparr 2b43b385de Begin implementing generic timestamp logparser capability 2016-08-04 16:08:55 +01:00
Cameron Sparr 13865f9e04 Disable darwin builds (#1571)
telegraf can't be cross-compiled for darwin, it has C dependencies and
thus many of the system plugins won't work.
2016-08-04 14:27:33 +01:00
Jack Zampolin 497353e586 add call to action for plugin contribuitors to write tickscripts (#1580) 2016-08-04 14:27:06 +01:00
Cameron Sparr 2d86dfba8b Removing deprecated flags
they are:
  -configdirectory
  -outputfilter
  -filter
2016-08-03 13:08:06 +01:00
Cameron Sparr 30dbfd9af8 Fix racy tail from beginning test 2016-07-28 14:08:12 +01:00
Cameron Sparr c991b579d2 tcp/udp listeners, remove locks & improve test coverage 2016-07-28 13:42:34 +01:00
Srini Chebrolu 841729c0f9 RPM post remove script update for proper handle on all Linux distributions (#1381) 2016-07-28 08:34:57 +01:00
Victor Garcia 412f5b5acb Fixing changelog, MongoDB stats per db feature not release in 1.0beta3 (#1548) 2016-07-26 19:15:40 +01:00
Mariusz Brzeski 0b3958d3cd Ping windows (#1532)
* Ping for windows

* En ping output

* Code format

* Code review

* Default timeout

* Fix problem with std error when no data received ( exit status = 1 )
2016-07-25 13:17:41 +01:00
Patrick Hemmer e68f251df7 add AddError method to accumulator (#1536) 2016-07-25 13:09:49 +01:00
Jason Gardner 986735234b Fix output config typo. (#1527) 2016-07-22 16:05:53 +01:00
Patrick Hemmer 4363eebc1b update gopsutil for FreeBSD disk time metrics (#1534)
Results in adding the io_time metric to FreeBSD, and adjusts the read_time and write_time metrics to be in milliseconds like linux.
2016-07-22 09:23:45 +01:00
Patrick Hemmer 1be6ea5696 remove unused accumulator.prefix (#1535) 2016-07-22 09:22:52 +01:00
Cameron Sparr 8acda0da8f Update etc/telegraf.conf 2016-07-21 17:53:41 +01:00
Łukasz Harasimowicz ee240a5599 Added metrics for Mesos slaves and tasks running on them.
closes #1356
2016-07-21 17:13:00 +01:00
Mendelson Gusmão 29ea433763 Implement support for fetching hddtemp data (#1411) 2016-07-21 17:00:54 +01:00
Pierre Fersing 0462af164e Added option "total/perdevice" to Docker input (#1525)
Like cpu plugin, add two option "total" and "perdevice" to send network
and diskio metrics either per device and/or the sum of all devices.
2016-07-21 16:50:12 +01:00
Cameron Sparr 1c24665b29 Prometheus client & win_perf_counters char changes
1. in prometheus client, do not check for invalid characters anymore,
because we are already replacing all invalid characters with regex
anyways.
2. in win_perf_counters, sanitize field name _and_ measurement name.
Also add '%' to the list of sanitized characters, because this character
is invalid for most output plugins, and can also easily cause string
formatting issues throughout the stack.
3. All '%' will now be translated to 'Percent'

closes #1430
2016-07-21 16:24:19 +01:00
Torsten Rehn 0af0fa7c2e jolokia: handle multiple multi-dimensional attributes (#1524)
fixes #1481
2016-07-20 14:47:04 +01:00
Cameron Sparr 191608041f Strip container_version from container_image tag
closes #1413
2016-07-19 17:57:40 +01:00
Pierre Fersing 42d9d5d237 Fix Redis url, an extra "tcp://" was added (#1521) 2016-07-19 15:24:10 +01:00
Cameron Sparr d54b169d67 nstat: fix nstat setting path for snmp6
closes #1477
2016-07-19 14:51:36 +01:00
Cameron Sparr 82166a36d0 Fix err race condition and partial failure issues
closes #1439
closes #1440
closes #1441
closes #1442
closes #1443
closes #1444
closes #1445
2016-07-19 14:45:55 +01:00
Victor Garcia cbf5a55c7d MongoDB input plugin: Adding per DB stats (#1466) 2016-07-19 12:47:12 +01:00
Cameron Sparr 5f14ad9fa1 clean up and finish aerospike refactor & readme 2016-07-19 11:36:41 +01:00
Timothée GERMAIN 0be69b8a44 Make the user able to specify full path for HAproxy stats
closes #1499
closes #1019

Do no try to guess HAproxy stats url, just add ";csv" at the end of the
url if not present.

Signed-off-by: tgermain <timothee.germain@corp.ovh.com>
2016-07-19 11:35:15 +01:00
Matt Jones 375710488d Add support for self-signed certs to RabbitMQ input plugin (#1503)
* add initial support to allow self-signed certs

When using self-signed the metrics collection will fail, this will allow
the user to specify in the input configuration file if they want to skip
certificate verification. This is functionally identical to `curl -k`

At some point this functionality should be moved to the agent as it is
already implemented identically in several different input plugins.

* Add initial comment strings to remove noise

These should be properly fleshed out at some point to ensure
code completeness

* refactor to use generic helper function

* fix import statement against fork

* update changelog
2016-07-19 10:24:06 +01:00
Cameron Sparr 03d02fa67a Telegraf v1.0 beta 3 2016-07-18 18:20:41 +01:00
Cameron Sparr b58cd78c79 Use errchan in redis input plugin
this may address, or at least log issue #1462
2016-07-18 17:26:44 +01:00
Cameron Sparr dabb6f5466 Internally name all patterns for log parsing flexibility
closes #1436

This also fixes the bad behavior of waiting until runtime to return log
parsing pattern compile errors when a pattern was simply unfound.

closes #1418

Also protect against user error when the telegraf user does not have
permission to open the provided file. We will now error and exit in this
case, rather than silently waiting to get permission to open it.
2016-07-18 15:44:58 +01:00
Cameron Sparr 281a4d5500 Change resp_code from field to tag in logparser
closes #1479
2016-07-18 13:33:11 +01:00
François de Metz 1c2965703d Webhooks plugin: add mandrill (#1408)
* Add mandrill webhook.

* Store the id of the msg as part of event.

Signed-off-by: Cyril Duez <cyril@stormz.me>
Signed-off-by: François de Metz <francois@stormz.me>

* Decode body to get the mandrill_events.

Signed-off-by: Cyril Duez <cyril@stormz.me>
Signed-off-by: François de Metz <francois@stormz.me>

* Handle HEAD request.

Signed-off-by: Cyril Duez <cyril@stormz.me>
Signed-off-by: François de Metz <francois@stormz.me>

* Add the README.

Signed-off-by: Cyril Duez <cyril@stormz.me>
Signed-off-by: François de Metz <francois@stormz.me>

* Add mandrill_webhooks to the README.

Signed-off-by: Cyril Duez <cyril@stormz.me>
Signed-off-by: François de Metz <francois@stormz.me>

* Update changelog.

Signed-off-by: Cyril Duez <cyril@stormz.me>
Signed-off-by: François de Metz <francois@stormz.me>

* Run gofmt.

Signed-off-by: Cyril Duez <cyril@stormz.me>
Signed-off-by: François de Metz <francois@stormz.me>
2016-07-18 12:41:13 +01:00
Cameron Sparr 5dc4cce157 Fixup adding 'measurement' to logparser grok
closes #1434
2016-07-18 12:28:55 +01:00
Nathaniel Cook 8c7edeb53b allow measurement to be defined for logparser_grok plugin 2016-07-18 12:20:24 +01:00
Tim Allen 1d9745ee98 Move exec WaitGroup from Exec instance level to Gather.
If Gather is run concurently the shared WaitGroup variable never finishes.

closes #1463
closes #1464
2016-07-18 12:18:14 +01:00
Mark McKinstry 2d6c8767f7 add ability to read redis from a socket (#1480)
* add ability to read redis from a socket

* update CHANGELOG
2016-07-18 12:03:39 +01:00
Cameron Sparr b4a6d9c647 Change prometheus replacer to reverse regex replacer
closes #1474
2016-07-18 11:50:22 +01:00
ashish 6afe9ceef1 cassandra plugin lower version support added
closes #1427
closes #1508
2016-07-18 09:22:20 +01:00
Cameron Sparr 704d9ad76c Refactor aerospike plugin to use client lib 2016-07-16 22:15:37 +01:00
tuier 300d9adbd0 Considere zookeeper's state as a tags (#1417)
This change will send the state of zookeeper (leader|follower) as a tag
and not a metrics
That way it will be easier to search for filter per state
2016-07-16 19:19:21 +01:00
Pierre Fersing 207c5498e7 Remove systemd Install alias (#1470)
Alias is a list of additional names. Adding it's cannonical name
cause systemctl enable telegraf to show a warning "Too many levels of
symbolic links"
2016-07-14 15:53:05 -06:00
Cameron Sparr d5e7439343 procstat plugin: store PID as a field
closes #1460
2016-07-14 15:52:02 -06:00
Joel Meador 21add2c799 instrumental plugin, rewrite connection retries
closes #1412

separate hello and authenticate functions,
force connection close at end of write cycle so we don't
hold open idle connections,
which has the benefit of mostly removing
the chance of getting hopelessly connection lost

bump instrumental agent version

fix test to deal with better better connect/reconnect logic and changed ident & auth handshake

Update CHANGELOG.md

correct URL from instrumental fork to origin and put the change in the correct part of the file

go fmt

undo split hello and auth commands, to reduce roundtrips
2016-07-14 15:18:31 -06:00
Shashank Sahni 4651ab88ad Fetching galera status metrics in MySQL
These are useful for Percona Xtradb cluster.

closes #1437
2016-07-14 15:02:45 -06:00
Sebastian Borza 53f40063b3 Moving cgroup path name to field from tag to reduce cardinality (#1457)
adding assertContainsFields function to cgroup_test for custom validation
2016-07-14 14:18:55 -06:00
Andrei Burd 97d92bba67 Redis input enhancement (#1387)
master_last_io_seconds_ago added
role tag renamed to replication_role
2016-07-14 13:28:36 -06:00
Cameron Sparr bfdd665435 Copy metrics for each configured output
This is for better thread-safety when running with multiple outputs,
which can cause very odd panics at very high loads

primarily this is to address #1432

closes #1432
2016-07-14 09:16:29 -06:00
Cameron Sparr 821d3fafa6 Refactor SerializeBucketName to be read-only for struct fields 2016-07-14 09:16:29 -06:00
Cameron Sparr 7c9b312cee Make race detector build in CI 2016-07-14 09:16:29 -06:00
Cameron Sparr 69ab8a645c graphite output: set write deadline on TCP connection 2016-07-14 09:16:29 -06:00
Kostas Botsas 7b550c11cb Documentation for load balancing on graphite output servers (#1469)
* Added documentation for load balancing on graphite output servers

* clarifications

* updates1

* updates2

* updates3
2016-07-14 09:06:00 -06:00
Cameron Sparr bb4f18ca88 temp ci fix, aerospike changed their metrics
see http://www.aerospike.com/docs/operations/upgrade/stats_to_3_9

TODO change aerospike input plugin to use official go client library.
2016-07-14 08:52:37 -06:00
Cameron Sparr 6efe91ea9c prometheus_client, implement Collector interface
closes #1334
2016-07-13 06:52:18 -06:00
Vladimir S 5f0a63f554 fixes #1450 (#1472) 2016-07-10 13:17:53 +01:00
François de Metz d14e7536ab Cleanup the list of plugins. (#1423)
Github and Rollbar are now part of the webhooks plugin.
2016-07-10 12:12:33 +02:00
Jack Zampolin c873937356 Add note about influxdb compatability (#1465) 2016-07-10 12:11:43 +02:00
Cameron Sparr e1c3800cd9 Prometheus parser fix, parse headers properly
closes #1458
2016-07-09 22:34:59 +02:00
Kostas Botsas c046232425 Merge pull request #1426 from influxdata/metrics-panic
nil metric list panic fix
2016-06-29 13:50:11 +03:00
Cameron Sparr 2d4864e126 nil metric list panic fix 2016-06-29 12:08:36 +02:00
Rene Zbinden 048448aa93 add build directory to git ignore (#1415) 2016-06-25 11:17:51 +01:00
Cameron Sparr 755b2ec953 fixup: BOM Trim -> TrimPrefix 2016-06-24 08:47:31 +01:00
Cameron Sparr f62c493c77 Recover from prometheus multiple handler panic
closes #1339
2016-06-23 14:29:35 +01:00
Jonathan Chauncey a6365a6086 feat(nsq_consumer): Add input plugin
to consume metrics from an nsqd topic

closes #1347
closes #1369
2016-06-23 14:06:36 +01:00
Cameron Sparr f7e057ec55 refactor cgroup build so non-linux systems see plugin
also updated the README for the fields->files change.
2016-06-23 11:47:25 +01:00
Cameron Sparr 30cc00d11b Update changelog, etc/telegraf.conf 2016-06-23 10:28:38 +01:00
Cameron Sparr d641c42029 cgroup: change fields -> files
closes #1103
closes #1350
2016-06-23 10:23:59 +01:00
Vladimir Sagan 9c2ca805da Remove flush_scope logic 2016-06-23 10:13:31 +01:00
Vladimir Sagan b0484d8a0c add cgroup plugin 2016-06-23 10:13:31 +01:00
Cameron Sparr 5ddd61d2e2 Trim BOM from config file for windows support
closes #1378
2016-06-23 09:00:51 +01:00
Victor Garcia 50ea7f4a9d x509 certs authentication now supported for Prometheus input plugin (#1396) 2016-06-23 08:59:44 +01:00
Thibault Cohen b18134a4e3 Fix #1405 (#1406) 2016-06-23 08:59:14 +01:00
Cameron Sparr 7825df4771 Fix darwin ping tests 2016-06-22 18:21:07 +01:00
Cameron Sparr d6951dacdc Remove docker-machine/boot2docker dependencies & references 2016-06-22 17:25:01 +01:00
François de Metz e603825e37 Add new webhooks plugin that superseed github and rollbar plugins.
closes #1289

Signed-off-by: François de Metz <francois@stormz.me>
Signed-off-by: Cyril Duez <cyril@stormz.me>

Rename internals struct.

Signed-off-by: François de Metz <francois@stormz.me>
Signed-off-by: Cyril Duez <cyril@stormz.me>

Update changelog.

Signed-off-by: François de Metz <francois@stormz.me>
Signed-off-by: Cyril Duez <cyril@stormz.me>

Update READMEs and CHANGELOG.

Signed-off-by: François de Metz <francois@stormz.me>
Signed-off-by: Cyril Duez <cyril@stormz.me>

Update SampleConfig.

Update the config format.

Update telegraf config.

Update the webhooks README.

Update changelog.

Update the changelog with an upgrade path.

Update default ports.

Fix indent.

Check for nil value on AvailableWebhooks.

Check for CanInterface.
2016-06-22 17:18:14 +01:00
Mike Glazer e3448153e1 Allow for TLS connections to ElasticSearch (#1398)
* Allow for TLS connections to ElasticSearch

Extremely similar implementation to the HTTP JSON module's
implementation of the same code.

* Changelog update
2016-06-22 16:23:49 +01:00
jsvisa 25848c545a Fix: riak with read_repairs available
closes #1399
2016-06-22 14:56:44 +01:00
Konstantin Kulikov 3098564896 fix datarace in input apache plugin
closes #1384
2016-06-22 14:42:47 +01:00
Stian Øvrevåge 4b6f9b93dd Updated sqlserver.go - Added Rows/Logs max size (#1380)
I added Rows/Logs max size counters for tracking databases that do not have autogrowth enabled. The counters return numbers in 8KB pages since there are a few special values (such as -1 for no max size) that can't directly be multiplied by 8192 to get size in bytes.

Also added Rows/Logs size in 8KB pages for comparison from the same system table. Even though it returns the same size as sizes from sys.dm_io_virtual_file_stats which are already collected.
2016-06-22 14:39:35 +01:00
Cameron Sparr 2beef21231 Beta 2 Release 1.0 2016-06-21 14:35:26 +01:00
Cameron Sparr cb3c54a1ae logparser input plugin
closes #102
closes #328
2016-06-21 14:23:01 +01:00
Iiro Uusitalo d50a1e83ac Added support for Tengine (#1390)
* Adds support for Tengine

* Added #1390 Tengine PR to changelog
2016-06-21 14:22:51 +01:00
Cameron Sparr 1f10639222 Fix Graphite output mangling '%' character.
closes #1377
2016-06-21 11:52:49 +01:00
Cameron Sparr af0979cce5 change "default" retention policy to ""
closes #1374
2016-06-16 12:22:27 +01:00
Cameron Sparr 5b43901bd8 update issue_template.md 2016-06-14 18:17:11 +01:00
Cameron Sparr d7efb7a71d Add precision rounding to accumulator
Adding precision rounding to the accumulator. This means that now every
input metric will get rounded at collection, rather than at write (and
only for the influxdb output).

This feature is disabled for service inputs, because service inputs
should be in control of their own timestamps & precisions.
2016-06-14 00:36:39 +01:00
Adrian Moisey 4d242836ee Fix typo (#1367)
* Fix typo

* Fix another typo
2016-06-13 10:38:58 +01:00
Cameron Sparr 06cb5a041e statsd, udp, tcp: do not log every dropped metric.
also applying this change to the udp_listener and tcp_listener input
plugins

closes #1340
2016-06-10 13:47:33 +01:00
Cameron Sparr ea2521bf27 Fixup ping change
fixes #1335
2016-06-10 13:05:28 +01:00
kodek 4cd1f7a104 Increase ping timeout based on ping count and interval 2016-06-10 12:49:37 +01:00
Cameron Sparr 137843b2f6 Change default zookeeper chroot to empty string
closes #1112
2016-06-10 12:07:36 +01:00
Cameron Sparr 008ed17a79 Fix exec plugin panic with single binary
fixes #1330
2016-06-10 11:27:46 +01:00
Tobias Schoknecht 75e6cb9064 Fixed incorrect prometheus metrics source selection (#1337)
Metrics type summary should retrieve values via GetSummary
 while histogram should retrieve values via GetHistogram for 
both count and sum
2016-06-09 22:50:00 +01:00
Cameron Sparr ad88a9421a Beta 1 Release 1.0 2016-06-07 10:48:17 +01:00
Cameron Sparr 346deb30a3 OpenTSDB test problems, disabling output integration tests 2016-06-07 10:39:25 +01:00
Cameron Sparr 8c3d7cd145 Fix rare panic in RHEL 5.2 diskio plugin (#1327)
closes #1322
2016-06-03 14:28:47 +01:00
Cameron Sparr 821b30eb92 Add timeout param to exec readme (#1325) 2016-06-03 13:32:16 +01:00
Cameron Sparr a362352587 Use glob match for finding /proc/<pid>/stat files
closes #1323
2016-06-03 13:31:31 +01:00
Ross McDonald 94f952787f Add statically-linked amd64 builds to default build targets.
Remove version and iteration from root packaging folder. (#1318)

closes #1201
2016-06-02 16:14:18 +01:00
Pierre Fersing 3ff184c061 Removed leaked "database" tag on redis metrics (#1316) 2016-06-02 14:25:23 +01:00
Meng Ye 80368e3936 fix used_percent Calculation formula (#1313) 2016-06-02 14:24:48 +01:00
Cameron Sparr 2c448e22e1 New object: ErrChan for concurrent err handling 2016-06-02 13:29:37 +01:00
Ali Alrahaleh 1aabd38eb2 Add graylog input pluging change log (#1309) 2016-06-02 13:13:17 +01:00
Cameron Sparr 675457873a haproxy input: fix potential race condition 2016-06-02 11:22:07 +01:00
Cameron Sparr 8173338f8a fix build flags 2016-06-01 18:58:54 +01:00
Cameron Sparr c4841843a9 Create dummy zfs plugin file 2016-06-01 18:53:29 +01:00
Cameron Sparr f08a27be5d graylog input doc tweaks
closes #1261
2016-06-01 18:44:18 +01:00
Ali Alrahahleh a4b36d12dd add graylog plugin
add unit test for graylog
2016-06-01 18:21:09 +01:00
Cameron Sparr c842724b61 Fix graylog test race 2016-06-01 16:32:38 +01:00
Cameron Sparr fb5f40319e update gitattributes for easier fork mngmnt 2016-06-01 16:18:17 +01:00
Cameron Sparr 52b9fc837c Adding active & inactive memory to mem plugin
closes #1213
2016-06-01 16:04:20 +01:00
Cameron Sparr 6f991ec78a Sleep longer in tail test 2016-06-01 15:49:32 +01:00
Łukasz Harasimowicz 7921d87a45 Added Consul health checks state monitoring. (#1294) 2016-06-01 11:02:28 +01:00
Rickard von Essen 9f7a758bf9 RFR: Initial support for ZFS on FreeBSD (#1224)
* WIP: Initial support for ZFS on FreeBSD

* Added build directives

* Ignore 'kstatPath' config option on FreeBSD

* Added tests for ZFS FreeBSD input plugin.

* Updated the README to confrom with the guidelines and added FreeBSD info

* Fixed indents

* Spell check
2016-05-31 17:49:56 +01:00
Cameron Sparr 0aff7a0bc1 Disk plugin: return immediately if usage fails
closes #1297
2016-05-31 17:17:06 +01:00
Cameron Sparr c4cfdb8a25 Revert "Revert graylog output"
This reverts commit 4f27315720.
2016-05-31 16:45:14 +01:00
Cameron Sparr 342cfc4087 ReAdd gelf serializer & graylog output filter. (#1299)
This reverts commit 958ef2f872.
2016-05-31 16:41:27 +01:00
Cameron Sparr bd1282eddf Don't print config with trailing whitespace 2016-05-31 16:25:02 +01:00
Cameron Sparr 892abec025 Refactor collection_jitter and flush_jitter
use a common function between collection_jitter and flush_jitter. which
creates the same behavior between the two options.

going forward, both jitters will be random sleeps that get re-evaluated
at runtime for every interval (previously only collection_jitter did
this)

also fixes behavior so that both jitters will exit in the event of a
process exit.

closes #1296
2016-05-31 14:24:32 +01:00
Martin Seener e809c4e445 Also added reasonable default for influxdb input plugin
to simplify configuration for most users

closes #1295
2016-05-31 13:41:02 +01:00
Cameron Sparr 9ff536d94d Limit GetMetricStatistics to 10 per second
closes #1197
2016-05-31 11:26:52 +01:00
Cameron Sparr 4f27315720 Revert graylog output 2016-05-31 11:23:01 +01:00
Cameron Sparr 958ef2f872 Revert "Add gelf serializer & graylog output filter." (#1299) 2016-05-31 11:21:20 +01:00
Cameron Sparr 069764f05e Update README & etc/telegraf.conf 2016-05-31 11:02:10 +01:00
vanillahsu eeeab5192b Add gelf serializer & graylog output filter. (#1167)
* add gelf serializer.

* change url.

* handle fields in correct format.

* add graylog.

* handle host field of graylog.

* 1: Add go-gelf entry to Godeps to fix ci.
2: switch to github.com/Graylog2/go-gelf.

* implement Close().

* Deprecated gelf serializer, and back to graylog-golang.

* Update graylog-golang's hash.

* move gelf related function to graylog.go.

* 1: remove uneeded deps on Godeps_windows.
2: add README.md
3: add unittest.

* Fix unittest on 'go test -race'
2016-05-31 10:58:35 +01:00
robinpercy-xm a7dfbce3d3 Addressing PR feedback
- Updated README/CHANGELOG
- Added links to further info to input README
- Reduced lines to 80 chars

Removing input declaration from SampleConfig

Moved PR to unreleased section of changelog

closes #1165
2016-05-31 10:47:26 +01:00
Jan Shim ed2d1d9bb7 Add kernel_vmstat input plugins 2016-05-31 10:46:34 +01:00
Robin Percy 0fb2d2ffae Adding a conntrack input plugin
- Collects conntrack stats from the configured directories and files.

Applying PR feedback:

- Rebased onto master
- Updated README/CHANGELOG
- Limited lines to 80 chars
- Improved plugin docs and README
- added a dummy notlinux build file

Fixed up CHANGELOG and README after rebase

closes #1164
2016-05-31 10:42:19 +01:00
Ranjib Dey 3af65e7abb Fix typo in output plugin example (#1290) 2016-05-27 17:44:41 +01:00
Martin 984b6cb0fb Made the apache input’s urls parameter optional by using a reasonable default for most users (#1288) 2016-05-27 16:12:36 +01:00
Björn Lichtblau ca504a19ec Use optimeDate to get MongoTimestamp (mongo input plugin). (#1281) 2016-05-27 11:57:17 +01:00
Lukasz Jagiello c2797c85d1 Updated documentation. (#1284) 2016-05-26 19:31:51 +01:00
Pierre Fersing d5add07c0b processes: Don't return error if process exited (#1283) 2016-05-26 17:58:20 +01:00
Kostas Botsas 0ebf1c1ad7 write_consistency documentation (#1282)
Added write_consistency to InfluxDB output documentation
2016-05-26 17:23:01 +01:00
Martin Seener 42d7fc5e16 Use the DefaultURL parameter if no url is explicitly set by the user
closes #1278
closes #1277
2016-05-26 12:14:43 +01:00
Jari Sukanen 6828fc48e1 exec plugin: allow using glob pattern in command list
Allow using glob pattern in the command list in configuration. This enables for
example placing all commands in a single directory and using /path/to/dir/*.sh
as one of the commands to run all shell scripts in that directory.

Glob patterns are applied on every run of the commands, so matching commands can
be added without restarting telegraf.

closes #1142
2016-05-26 11:38:15 +01:00
Pierre Fersing 98d91b1c89 Fix reloading Telegraf under systemd (#1279) 2016-05-26 11:32:05 +01:00
Cameron Sparr 9bbdb2d562 Allow wildcard filtering of varnish stats
closes #1275
2016-05-26 10:42:34 +01:00
Rene Zbinden a8334c3261 add option to disable dns lookup for chronyc
closes #1265
2016-05-25 18:58:56 +01:00
Cameron Sparr 9144f9630b graphite parser: support multiple tag keys
closes #1272
2016-05-25 17:11:28 +01:00
Cameron Sparr 3e4a19539a http_response plugin: Add SSL config options
closes #1264
2016-05-25 13:44:36 +01:00
Cameron Sparr 5fe7e6e40e influxdb input: Use non-panicking type assertion
closes #1268
2016-05-25 13:32:10 +01:00
Cameron Sparr 58f2ba1247 kernel: use strconv.ParseInt instead of strconv.Atoi
closes #1258
2016-05-25 12:31:10 +01:00
John Engelman 5f3a91bffd Consolidate AWS credentials (#1208)
* Use shared AWS credential configuration.

*  Cloudwatch dimension wilcards 

* Allow configuring cache_ttl for cloudwatch metrics.

* Allow for wildcard in dimension values to select all available metrics.

* Use internal.Duration for CacheTTL and go fmt

* Refactor to not use embedded structs for config.

* Update AWS plugin READMEs with credentials details, update Changelog.

* Fix changelog after rebasing to master and 0.13.1 release.

* Fix changelog after rebase.
2016-05-25 12:30:39 +01:00
Cameron Sparr 6351aa5167 only count shard if it's non-empty
closes #1221
2016-05-25 12:05:14 +01:00
Nick 9966099d1a Replace ":" with "_" in tags. This should make the mysql plugin work with the opentsdb output (it uses a "server" tag like "127.0.0.1:3306") (#1256) 2016-05-25 11:37:48 +01:00
Cameron Sparr 1ef5599361 update changelog & etc/telegraf.conf 2016-05-24 15:34:56 +01:00
Cyril Duez c78b6cdb4e Add input plugin for rollbar service. (#1247)
* Report rollbar events.

Signed-off-by: Cyril Duez <cyril@stormz.me>
Signed-off-by: François de Metz <francois@stormz.me>

* Fix indent with go fmt.

* Add test for rollbar webhooks.

* Report more data from new_item event.

* Handle new deploy webhook.

Signed-off-by: Cyril Duez <cyril@stormz.me>
Signed-off-by: François de Metz <francois@stormz.me>

* Update default port.

* Add readme.

* Add rollbar_webhooks to the readme.

* Add rollbar_webhooks to plugins list.

* Add tag level for new_item event.

* Update readme.

* Update changelog.
2016-05-24 15:32:42 +01:00
Cameron Sparr d736c7235a prevent potential tail datarace (#1254) 2016-05-24 15:16:33 +01:00
Rene Zbinden 475252d873 fix telegraf service (#1252) 2016-05-24 15:14:58 +01:00
Cameron Sparr e103923430 Release 0.13.1 2016-05-24 12:04:48 +01:00
Cameron Sparr cb59517ceb Update etc/telegraf.conf 2016-05-24 11:16:21 +01:00
robinpercy-xm 1248934f3e Adding Varnish HTTP Cache input plugin (#1173)
* Adding Varnish HTTP Cache input plugin

* Applying PR feedback

- Linked to varnish in input README
- Updated README/CHANGELOG
- Cleaned up sampleConfig to remove formatting
- Shorted lines to 80 chars (except where test input requires long strings)
- Using internal.RunTimeout to wrap call to varnishtat
- Added dummy file for windows
2016-05-24 11:06:25 +01:00
Cameron Sparr 204ebf6bf6 influxdb output: write consistency parameter
closes #1249
2016-05-24 10:50:27 +01:00
Rene Zbinden 52d5b19219 add chrony support (#1238)
* add chrony support

* remove path definition

* add changelog
2016-05-24 09:55:25 +01:00
Cameron Sparr 8e92d3a4a0 Log to /var/log/telegraf/telegraf.log on systemd
closes #1243
2016-05-23 18:00:59 +01:00
Cameron Sparr c44ecf54a5 Utilize timeout in net_response plugin.
Also changing the net_response and http_response plugins to only accept
duration strings for their timeout parameters. This is a breaking config
file change.

closes #1214
2016-05-23 15:59:23 +01:00
Klaudiusz Staniek c6699c36d3 Add the OctetString OID value support (#1242)
This update adds support for strings values. Not sure why this was missed.
2016-05-23 11:21:53 +01:00
François de Metz d6ceae7005 Refactor GitHub webhooks (#1240)
* Fix a typo.

* Extract similar code to generateEvent function.

* Remove functions to use generateEvent in the switch.

* Refactor tests.
2016-05-23 11:21:34 +01:00
Rene Zbinden 4dcb82bf08 fix interval rounding error
closes #1190
2016-05-23 11:20:01 +01:00
Cameron Sparr 4f5d5926d9 Set a timeout for calls to input.Gather
Changing the internal behavior around running plugins. Each plugin
will now have it's own goroutine with it's own ticker. This means that a
hung plugin will not block any other plugins. When a plugin is hung, we
will log an error message every interval, letting users know which
plugin is hung.

Currently the input interface does not have any methods for killing a
running Gather call, so there is nothing we can do but log an "ERROR"
and move on. This will give some visibility into the plugin that is
acting up.

closes #1230
fixes #479
2016-05-21 21:39:01 +01:00
Cameron Sparr 3c5c3b98df update gopsutil to commit with timeout support
closes #1215
2016-05-21 21:00:51 +01:00
Cameron Sparr 56aee1ceee Update gopsutil dependency
closes #1233
2016-05-20 15:30:13 +01:00
Cameron Sparr f176c28a56 http_response: override req.Host header properly
closes #1198
2016-05-19 13:19:51 +01:00
Cameron Sparr 2e68bd1412 don't overwrite host tags in plugins
closes #1227
closes #1210
2016-05-19 13:19:28 +01:00
Cameron Sparr 35eb65460d github issue and pr templates 2016-05-19 12:11:19 +01:00
Jared Biel ab54064689 Procstat input plugin - functionality for overriding of process_name (#1192)
Being able to override the process_name in the procstat module
is useful for daemonized perl, ruby, erlang etc. processes. This
allows for manually setting process_name rather than it being set to
the interpreter/VM of the process.
2016-05-19 11:34:25 +01:00
Cameron Sparr debf7bf149 ntpq input: ignore lines that are '-'
closes #1223
2016-05-18 22:20:47 +01:00
Kane Dou 1dbe3b8231 fix mongodb input concurrent map read/write
closes #1211
2016-05-18 21:23:39 +01:00
Cameron Sparr b065573e23 influxdb input: Add shard counter
closes #1221
2016-05-18 19:31:36 +01:00
Cameron Sparr e94e50181c update changelog, readme, telegraf.conf 2016-05-18 16:07:17 +01:00
robinpercy-xm 69dfe63809 Implemented ceph collector (#1172)
- records metrics from the output of mon and osd socket perf
  dumps.
2016-05-18 15:48:44 +01:00
Jason Roelofs f32916a5bd Output stats to the Instrumental TCP Collector
closes #1139
2016-05-18 15:03:28 +01:00
Cameron Sparr be7ca56872 Update README w/ tail plugin 2016-05-18 15:00:30 +01:00
Anthony Brodard 33cacc71b8 Add role tag to redis plugins (#1207)
fixes #1203

- Format code
2016-05-18 14:17:14 +01:00
Cameron Sparr c292e3931a Remove ntpq state prefixes and make their own tag
closes #1161
2016-05-18 14:16:01 +01:00
François de Metz a87d6f0545 Fix typo. (#1220) 2016-05-18 14:14:50 +01:00
Cameron Sparr 3a01b6d5b7 Update elasticsearch readme
closes #1145
2016-05-18 12:22:34 +01:00
Zdenek Styblik 39df2635bd Fix crash in Docker input plugin - Fixes #1195
Commit fixes crash in Docker input plugin caused by the fact that return value
might be nil when error occurs.

closes #1195
2016-05-18 11:27:06 +01:00
Jack Tench 08ecfb8a67 Replace sudo with su in init script
To avoid issues starting service when 'Defaults requiretty' is enabled in the sudoers file.

Fixes #1204
closes #1205
2016-05-17 18:31:49 +01:00
Baptiste Mille-Mathias a59bf7246a Don't use root user as example
Using root as user is a bad habit.

closes #1177
2016-05-17 18:30:15 +01:00
Cameron Sparr 281296cd3f changelog update 2016-05-17 17:05:27 +01:00
Jonathan A. Sternberg 61d190b1ae Add docker pull badge to the README 2016-05-17 17:02:42 +01:00
Cameron Sparr dc89f029ad nstat plugin cleanups and formatting
closes #1104
closes #1138
2016-05-17 17:00:46 +01:00
Maksadbek 7557056a31 updated readme for nstat 2016-05-17 16:51:42 +01:00
Maksadbek 20c45a150c nstat plugin: reading files paths from env 2016-05-17 16:51:42 +01:00
Maksadbek 46bf0ef271 nstat input plugin 2016-05-17 16:51:42 +01:00
Brano Zarnovican a7b632eb5e fix 0.13 download urls 2016-05-13 12:57:22 +02:00
Cameron Sparr 90a98c76a0 Finalize 0.13 release 2016-05-11 13:41:32 -07:00
Cameron Sparr 12357ee8c5 processes: add 'unknown' procs (?) 2016-05-11 11:52:29 -07:00
Cameron Sparr bb254fc2b9 Default docker timeout in case one is not defined in config 2016-05-10 14:18:55 -07:00
Cameron Sparr aeadc2c43a Update etc/telegraf.conf, mqtt_cons readme 2016-05-10 14:18:55 -07:00
Cameron Sparr ed492fe950 update influxdb & gopsutil deps 2016-05-10 14:18:55 -07:00
Cameron Sparr 775daba8f5 Change Version->version for consistency w/ influxdb 2016-05-10 14:18:55 -07:00
Cameron Sparr 677dd7ad53 Release 0.13 2016-05-10 14:18:55 -07:00
Cameron Sparr 85dee02a3b snmp plugin: change host -> snmp_host
closes #1156
2016-05-10 14:18:00 -07:00
Cameron Sparr afdebbc3a2 Make OidInstanceMapping a field of the snmp host
fixes #1171
2016-05-10 10:15:01 -07:00
Jörg Thalheim 5deb22a539 docker: add container_id also to per cpu stats
currently this field exists only for total cpu usage

closes #1168
2016-05-09 16:43:27 -07:00
Ross McDonald 36b9e2e077 Merge pull request #1157 from influxdata/ross-build-updates
Minor fixes to build script
2016-05-06 11:28:48 -05:00
Ross McDonald 5348937c3d Choose correct configuration when building for windows. 2016-05-06 10:46:29 -05:00
Ross McDonald 72fcacbbc7 Minor fixes to build script:
- Fix for --name build parameter
- Remove rc parameter from build script
- Fix regression on first-level tarball directory structure
- Convert any dashes/underscores in version tag to tilde
2016-05-05 14:02:34 -05:00
Lukasz Jagiello 4c28f15b35 Fix #1148 - chatty MySQL
Two additional config options to reduce MySQL metrics

With:
 - gather_table_lock_waits = false
 - gather_event_waits = false

```
| wc -l
34
```

With:
 - gather_table_lock_waits = true
 - gather_event_waits = true

```
| wc -l
50040
```

closes #1148
closes #1149
2016-05-04 10:23:54 -06:00
Marko Crnic 095ef04c04 Fix formatting for haproxy tests
closes #1146
2016-05-04 09:47:39 -06:00
Marko Crnic 7d49979658 Update haproxy input plugin sample configuration 2016-05-04 09:46:44 -06:00
Marko Crnic 7a36695a21 Add tests for haproxy stats socket 2016-05-04 09:46:44 -06:00
Marko Crnic 5865587bd0 Add stats socket support to haproxy plugin 2016-05-04 09:46:44 -06:00
Jörg Thalheim 219bf93566 docker: add container_id to blkio metrics
all container metrics except blkio have this field

closes #1150
2016-05-04 09:28:13 -06:00
Ross McDonald 8371546a66 Disable circle uploads to S3 until more testing can be done for external PR's. 2016-05-03 11:26:52 -05:00
John Engelman 0b9b7bddd7 Specify host mount prefix with envvar.
closes #1120
2016-05-02 15:53:30 -06:00
Rene Zbinden 4c8449f4bc fix sysstat timeout error
closes #1134
2016-05-02 15:17:11 -06:00
Ross McDonald 36d7b5c9ab Improvements to build.py:
- Now uses Python argparse for cleaner handling of arguments
- Added function documentation
- Removed a few unneeded functions
- Updated nightly logic to incremement minor version
- Added support for building from specific branch or commit
- Changed --no-stash option to --no-uncommitted for clarity
- Added a --release flag, default package output will now contain the branch and commit hash in the version number
- Static builds are now listed as an architecture
- Changed default upload bucket to dl.influxdata.com/telegraf
- Don't include iteration in package name

closes #1040
2016-05-02 14:37:29 -06:00
Cameron Sparr f2b0ea6722 value parser: doc & string handling 2016-05-02 12:17:20 -06:00
Cameron Sparr 46f4be88a6 Revert "exec plugin: allow using glob pattern in command list"
This reverts commit 6381efa7ce.
2016-05-02 12:07:17 -06:00
Jari Sukanen 6381efa7ce exec plugin: allow using glob pattern in command list
Allow using glob pattern in the command list in configuration. This enables for
example placing all commands in a single directory and using /path/to/dir/*.sh
as one of the commands to run all shell scripts in that directory.

Glob patterns are applied on every run of the commands, so matching commands can
be added without restarting telegraf.

closes #1127
2016-05-02 11:36:15 -06:00
Pierre Fersing 85ee66efb9 "DELAYED" Inserts were deprecated in MySQL 5.6.6
closes #1136
2016-05-02 11:23:28 -06:00
Victor Garcia 40dccf5b29 Metric for MongoDB jumbo chunks
closes #1128
2016-05-01 14:27:27 -06:00
Cameron Sparr c114849a31 Use a timeout for docker list & stat cmds
closes #1133
2016-05-01 10:26:46 -06:00
Cameron Sparr 4e9798d0e6 agent and tags configs sometimes not applied
closes #1090
2016-04-29 19:44:01 -06:00
Cameron Sparr a30b1a394f Kafka output: set max_retry=3 & required_acks=-1 as defaults
closes #1113
2016-04-29 18:51:45 -06:00
Cameron Sparr 91460436cf Changelog update 2016-04-29 12:32:04 -06:00
Cameron Sparr 3f807a9432 Implement timeouts for all exec command runners
First is to write an internal CombinedOutput and Run function with a
timeout.

Second, the following instances of command runners need to have timeouts:

    plugins/inputs/ping/ping.go
    125:	out, err := c.CombinedOutput()

    plugins/inputs/exec/exec.go
    91:	if err := cmd.Run(); err != nil {

    plugins/inputs/ipmi_sensor/command.go
    31:	err := cmd.Run()

    plugins/inputs/sysstat/sysstat.go
    194:	out, err := cmd.CombinedOutput()

    plugins/inputs/leofs/leofs.go
    185:	defer cmd.Wait()

    plugins/inputs/sysstat/sysstat.go
    282:	if err := cmd.Wait(); err != nil {

closes #1067
2016-04-29 12:06:22 -06:00
Cameron Sparr cbe32c7482 Support default config paths
precedence will be:

 1. --config command-line option
 2. $TELEGRAF_CONFIG_PATH
 3. $HOME/.telegraf/telegraf.conf
 4. /etc/telegraf/telegraf.conf
2016-04-28 17:48:24 -06:00
Cameron Sparr 5d3c582ecf changelog update 2016-04-28 17:34:37 -06:00
Cameron Sparr 3ed006d216 Sanitize invalid opentsdb characters
closes #1098
2016-04-28 17:01:50 -06:00
Cameron Sparr 3e1026286b skip network-dependent unit tests in short mode 2016-04-28 14:44:08 -06:00
Cameron Sparr b59266249d README fixups for udp_listener, statsd inputs
closes #1119
2016-04-28 13:11:41 -06:00
G-regL 015261a524 Sanitize Field name
Replace '/[sS]ec' for '_persec' and spaces with underscores.

closes #1118
2016-04-28 12:21:28 -06:00
Adithya B Cherunilam 024e1088eb Ensure sure that the post install script is compatible with RHEL 5
closes #1091
closes #1094
2016-04-28 11:58:06 -06:00
Cameron Sparr 08f4b1ae8a Update build to go 1.6.2 2016-04-28 11:41:16 -06:00
Bob Zoller 1390c22004 sanitize * to - in graphite serializer
closes #1110
2016-04-27 18:05:44 -06:00
Cameron Sparr 8742ead585 Change server_ -> jolokia_ in tags and other formatting 2016-04-27 16:00:58 -06:00
Cameron Sparr 59a297abe6 etc/telegraf.conf update 2016-04-27 15:46:21 -06:00
Simone Aiello 18636ea628 jolokia: use always POST
code refactor to use same prepareRequest method
for both 'agent' and 'proxy' mode

closes #1031
closes #1050
closes #473
2016-04-27 15:45:37 -06:00
Simone Aiello cf5980ace2 jolokia: add proxy mode 2016-04-27 15:39:55 -06:00
Jesse Hanley a7b0861436 Adding Jobstats support to Lustre2 input plugin
Lustre Jobstats allows for RPCs to be tagged with a value, such
as a job's ID.  This allows for per job statistics. This plugin
collects statistics and tags the data with the jobid.

closes #1107
2016-04-27 15:35:24 -06:00
Cameron Sparr 89f2c0b0a4 Cassandra: update plugin supported prefix & fix panic
fixes #1102
2016-04-27 15:23:05 -06:00
Cameron Sparr ee4f4d7800 ping plugin: Set default timeout 2016-04-27 15:08:38 -06:00
Cameron Sparr 4de75ce621 Performance refactor of running_output buffers
closes #914
closes #967
2016-04-27 13:40:05 -06:00
John Engelman 1c4043ab39 Closes #1085 - allow for specifying AWS credentials in config.
closes #1085
closes #1086
2016-04-26 17:24:05 -06:00
Cameron Sparr 44c945b9f5 Tail unit tests and README tweaks 2016-04-26 10:43:41 -06:00
Cameron Sparr c7719ac365 buffers: fix bug when Write called before AddMetric 2016-04-26 10:25:04 -06:00
Cameron Sparr b9c24189e4 Tail input plugin 2016-04-26 09:42:06 -06:00
Cameron Sparr 411d8d7439 Fix leaky tcp connections in phpfpm plugin
closes #1089
2016-04-26 09:24:32 -06:00
Cameron Sparr 671b40df2a procstat: field prefix fixup 2016-04-25 20:10:34 -06:00
Cameron Sparr 249a860c6f procstat: fix newlines in tags 2016-04-25 19:57:38 -06:00
Mika Eloranta 0367a39e1f postgresql_extensible: custom address in metrics output
Allow overriding the the metrics "server" tag with the specified
value. Can be used to give a more user-friendly value for the server
name.

closes #1093
2016-04-25 16:33:35 -06:00
Mika Eloranta 1a7340bb02 postgresql_extensible: fix nil field values
nil field values would break the output influxdb line procotol.
Skip them from the output.
2016-04-25 16:33:33 -06:00
Mika Eloranta ce7d852d22 postgresql_extensible: configurable measurement name
The output measurement name can be configured per query.
2016-04-25 16:33:33 -06:00
Hannu Valtonen 01b01c5969 postgresql_extensible: Censor also other security related conn params
While these aren't quite as sensitive as passwords, they do tend to be
long filesystem paths that shouldn't be reported along with
every measurement.
2016-04-25 16:33:33 -06:00
Pierre Fersing c159460b2c Refactor running_output buffering
closes #1087
2016-04-25 16:32:41 -06:00
Cameron Sparr 07728d7425 Refactor globpath pkg to return a map
this is so that we don't call os.Stat twice for every file matched
by Match(). Also changing the behavior to _not_ return the name of a
file that doesn't exist if it's not a glob.
2016-04-24 14:37:44 -06:00
Cameron Sparr d3a25e4dc1 globpath refactor into pkg separate from filestat 2016-04-23 11:56:33 -06:00
zensqlmonitor 1751c35f69 SQL Server input. Fix datatype conversion. 2016-04-23 09:18:08 +02:00
zensqlmonitor 93f5b8cc4a Fix datatype conversion 2016-04-23 09:14:04 +02:00
Cameron Sparr 5b1e59a48c filestat plugin config fixup 2016-04-22 19:15:07 -06:00
Cameron Sparr 7b27cad1ba Dont specify AWS credential chain, use default
closes #1078
2016-04-22 11:43:20 -06:00
Cameron Sparr 1b083d63ab add gitattributes file 2016-04-22 11:42:22 -06:00
Cameron Sparr 23f2b47531 Ignore errors in systemd
closes #1022
2016-04-22 11:23:24 -06:00
Victor Garcia 194288c00e Adding replication lag metric
closes #1066
2016-04-22 11:07:32 -06:00
Cameron Sparr f9c8ed0dc3 Add filestat plugin to README 2016-04-21 19:47:23 -06:00
Cameron Sparr 88def9b71b filestat input plugin
closes #929
2016-04-21 16:53:02 -06:00
Martin Gehrke f818f44693 Added Network Interface Object block to Generic Queries examples in win_perf_counters/README.md
Network metrics are pretty important and the block adds a couple with a link to the names for more. This adds a block with a few counters to the Generic Queries examples in plugins/inputs/win_perf_counters/README.md
2016-04-21 09:26:46 -04:00
Cameron Sparr 8a395fdb4a changelog update feature 1041 2016-04-20 18:36:14 -06:00
Cameron Sparr c0588926b8 Add n_cpu field to system plugin
closes #1041
2016-04-20 18:22:04 -06:00
Cameron Sparr f1b7ecb2a2 procstat: Add user, pidfile, pattern & exe tags
closes #1035
2016-04-20 13:18:07 -06:00
Cameron Sparr 4bcf157d88 Don't replace _ with . in datadog names
closes #1024
2016-04-20 09:06:13 -06:00
Cameron Sparr 2f7da03cce Do not log every tcp connect/disconnect
leaving as comments for whenever I rig up global debug logging.

closes #1062
2016-04-19 22:58:24 -06:00
Cameron Sparr f1c995dcb8 Update etc/telegraf.conf 2016-04-19 18:01:41 -06:00
Cameron Sparr 9aec58c6b8 Don't allow inputs to overwrite host tag
closes #1054

This affects tags in the following plugins:

- cassandra
- disque
- rethinkdb
2016-04-19 17:44:33 -06:00
Victor Garcia 46aaaa9b70 Adding TTL metrics data
closes #1060
2016-04-19 17:02:25 -06:00
Larry Kim 46543d6323 Possible bug fix for oid_key collision
closes #1044
2016-04-19 17:00:04 -06:00
Cameron Sparr a585119a67 Change prometheus doc to glob match 2016-04-19 14:46:37 -06:00
Cameron Sparr 8cc72368ca influxdb output: close connections & dont always overwrite
closes #1058
closes #1059

also see https://github.com/influxdata/influxdb/pull/6425
2016-04-19 13:40:08 -06:00
Cameron Sparr 92e57ee06c Set default tags in test accumulator
closes #1012
2016-04-18 19:24:17 -06:00
Eugene Chupriyanov c737a19d9f Just close Riemann client on send metrics failure
Signed-off-by: Eugene Chupriyanov <e.chupriyanov@cpm.ru>

closes #1013
2016-04-18 17:25:36 -06:00
Eugene Chupriyanov 708a97d773 Try to reconnect to Riemann if metrics upload failed.
Signed-off-by: Eugene Chupriyanov <tchu@tchu.ru>

Error checks added

Don't Close() nil client

Signed-off-by: Eugene Chupriyanov <e.chupriyanov@cpm.ru>
2016-04-18 17:25:19 -06:00
Maksadbek b95a90dbd6 updated README for mysql input plugin
closes #889
closes #403
2016-04-18 17:21:25 -06:00
Maksadbek a2d1ee08d4 transposed the matrix of tags/fields for Lock Waits stats gathering 2016-04-18 17:11:26 -06:00
Maksadbek 7e64dc380f preventing tags from mutation by creating new tag for each metric 2016-04-18 17:11:26 -06:00
Maksadbek 046cb6a564 changed types to decrease needless uint64 to float64 casts 2016-04-18 17:11:26 -06:00
Maksadbek 644ce9edab fixed code regarding needless type casting; single creation of map 2016-04-18 17:11:26 -06:00
Maksadbek 059b601b13 mysql plugin conf field names are lowercase-underscored 2016-04-18 17:11:26 -06:00
Maksadbek d59999f510 improvements on queries and additional comments 2016-04-18 17:11:26 -06:00
Maksadbek c5d31e7527 statics that lack on MySQL 5.5 is turned off by default 2016-04-18 17:11:26 -06:00
Maksadbek c121e38da6 mysql plugin, check for existence of table before scanning 2016-04-18 17:11:26 -06:00
Maksadbek b16bc3d2e3 remove duplicate function; Mysql plugin GatherTableSchema is configurable 2016-04-18 17:11:26 -06:00
maksadbek c732abbda2 Improved mysql plugin
shows global variables
	shows slave statuses
	shows size and count of binary log files
	shows information_schema.processlist stats
	shows perf table stats
	shows auto increments stats from information schema
	shows perf index stats
	shows table lock waits summary by table
	shows time and operations of event waits
	shows file event statuses
	shows events statements stats from perf_schema
	shows schema statistics
	refactored plugin, provided multiple fields per insert
2016-04-18 17:11:26 -06:00
Cameron Sparr 61d681a7c8 docker changelog update 2016-04-18 16:24:32 -06:00
Cameron Sparr 7828bc09cf Fixup docker blkio container name & docker doc 2016-04-18 16:20:46 -06:00
Cameron Sparr 36d330fea0 docker plugin schema refactor
- renaming cont_name and cont_image to container_name and
container_image.
- cont_id is now a field, called container_id
- docker_cpu, docker_mem, docker_net measurements have been renamed to
  docker_container_cpu, docker_container_mem, and docker_container_net

closes #1014
closes #1052
2016-04-18 15:16:59 -06:00
Cameron Sparr 4d46589d39 JSON input: make string ignores clear 2016-04-18 13:20:06 -06:00
chaton78 93f57edd3a Better logging for MQTT consumer
closes #1023
closes #921
2016-04-18 11:27:50 -06:00
chaton78 8ec8ae0587 Added onConnection and connectionLost Handlers 2016-04-18 11:25:03 -06:00
Pascal Larin ce94e636bb Resubscribe if not using persistent sessions 2016-04-18 11:25:03 -06:00
Pascal Larin 21c7378b61 Handle onConnect 2016-04-18 11:25:03 -06:00
Thibault Cohen 75a9845d20 SNMP Fix #995
closes #995
2016-04-18 11:19:16 -06:00
Shahzheeb Khan d638f6e411 mongodb readme and examples
mongodb readme and examples

closes #1039
2016-04-16 15:53:04 -06:00
Cameron Sparr 81d0a64d46 Adds support for removing/keeping tags from metrics
closes #706
2016-04-16 15:13:38 -06:00
Cameron Sparr f76739cb1b Release 0.12.1 2016-04-14 16:16:26 -06:00
Ross McDonald 7f992fd321 Changed nohup fallback command to use 'sudo -u' so that Telegraf doesn't run as the root user. 2016-04-14 13:56:20 -06:00
Cameron Sparr e428d11add Update etc/telegraf.conf, README 2016-04-12 14:50:56 -06:00
Subhachandra Chandra 0ed5b75a14 Fixed CHANGELOG with the correct pull request id.
closes #681
closes #1009
2016-04-12 10:57:34 -06:00
subhachandrachandra b1b4adec74 Added cassandra plugin to access metrics using jolokia and push them to influxdb. 2016-04-12 10:55:59 -06:00
Cameron Sparr 1934cc2e62 Add memstats to the influxdb input plugin
closes #958
2016-04-12 10:13:11 -06:00
Lukasz Jagiello ae8cf8c35e Fix plugin name in README 2016-04-11 19:43:30 -06:00
Cameron Sparr f5878eafb9 Create a template system for the graphite serializer
closes #925
closes #879
2016-04-11 16:30:18 -06:00
Cameron Sparr 27fe4f7062 Update changelog, etc/telegraf.conf
closes #998
2016-04-08 12:00:41 -06:00
Michele Fadda 7ad8b26297 dovecot: enabled global, user and ip queries 2016-04-08 11:56:08 -06:00
Cameron Sparr 1a383b7d90 Telegraf no longer depends on lsof
so remove it as a dependency from the linux packages.

closes #974
2016-04-08 11:27:33 -06:00
Shahzheeb Khan 445946792e Adding few metrics example in jolokia plugin
Adding few metrics example in jolokia plugin

closes #993
2016-04-08 11:20:47 -06:00
Shahzheeb Khan de82c7d5ac Adding few metrics example
Adding more metrics in example to make it easier to better understand the plugin
2016-04-08 11:20:42 -06:00
Cameron Sparr 07f0d561dc Eliminate byte buffer, copy scanner.Bytes directly 2016-04-08 09:50:03 -06:00
Cameron Sparr be379f3dac Refactor UDP & TCP input buffers
closes #991
2016-04-08 09:50:03 -06:00
Cameron Sparr 1bf904fe60 Godeps: update paho mqtt client dep
this might fix #921

see https://github.com/eclipse/paho.mqtt.golang/issues/32
2016-04-07 17:32:28 -06:00
Cameron Sparr c6faf005cb Add sysstat dummy file for non-linux builds 2016-04-07 12:08:26 -06:00
Rene Zbinden b534b58542 fix tests
closes #939
2016-04-07 11:54:41 -06:00
Rene Zbinden 920711533e move pathe lookup for sadf to init() 2016-04-07 10:45:20 -06:00
Rene Zbinden 194110433e change sadf options so that it also works on older linux distributions 2016-04-07 10:45:20 -06:00
Rene Zbinden 7926396d2a cleanup code, set dfltActivities in init() function, this leads to an if less in collect() method 2016-04-07 10:45:20 -06:00
Rene Zbinden 797522e8ca change group=true by default 2016-04-07 10:45:20 -06:00
Rene Zbinden 64b5d1a269 add documentation about sadc path on different linux distributions 2016-04-07 10:45:20 -06:00
Rene Zbinden d00d3802c9 fix build tags 2016-04-07 10:45:20 -06:00
Rene Zbinden 46fff13341 disable TestInterval with -race test option 2016-04-07 10:45:20 -06:00
Rene Zbinden be3374a3ef remove interval configuration 2016-04-07 10:45:20 -06:00
Rene Zbinden 264ac0b017 fix race condition 2016-04-07 10:45:20 -06:00
Rene Zbinden 17033b3c6c change readme 2016-04-07 10:45:20 -06:00
Rene Zbinden c4ea122d66 add sysstat plugin 2016-04-07 10:45:20 -06:00
Cameron Sparr 90185dc6b3 cleanup & comment http_response def config
closes #332
2016-04-07 10:37:52 -06:00
Luke Swithenbank 377b030d88 update to 5 second default and string map for headers 2016-04-07 10:28:39 -06:00
Luke Swithenbank 437bd87d7c added tests and did some refactoring 2016-04-07 10:28:39 -06:00
Luke Swithenbank 73a7916ce3 take a request body as a param 2016-04-07 10:28:39 -06:00
Luke Swithenbank f947fa86e3 update to allow for following redirects 2016-04-07 10:28:39 -06:00
Luke Swithenbank 7219efbdb7 add the ability to parse http headers 2016-04-07 10:28:39 -06:00
Luke Swithenbank b7435b9cd1 fmt 2016-04-07 10:28:39 -06:00
Luke Swithenbank 207ab5a0d1 update to make a working sample_config 2016-04-07 10:28:39 -06:00
Luke Swithenbank 70aa0ef85d add plugin to all 2016-04-07 10:28:39 -06:00
Luke Swithenbank dfbe231a51 add http_response plugin 2016-04-07 10:28:39 -06:00
Cameron Sparr cce35da366 Godeps_windows: update file 2016-04-07 10:00:10 -06:00
Cameron Sparr 1a612bcae9 Update README and etc/telegraf.conf 2016-04-06 13:49:50 -06:00
Josh Hardy d5b9e003fe Add CloudWatch input plugin
Rebased commit of previously reviewed branch.
Added cloudwatch client Mock and more rich unit tests.

closes #935
closes #936
2016-04-06 13:45:06 -06:00
Sergio Jimenez e19c474a92 input(docker): Cleanup
* Removed leftovers, unused code

closes #957
fixes #645
2016-04-06 12:01:36 -06:00
Sergio Jimenez 8274798499 fix(Godeps): Added github.com/opencontainers/runc 2016-04-06 11:55:30 -06:00
Sergio Jimenez 9f68a32934 fix(): Last link on README 2016-04-06 11:55:30 -06:00
Sergio Jimenez 5c688daff1 input(docker): Updated README
* Replaced links to fsouza/go-dockerclient by docker/engine-api
2016-04-06 11:55:30 -06:00
Sergio Jimenez 741fb1181f godeps(): Updated Godeps file for engine-api
* Added required deps for engine-api
* Removed fsouza/go-dockerclient
2016-04-06 11:55:30 -06:00
Sergio Jimenez fd1f05c8e0 input(docker): Fixed io sectors/io_time recursive
* On engine-api sectors_recursive and io_time_recursive have no Op
2016-04-06 11:55:30 -06:00
Sergio Jimenez 708cbf937f input(docker): Fixed tests to work with engine-api
* Modified tests to work with engine-api
2016-04-06 11:55:30 -06:00
Sergio Jimenez 32213cad01 input(docker): docker/engine-api
* Made required changes to get it to compile
* First manual tests looking good, still unit tests need fixing
* Made go linter happier
2016-04-06 11:55:30 -06:00
Ricard Clau 9320a6e115 windows service docs
closes #954
2016-04-06 11:50:36 -06:00
Cameron Sparr 0f16c0f4cf Reduce TCP listener allocations 2016-04-05 17:37:09 -06:00
Cameron Sparr 30464396d9 Make the UDP input buffer only once 2016-04-05 17:35:43 -06:00
Cameron Sparr 64066c4ea8 Update input data format readme 2016-04-05 17:27:04 -06:00
Cameron Sparr 7e97787d9d More readme fixups 2016-04-05 16:17:45 -06:00
Cameron Sparr 40f2dd8c6c Readme fixup for exec plugin 2016-04-05 15:22:58 -06:00
Cameron Sparr 4dd364e1c3 Update all readme instances of data formats 2016-04-05 14:42:20 -06:00
Cameron Sparr 03f2a35b31 Update jolokia plugin readme 2016-04-05 13:54:02 -06:00
Martti Rannanjärvi 73bd98df57 dovecot: remove extra newline from stats query
Extra newline in the stats query is interpreted as an empty query
which is an error for dovecot.

closes #972
2016-04-05 10:54:27 -06:00
Armin Wolfermann bcf1fc658d ipmi_sensors: Allow : in password
closes #969
2016-04-05 10:52:41 -06:00
Cameron Sparr 863cbe512d processes plugin: fix case where there are spaces in cmd name
fixes #968
2016-04-05 10:27:30 -06:00
Cameron Sparr d871e9aee7 Dummy kernel plugin added for consistent config generation 2016-04-04 17:43:53 -06:00
Cameron Sparr 70ef61ac6d Release 0.12 2016-04-04 16:34:41 -06:00
Cameron Sparr a4a140bfad etc/telegraf.conf update for procstat change 2016-04-04 16:30:24 -06:00
Florent Ramière d2d91e713a Add plugin links
closes #964
2016-04-04 16:28:36 -06:00
Cameron Sparr d9bb1ceaec Changelog update 2016-04-04 16:12:50 -06:00
Pierre Fersing 5fe8903fd2 Use timeout smaller than 10 seconds
closes #959
2016-04-04 16:10:23 -06:00
Cameron Sparr 8509101b83 drop cpu_time_* from procstat by default
closes #963
2016-04-04 16:10:09 -06:00
Cameron Sparr 357849c348 Godeps: update wvanbergen/kafka dependency
see https://github.com/wvanbergen/kafka/pull/87

fixes #805
2016-04-02 13:45:24 -06:00
Nikhil Bafna 0f1b4e06f5 Update README.md
Fix redis input plugin name in configuration example
2016-04-02 10:13:21 +05:30
Cameron Sparr 8e041420cd config: parse environment variables in the config file
closes #663
2016-04-01 16:06:19 -06:00
Rubycut 9211d22b2b Add writing in documentation.
closes #950
2016-04-01 11:46:32 -06:00
Cameron Sparr f5246eb167 Update changelog with config file PR 2016-04-01 11:45:09 -06:00
Cameron Sparr e436b2d720 Cleanup & standardize config file
changes:

- -sample-config will now comment out all but a few default plugins.
- config file parse errors will output path to bad conf file.
- cleanup 80-char line-length and some other style issues.
- default package conf file will now have all plugins, but commented
  out.

closes #199
closes #944
2016-04-01 10:59:53 -06:00
Florent Ramière 51f4e9c0d3 Update changelog
closes #945
2016-04-01 10:09:04 -06:00
Florent Ramière 8c3371c4ac Use numerical codes instead of symbolic ones 2016-04-01 10:08:55 -06:00
Florent Ramière 6ff0fc6d83 Add compression/acks/retry conf to Kafka output plugin
The following configuration is now possible

	## CompressionCodec represents the various compression codecs
recognized by Kafka in messages.
	##  "none" : No compression
	##  "gzip" : Gzip compression
	##  "snappy" : Snappy compression
	# compression_codec = "none"

	##  RequiredAcks is used in Produce Requests to tell the broker how
many replica acknowledgements it must see before responding
	##  "none" : the producer never waits for an acknowledgement from the
broker. This option provides the lowest latency but the weakest
durability guarantees (some data will be lost when a server fails).
	##  "leader" : the producer gets an acknowledgement after the leader
replica has received the data. This option provides better durability
as the client waits until the server acknowledges the request as
successful (only messages that were written to the now-dead leader but
not yet replicated will be lost).
	##  "leader_and_replicas" : the producer gets an acknowledgement after
all in-sync replicas have received the data. This option provides the
best durability, we guarantee that no messages will be lost as long as
at least one in sync replica remains.
	# required_acks = "leader_and_replicas"

	##  The total number of times to retry sending a message
	# max_retry = "3"
2016-04-01 10:08:55 -06:00
Cameron Sparr 9347a70425 Fix httpjson README
closes #947
2016-03-31 20:37:04 -06:00
Cameron Sparr 91957f0848 Update Godeps_windows file to HEAD 2016-03-30 14:43:05 -06:00
Cameron Sparr 62105bb353 Use github paho mqtt client instead of gerrit
this might fix #921
2016-03-30 11:54:01 -06:00
Rudenkovk Konstantin e03f684508 Fix parse fcgi URI path in php-fpm input module
closes #934
2016-03-30 10:34:48 -06:00
Ross McDonald 2f41ae24f8 Swap systemd command, as it was causing issues on Debian. 2016-03-30 10:17:31 -06:00
Cameron Sparr 4ad551be9a add '*' to metric prefixes for consistency 2016-03-29 17:00:51 -06:00
Cameron Sparr bd640ae2c5 changelog fixup 2016-03-29 12:19:07 -06:00
Cameron Sparr 2cfc882c62 changelog & readme update 2016-03-29 12:18:23 -06:00
Cameron Sparr 21ece2d76d Convert ipmi stats/tags to underscore and lowercase
closes #888
2016-03-29 11:39:57 -06:00
张光权 d055d7f496 Add the ipmi plugin 2016-03-29 11:39:57 -06:00
Cameron Sparr b1cfb1afe4 Deprecate statsd convert_names option, expose separator
closes #876
2016-03-28 12:13:15 -06:00
Cameron Sparr 2f215356d6 Update statsd graphite parser link to telegraf version 2016-03-28 11:57:51 -06:00
Adam Argo e07c79259b PR feedback changes
closes #927
2016-03-28 10:43:34 -06:00
Adam Argo 59085f072a adds ability to parse datadog-formatted tags in the statsd input 2016-03-28 10:43:26 -06:00
Cameron Sparr 474d6db42f Don't log every string metric that prometheus doesnt support 2016-03-23 16:01:06 -06:00
Thibault Cohen a95710ed0c SNMP plugin fixes
fixes #873
2016-03-22 22:58:02 -06:00
JP 51d7724255 add verifyValue func for datadog and librato, bail if no good
closes #906
2016-03-22 15:22:57 -06:00
Cameron Sparr 276e7629bd memcached unix socket: fix panic. Do not recreate conn inside if
closes #841
2016-03-22 15:12:35 -06:00
Cameron Sparr 69606a45e0 Fix prometheus label names, and dont panic if invalid
fixes #907
2016-03-22 12:29:55 -06:00
Chris Goller 7f65ffcb15 Add optional parameters to influxdb output README 2016-03-22 09:14:25 -06:00
Cameron Sparr 4f5f6761f3 Update gopsutil dependency
closes #656
2016-03-22 09:13:31 -06:00
Cameron Sparr f543dbb42f Allow users to tell telegraf Agent not to include host tag
closes #848
2016-03-21 15:51:10 -06:00
Cameron Sparr 5917a42997 influxdb output: quote the database name
closes #898
2016-03-21 14:37:33 -06:00
Cameron Sparr fbe1664214 README cleanup and update 2016-03-21 14:30:59 -06:00
david birdsong d09bb13cb6 special case 'value'
it usually connotes a single value type metric, appending just clutters

closes #793
2016-03-21 13:49:34 -06:00
david birdsong 31c323c097 fix prometheus output
if i understand the prometheus data model correctly, the current output
for this plugin is unusable

prometheus only accepts a single value per measurement. prior to this change, the range loop
causes a measurement to end up w/ a random value

for instance:

net,dc=sjc1,grp_dashboard=1,grp_home=1,grp_hwy_fetcher=1,grp_web_admin=1,host=sjc1-b4-8,hw=app,interface=docker0,state=live
bytes_recv=477596i,bytes_sent=152963303i,drop_in=0i,drop_out=0i,err_in=0i,err_out=0i,packets_recv=7231i,packets_sent=11460i
1457121990003778992

this 'net' measurent  would have all it's tags copied to prometheus
labels, but any of 152963303, or 0, or 7231 as a value for
'net' depending on which field is last in the map iteration

this change expands the fields into new measurements by appending
the field name to the influxdb measurement name.

ie, the above example results with 'net' dropped and new measurements
to take it's place:
	net_bytes_recv
	net_bytes_sent
	net_drop_in
	net_err_in
	net_packets_recv
	net_packets_sent

i hope this can be merged, i love telegraf's composability of tags and
filtering
2016-03-21 13:49:09 -06:00
Thibault Cohen 8f09aadfdf Add nagios parser for exec input plugin
closes #762
2016-03-21 13:34:47 -06:00
Chris H (CruftMaster) 20b4e8c779 GREEDY field templates for the graphite parser, and support for multiple specific field names
closes #789
2016-03-21 13:32:51 -06:00
Cameron Sparr 402a0108ae Merge pull request #896 from jipperinbham/graphite-tag-sanitizer
sanitize known issue characters from graphite tag name
2016-03-21 12:29:05 -06:00
Cameron Sparr 9de4a8efcf Update readme, changelog for couchbase plugin
closes #866
closes #482
2016-03-21 12:12:23 -06:00
Vebjorn Ljosa 077fa2e6b9 Improve README for couchabase input plugin
Proper terminology and case. Exmaples for tags. Example output.
2016-03-21 12:09:32 -06:00
Vebjorn Ljosa 2ae9316f48 Add examples in documentation for couchbase input plugin 2016-03-21 12:09:32 -06:00
Vebjorn Ljosa 9b5a90e3b9 Unit test couchbase input plugin 2016-03-21 12:09:32 -06:00
Vebjorn Ljosa 483942dc41 Comment on `default` pool name 2016-03-21 12:09:32 -06:00
Vebjorn Ljosa 2ddda6457f Convert measurement names to snake_case 2016-03-21 12:09:32 -06:00
Vebjorn Ljosa 681e695170 Don't copy lock when `range`ing over map
Make `go vet` happy.
2016-03-21 12:09:32 -06:00
Vebjorn Ljosa a043664dc4 Couchbase input plugin 2016-03-21 12:09:32 -06:00
JP e940f99646 sanitize known issue characters from graphite tag name 2016-03-21 10:01:51 -05:00
Cameron Sparr 22073042a9 Merge pull request #891 from jipperinbham/librato-serialize-fix
replace @ character with - for librato
2016-03-18 17:00:00 -06:00
Cameron Sparr 2634cc408a Update README 2016-03-18 11:26:05 -06:00
Thomas Menard 36446bcbc2 Remove the columns used as tag
closes #844
2016-03-18 11:25:04 -06:00
Thomas Menard b371ec5cf6 Add the postgresql_extensible plugin
This plugin is intended to add an extended support of Postgresql
compared to the legacy postgres plugin.

Basically, the plugin don’t have any metrics defined and it’s up to the
user to define it in the telegraph.conf (as a toml structure).

Each query can have it’s specific tags, and can be written specifically
using a where clause in order to eventually filter per database name.

To be more generic, a minimum postgresql version  has been defined per
query in case you have 2 different version of Postgresql running on the
same host.
2016-03-18 11:23:02 -06:00
HUANG Wei 18f4afb388 Inherit previous instance's stats in statsd plugin.
This way, after a reload, the stats wont restart again at least for the
counter type.

closes #887
2016-03-18 11:20:35 -06:00
Cameron Sparr 77dcbe95c0 Do not write metrics if there are 0 to write
closes #884
2016-03-18 10:54:51 -06:00
Cameron Sparr 061b749041 TLS config: if only given ssl_ca, create tls config anyways
fixes #890
2016-03-18 10:53:55 -06:00
JP 5b0c3951f6 replace @ character with - for librato 2016-03-18 11:25:51 -05:00
Cameron Sparr f2394b5a8d Merge pull request #886 from entertainyou/typo
Fix typo, should be input instead of output.
2016-03-17 21:36:26 -06:00
Cameron Sparr fe7b884cc9 Update changelog 2016-03-17 20:40:22 -06:00
Cameron Sparr 5c1b635229 Value parser, for parsing a single value into a metric
closes #849
2016-03-17 20:08:21 -06:00
HUANG Wei 63410491b7 Fix typo, should be input instead of output. 2016-03-18 10:06:44 +08:00
Cameron Sparr 26e0a4bbde Merge pull request #882 from VasuBalakrishnan/master
Fixed SQL Server Plugin issues #881
2016-03-17 19:41:42 -06:00
Balakrishnan c356e56522 Updated Change log #881 2016-03-17 19:56:39 -04:00
Cameron Sparr fd26bbbd0b Merge pull request #883 from ljagiello/minor-changelog-fix
Duplicated line
2016-03-17 17:09:08 -06:00
Lukasz Jagiello 7aa55371b5 Duplicate line 2016-03-17 15:54:22 -07:00
Balakrishnan ba06533c3e Fixed SQL Server Plugin issues #881 2016-03-17 18:01:19 -04:00
Marcelo Salazar d66d66e74b added json serializer
closes #878
2016-03-17 13:51:16 -06:00
Jonathan Chauncey d6b5f3efe6 fix(prometheus): Add support for bearer token to prometheus input plugin
closes #864
merges #880
2016-03-17 13:47:22 -06:00
Cameron Sparr b5a431624b Close UDP listener in udp_listener plugin
also adding waitgroups to udp_listener and statsd plugins to verify that
all goroutines have been cleaned up before Stop() exits.

closes #869
2016-03-17 10:51:35 -06:00
HUANG Wei 8e7284de5a fixup! Close the UDP connection in Stop() of statsd input plugin. 2016-03-17 10:51:35 -06:00
HUANG Wei b2d38cd31c Close the UDP connection in Stop() of statsd input plugin.
If not, when doing reload, we may listen to the same port, we'll get
error about listen to already used address.
2016-03-17 10:51:35 -06:00
Cameron Sparr a15fed35b7 Merge pull request #875 from Onefootball/feature/link-freebsd-package
Add FreeBSD tarball location to README
2016-03-17 10:51:21 -06:00
Dirk Pahl eee6b0059c Add FreeBSD tarball location to README 2016-03-17 16:53:55 +01:00
Eugene Dementiev 530b4f3bee [amqp output] Allow external auth (cert-based tls auth)
closes #863
2016-03-16 19:03:41 -06:00
Thibault Cohen bac1c223de Improve prometheus plugin
closes #707
2016-03-16 19:00:06 -06:00
marknmel 57f7582b4d Cleanup of Exec Inputs documentation - redux
Hi @sparrc

(Sorry for the noise - new pr)

closes #853

Please find some improvements to readability including the \n for the exec/telegraf line-protocol input.

I hope you (and others) find it easier to read.

/Mark

This is an ammend
2016-03-16 18:55:48 -06:00
Cameron Sparr 5afe819ebd Changelog update for 0.11.1 2016-03-16 14:55:40 -06:00
Cameron Sparr 59568f5311 Release 0.11.1 2016-03-16 14:45:35 -06:00
Cameron Sparr 822706367b provide args for telegraf for consistency with influxd:
- telegraf version
- telegraf config

closes #857
2016-03-16 14:22:01 -06:00
HUANG Wei f8e9fafda3 Add reload configuration for telegraf service scripts.
closes #794
2016-03-16 11:20:46 -06:00
Cameron Sparr c2bb9db012 Changelog update 2016-03-16 11:20:28 -06:00
Pierre Fersing e4e7d7fbfc Improved install script for packaged telegraf:
* Start/stop service on Debian/Ubuntu
* Disable init-script/Systemd-unit on package removal

closes #747
2016-03-16 11:17:28 -06:00
Cameron Sparr 035e4cf90a Fix bug with httpjson client pointer receiver
fixes #859
2016-03-16 10:57:15 -06:00
Cameron Sparr 18fff4a3f5 Merge pull request #858 from LordFPL/patch-1
(very) Little error in changelog
2016-03-16 09:28:30 -06:00
Ross McDonald 675b6dc305 Corrected issue with windows builds where the correct configuration
and filesystem would be used.

closes #852
closes #854
2016-03-16 09:27:09 -06:00
LordFPL 4071c78b2b (very) Little error in changelog
We are not going in the past, no ? ;)
2016-03-16 08:57:33 +01:00
Cameron Sparr 2cb32a683e README fixes for 0.11.0 2016-03-15 11:19:40 +00:00
Cameron Sparr b6dc9c004b Release 0.11.0 2016-03-14 17:19:46 +00:00
Cameron Sparr 4ea0c707c1 Input plugin for running ntp queries
see #235
2016-03-14 16:53:37 +00:00
Thomas Menard 2fbcb5c6d8 Fix postgresql password exposure in metrics
Fix the password exposure in the metrics or tags.

closes #821
closes #845
2016-03-14 11:00:30 +00:00
Cameron Sparr a4d60d9750 Update Godeps_windows
closes #839
2016-03-14 10:49:28 +00:00
Cameron Sparr d3925890b1 github wh: return from eventHandler when err != nil
closes #837
2016-03-14 10:34:58 +00:00
Cameron Sparr 8c6c144f28 influxdb output: If all write fails, trigger a reconnect
closes #836
2016-03-14 10:28:01 +00:00
Cameron Sparr db8c24cc7b Add a "kernel" plugin for /proc/stat statistics
see #235
2016-03-11 14:50:45 +01:00
Thibault Cohen ecbbb8426f Fix #828
closes #828
closes #829
2016-03-11 12:21:29 +01:00
Thibault Cohen 0752879fc8 SNMP fix concurrency issue
closes #823
2016-03-10 12:04:29 +01:00
Chris Goller 3f2a04b25b Fix build-for-docker Makefile target syntax.
closes #819
2016-03-09 22:58:29 +01:00
Cameron Sparr aa15e7916e processes: Fix zombie process procfs panic
fixes #822
2016-03-09 22:55:26 +01:00
Cameron Sparr 7b09623fa8 Add number of users to 'system' plugin
see #235
2016-03-09 19:27:22 +01:00
Cameron Sparr 2f45b8b7f5 Cross platform support for the 'processes' plugin
closes #798
2016-03-09 15:47:37 +01:00
Thibault Cohen 5ffa2a30be Add processes status stats in system input plugin 2016-03-09 15:47:37 +01:00
Cameron Sparr b102ae141a CONFIGURATION drop->fielddrop 2016-03-09 15:46:37 +01:00
Cameron Sparr 845abcdd77 Only log the overwritten metric warning on 1st overwrite per buffer
see #807
2016-03-09 14:44:32 +01:00
Cameron Sparr 805db7ca50 Break out fcgi code into orig Go files, don't ignore errs
closes #816
2016-03-09 13:44:11 +01:00
Prune Sebastien THOMAS bd3d0c330f parsed with gofmt
closes #776
2016-03-07 18:48:02 +01:00
Prune Sebastien THOMAS 0060df9877 added zookeeper_chroot option
added a plugin option zookeeper_chroot to set up the kafka endpoint in zookeeper, which may not be / (default).
This chroot is then configured in the consumergroup config.Zookeeper.Chroot

This is workaround the fact that this plugins does not handle the urls like    "zookeeper_server:port/chroot"
As the peers are stored in an array, it makes no sens to have them beeing URL. Peers should all be members of the same cluster, so they all have the same chroot.
2016-03-07 18:46:10 +01:00
Thibault Cohen cd66e203bd Improve procstat
closes #799
2016-03-07 17:57:32 +01:00
Cameron Sparr 240f99478a Prevent Inf and NaN from being added, and unit test Accumulator
closes #803
2016-03-07 15:46:23 +01:00
Cameron Sparr 41534c73f0 mqtt_consumer: option to set persistent session and client ID
closes #797
2016-03-07 14:34:42 +01:00
Matt Morrison 6139a69fa8 [SNMP Input] SNMPMap() loops forever if table has more than 32 entries
closes #800
closes #801
2016-03-07 12:18:55 +01:00
Cameron Sparr 3cca312e61 Adding a TCP input listener
closes #481
2016-03-07 12:10:28 +01:00
Cameron Sparr 7e312797ec Grammar corrections and consistency for output-list, input-list
closes #788
2016-03-07 11:42:01 +01:00
张光权 fe44fa648a Fix the incorrect indent of input-list help message 2016-03-07 11:33:03 +01:00
张光权 3249030257 add flags '-input-list' and '-output-list' for telegraf command 2016-03-07 11:33:03 +01:00
张光权 8f98c20c51 Add flags -usage-list to print all plugins inputs for telegraf 2016-03-07 11:33:03 +01:00
Thibault Cohen 1c76d5d096 Improve docker input plugin
closes #754
2016-03-07 11:24:32 +01:00
Cameron Sparr 35f1e28809 Merge pull request #790 from arthtux/master
Add README.md for redis
2016-03-04 17:46:12 +00:00
Arthur Deschamps 20999979de Update redis.go 2016-03-04 07:22:54 -05:00
arthtux c6706a86f1 add README.md for redis 2016-03-03 20:20:03 -05:00
Ross McDonald b4b1866286 Removed test functionality from build script.
closes #708
closes #713
2016-03-03 21:37:35 +00:00
Ross McDonald 28eb9b4c29 Fixed issue where binary wasnt copied to packaging directory correctly. 2016-03-03 21:34:57 +00:00
Ross McDonald 0a9accccc1 Added permissions check to post-install script due to issues with RPMs having the incorrect permissions on the log directory. 2016-03-03 21:34:57 +00:00
Ross McDonald c3d220175f Removed i386 as a target for darwin, as it currently doesnt compile. 2016-03-03 21:34:57 +00:00
Ross McDonald 095c90ad22 Re-added zip package output format. Modified zip and tar packaging process to use the base 'tar' and 'zip' commands, instead of 'fpm'. 2016-03-03 21:34:57 +00:00
Ross McDonald a77bfecb02 Updates to build script to improve ARM builds and other functionality. 2016-03-03 21:34:57 +00:00
Thibault Cohen 72027b5b3c Add README.md for snmp input plugin
closes #735
closes #773
closes #540
2016-03-03 15:54:34 +00:00
Thibault Cohen e5503c56ad Fix #773 2016-03-03 15:50:36 +00:00
Thibault Cohen ee7b225272 Add snmp table feature #540 2016-03-03 15:50:36 +00:00
Cameron Sparr 03d37725a9 dns_query unit tests, require that field exists 2016-03-03 15:44:16 +00:00
Pierre Fersing 29d1cbb673 Reduce metric_buffer_limit to 1000
closes #780
2016-03-03 15:32:44 +00:00
Auke Willem Oosterhoff e81278b800 Fix bug in sample code.
closes #784
closes #785
2016-03-03 15:31:37 +00:00
Manuel Sangoi e5482a5725 Do not ignore username option for mqtt output 2016-03-03 15:27:37 +00:00
Pascal Larin 8464be691e Username not set for mqtt_consumer plugin
Username parameter for the mqtt_consumer plugin was not pass to the client because an incorrect empty check.

closes #781
2016-03-03 12:17:19 +00:00
Cameron Sparr ed9937bbd8 Update all dependency hashes 2016-03-02 10:23:01 +00:00
Cameron Sparr b2a4d4a018 Allow ssl option specification for httpjson plugin
closes #769
2016-03-01 18:17:19 +00:00
Cameron Sparr 74aaf4f75b Add udp listener to readme list of plugins 2016-03-01 15:46:29 +00:00
Cameron Sparr 2945f9daa9 Changelog update 2016-03-01 15:11:37 +00:00
Cameron Sparr 3b496ab3d8 udp listener: add os buffer size notes & change default port
- using 8092 as the default port because it's similar to the rest of
  the TICK stack (InfluxDB, for example, uses 8083, 8086, 8088, etc.).
  didn't want to use 8125 because that conflicts with statsd.

closes #758
2016-03-01 15:01:07 +00:00
Andrea Leopardi e1f30aeff9 Add a README for the UDP listener input plugin 2016-03-01 11:24:49 +01:00
Andrea Leopardi a92e73231d Add tests for the udp_listener input plugin 2016-03-01 11:24:49 +01:00
Aleksei Magusev and Andrea Leopardi 8d91115623 Add generic UDP listener service input 2016-03-01 11:24:49 +01:00
Cameron Sparr 9af8d6912a Remove naoina/toml dependency, use influxdata/toml
closes #745
2016-03-01 10:17:02 +00:00
Pierre Fersing fe43fb47e1 Fix test
closes #771
2016-03-01 09:44:52 +00:00
Pierre Fersing ca3a80fbe1 Fix invalid DSN after dsnAddTimeout and "" DSN 2016-03-01 09:43:28 +00:00
Pierre Fersing f0747e76da Fix newly added test 2016-03-01 09:43:28 +00:00
Pierre Fersing 7416d6ea71 Improve timeout in input plugins 2016-03-01 09:43:28 +00:00
Dirk Pahl ea7cbc781e Create a FreeBSD build
closes #766
2016-03-01 09:38:58 +00:00
Cameron Sparr 3568fb9f93 Support specifying influxdb retention policy
closes #692
2016-02-29 18:10:32 +00:00
Cameron Sparr 43b7ce4f6d Merge pull request #764 from arthtux/master
Readme for nginx plugin
2016-02-29 11:36:32 +00:00
bastard baa38d6266 Fixing Librato plugin
closes #722
2016-02-29 11:35:45 +00:00
arthtux 1677960caa correct nginx README 2016-02-28 15:41:16 -05:00
arthtux 0fab573c98 add nginx description 2016-02-28 15:38:46 -05:00
Cameron Sparr 04a8e5b888 influxdb output: try to connect on write if there are no conns 2016-02-26 16:26:43 +00:00
Cameron Sparr 6284e2011c Fix sensor plugin, was splitting on ":" incorrectly
closes #748
2016-02-26 15:21:05 +00:00
Cameron Sparr a97c93abe4 add usage_percent into docker readme
closes #726
2016-02-26 15:12:37 +00:00
Cameron Sparr 664816383a Update readme to 0.10.4.1 2016-02-24 10:05:10 -07:00
Cameron Sparr fc4cb1654c Fix deb and rpm packages
closes #752
closes #750
2016-02-24 09:12:14 -07:00
Cameron Sparr f1fa915985 Release 0.10.4 w/ windows builds 2016-02-23 16:00:39 -07:00
Cameron Sparr 11482a75a1 Changelog update, field and name drop and pass params 2016-02-23 15:47:31 -07:00
Matt Heath e983d35c25 Add support for multiple field names for timers
closes #737
2016-02-23 15:43:29 -07:00
Cameron Sparr 85c4f753ad modify Windows default conf to use win perf over WMI 2016-02-23 15:40:02 -07:00
Cameron Sparr 1847ce3f3d Experimental windows build process changes 2016-02-23 13:52:24 -07:00
Cameron Sparr 83c27cc7b1 dns query: Don't use mjasion.pl for unit tests, check errs 2016-02-23 12:30:18 -07:00
Cameron Sparr 3e8f96a463 httpjson: add unit test to verify that POST params get passed 2016-02-23 11:01:23 -07:00
Cameron Sparr 69e4f16b13 Fix bad http GET parameter encoding, add unit test 2016-02-23 10:07:56 -07:00
Cameron Sparr 918c3fb260 httpjson test real response from issue #729 2016-02-23 09:34:01 -07:00
Cameron Sparr 54ee44839c Put arm deb and rpm downloads on readme 2016-02-22 16:59:45 -07:00
Cameron Sparr 8362aa9d66 Some windows build script fixes 2016-02-22 15:12:35 -07:00
Cameron Sparr 2a6ff16819 Fix up config panic points for naoina/toml support
closes #736
2016-02-22 14:44:33 -07:00
Pierre Fersing 47ad73cc89 Ignore boring filesystems from disk plugin
Modern Linux has a lots of boring filesystem (tmpfs on /dev, devpts on
/dev/pts, lots of cgroup on /sys/fs/cgroup/*, ...).

* Ignore filesystem with 0 bytes (this cover cgroup, devpts and other).
* Add IgnoreFS to ignore additional FS by their type. Add tmpfs and
  devtmpfs as default ignored type.
2016-02-22 14:34:26 -07:00
Aurélien DEHAY 9687f71a17 README updated for pgrep user support
closes #724
2016-02-22 14:33:37 -07:00
Aurélien DEHAY ed684be18d Adding pgrep user support 2016-02-22 14:32:04 -07:00
Cameron Sparr 5aef725c13 Change pass/drop to namepass/namedrop for outputs
closes #730
2016-02-22 13:35:06 -07:00
Thibault Cohen d00550c45f Add metric pass/drop filter 2016-02-22 12:11:33 -07:00
Cameron Sparr 9ce8d78835 Set running output quiet mode in agent connect func
closes #701
2016-02-22 11:42:02 -07:00
Cameron Sparr 29016822fd Sensors input currently only available if built from source 2016-02-21 16:35:56 -07:00
Marcin Jasion bb50d7edb4 dns_query plugin fixups:
- renamed plugin to dns_query
- domains are optional
- new record types

closes #694
2016-02-21 16:33:04 -07:00
Marcin Jasion d43d6f2b13 renamed plugin to dns_query and value to query_time_ms
small polishings

added more record types - AAAA and ANY
2016-02-21 16:21:11 -07:00
Marcin Jasion 636dc27ead Dns query input plugin 2016-02-21 16:21:11 -07:00
Cameron Sparr a18f535f21 Circle script: unset GOGC so it uses default 2016-02-21 16:00:41 -07:00
Cameron Sparr 6994d4a712 Turn GOGC on for packaging, use go 1.5.3 2016-02-21 10:41:46 -07:00
Cameron Sparr c9d0ae7cf3 Circle script: create packages if commit is tagged 2016-02-20 12:47:31 -07:00
Jason Coene 9edc25999e Minor formatting improvements
closes #727
2016-02-19 16:18:06 -07:00
Jason Coene 53c130b704 Add riak plugin 2016-02-19 16:16:50 -07:00
Cameron Sparr e4e174981d Skip snmp tests that require docker in short mode 2016-02-19 16:15:14 -07:00
Cameron Sparr 584a52ac21 InfluxDB output should not default to 'no timeout' for http writes
default to 5s instead, since even if it times out we will cache the
points and move on

closes #685
2016-02-19 15:38:51 -07:00
Cameron Sparr f9b5767dae Provide default args: percpu=true and totalcpu=true for cpu plugin
Also if outputs.file is empty, write to stdout

closes #720
2016-02-19 11:56:33 -07:00
Cameron Sparr 3179829fa5 Update changelog for 0.10.3 2016-02-18 17:18:43 -07:00
Cameron Sparr 187d1b853d Update Makefile to 'go install' rather than 'go build' 2016-02-18 16:48:59 -07:00
Cameron Sparr 8d2e5f0bda Seems to be a toml parse bug around triple pounds 2016-02-18 14:36:03 -07:00
Cameron Sparr 7def6663bd Root directory cleanup 2016-02-18 13:37:36 -07:00
Dragostin Yanev (netixen) a13d19c582 pugins/outputs/influxdb: Prevent runtime panic.
- Check and return error from NewBatchPoints to prevent runtime panic if
   user provides an unparsable precision time unit in config.
- Provide correct sample config precision examples.
- Update etc/telegraf.conf precision comment.

closes #715
2016-02-18 13:12:20 -07:00
Gabriel Levine 1837f83282 cleaned up the httpjson POST function.
closes #688
closes #394
2016-02-18 10:11:56 -07:00
Cameron Sparr b14cfd6c64 Add Configuration to statsd input readme
closes #714
2016-02-18 10:09:57 -07:00
Sergio Jimenez 963c51f473 fix(config): Made sample config consistent.
closes #682
2016-02-18 10:01:03 -07:00
Sergio Jimenez 1f77b75e14 fix(sample): Made TOML parser happy again 2016-02-18 09:00:27 +01:00
Sergio Jimenez e5f3acd139 doc(readme): Added README.md. 2016-02-18 09:00:27 +01:00
Sergio Jimenez c8365b3b7e test(unit): Removed useless tests 2016-02-18 09:00:27 +01:00
Sergio Jimenez 29c671ce46 fix(mesos): TOML annotation
* It was still using the previous config name
2016-02-18 09:00:27 +01:00
Sergio Jimenez 38ac9d2ecf List mesos in main README
And on the test configuration file
2016-02-18 09:00:27 +01:00
Sergio Jimenez 3573d93855 fix(vet): Range var used by goroutine
* Use it as a paramater for the closure
2016-02-18 09:00:27 +01:00
Sergio Jimenez 3cc2cda026 refactor(naming): For master specific settings
* This should help backwards compatibility when adding more features or
  supported Mesos components
2016-02-18 09:00:27 +01:00
Sergio Jimenez 7d10986f10 test(unit): Test for whitelisted metrics 2016-02-18 09:00:27 +01:00
Sergio Jimenez 8c6a6604ce Comments and cleanup 2016-02-18 09:00:27 +01:00
Sergio Jimenez 7170280401 fix(import): Json parser lives outside internal
* Fixed import for JSONFlattener{} it's now in parsers, broke after
  rebasing.
2016-02-18 09:00:27 +01:00
Sergio Jimenez babecb6d49 feat(timeout): Use timeout setting
* Use timeout as parameter in the http request
* A bit of cleanup
* More tests
2016-02-18 09:00:27 +01:00
Sergio Jimenez 9770802901 feat(whitelist): Converted black to whitelist
* Defined global var for holding default metric groups
* Refactor removeGroup() to work with the whitelist
* Refactor TestRemoveGroup()
2016-02-18 09:00:27 +01:00
Sergio Jimenez 4c1e817b38 fix(indent): For configuration sample 2016-02-18 09:00:27 +01:00
Sergio Jimenez 52b329be4e plugin(mesos): Reversed removeGroup()
* Now the user selects what to push instead of what not
* Required to check and improve tests
* Missing checks in the code when MetricsCol is empty
2016-02-18 09:00:27 +01:00
Sergio Jimenez 1d50d62a79 plugin(mesos): Added goroutines.
The plugin will iterate over the Servers slice and create a goroutine
for each of them.
2016-02-18 09:00:27 +01:00
Sergio Jimenez 07502c9804 Don't add port to tags just the host 2016-02-18 09:00:27 +01:00
Sergio Jimenez 59e0e49822 Indentation for sample config string 2016-02-18 09:00:27 +01:00
Sergio Jimenez 05170d78be plugin(mesos): Initial commit
The plugin is able to query a Mesos master and push the metrics, a
blacklist can be configured and a timeout, it's still not used.

Added unit test, might be a good idea to have system test using docker.
2016-02-18 09:00:27 +01:00
Cameron Sparr 88c83277c6 Write unit tests for RunningOutput 2016-02-17 17:06:34 -07:00
Cameron Sparr d0734b105b Start service plugins immediately, fix off-by-one bug 2016-02-17 15:10:32 -07:00
Cameron Sparr 4860dc148c changelog update 2016-02-17 09:53:41 -07:00
Cameron Sparr ee468be696 Flush based on buffer size rather than time
this includes:
- Add Accumulator to the Start() function of service inputs
- For message consumer plugins, use the Accumulator to constantly add
  metrics and make Gather a dummy function
- rework unit tests to match this new behavior.
- make "flush_buffer_when_full" a config option that defaults to true

closes #666
2016-02-16 22:25:22 -07:00
Cameron Sparr 7f539c951a changelog update 2016-02-15 16:08:45 -07:00
Thibault Cohen e495ae9030 Add tcp/udp check connection input plugin
closes #650
2016-02-15 13:38:58 -07:00
Cameron Sparr ccb6b3c64b Small readme formattings 2016-02-14 18:44:48 -07:00
Anton Bykov 85594cc92e Readme: specify compression format for unpacking
closes #693
2016-02-14 15:59:53 -07:00
Andrei Burd 0b72612cd2 Code formatted, Readme updated based on example
closes #695
2016-02-14 15:58:05 -07:00
Vladislav Shub dd086c7830 Added full support for raindrops and tests 2016-02-14 18:52:26 +02:00
Cameron Sparr 6a601ceb97 Add support for specifying SSL config for influxdb output
closes #191
2016-02-12 17:02:01 -07:00
Cameron Sparr 8236534e3c changelog update 2016-02-12 16:55:27 -07:00
Cameron Sparr 0fef147713 data output readme update 2016-02-12 16:52:33 -07:00
Cameron Sparr 0198296ced Data format output documentation 2016-02-12 16:47:07 -07:00
Cameron Sparr 37726a02af Add Serializer plugins, and 'file' output plugin 2016-02-12 15:05:27 -07:00
Cameron Sparr a9c135488e Add Serializer plugins, and 'file' output plugin 2016-02-12 14:13:49 -07:00
Thomas Menard 72f5c9b62d postgres plugin bgwriter stats
Add pg_stat_bg_writer stats

closes #683
2016-02-12 11:21:53 -07:00
Cameron Sparr 8d0f50a6fd MQTT Consumer Input plugin 2016-02-12 11:13:32 -07:00
Dragostin Yanev (netixen) 6c353e8b8f Change point_buffer to metric_buffer to conform will changes in https://github.com/influxdata/telegraf/pull/676
closes #680
2016-02-12 10:01:56 -07:00
Dragostin Yanev (netixen) 512d9822f0 Add NATS consumer input plugin. 2016-02-12 09:58:32 -07:00
Cameron Sparr d003ca46c7 Merge pull request #673 from miketonks/f-docker-percentages
Add calculated cpu and memory percentages to docker input (via config option)
2016-02-11 08:43:55 -07:00
Mike Tonks 7587dc350e Remove config option, percent option always activated. Fix review issues 2016-02-11 10:49:48 +00:00
Cameron Sparr 28664fedb2 Support exec input plugin legacy behavior 2016-02-10 13:26:02 -07:00
Marcus Geiger ef20f05221 Add --pkgarch option to build.py to specify the packaging architecture
pkg arch can be different to GOARCH.

Example: build for debian on raspberry pi. GOARCH will be arm
but the packaging architecture on debian will be armhf (arm
hard float). The --pkgarch option is passed to fpm to specify
the required architecture which is reflected in the package
manifest and also in the result filename.

closes #675
2016-02-09 17:41:48 -07:00
Miki cabf5d004d added dovecot plugin
closes #671
2016-02-09 14:10:17 -07:00
Cameron Sparr d551da26e5 Fix exec input legacy behavior, command='' 2016-02-09 13:49:14 -07:00
Dhruv Bansal 893357f01e Updated Riemann output:
* Customizable 'separator' option instead of hard-coded '_'

* String values are sent as "State" instead of "Metric", preventing
  Riemann from rejecting them

* Riemann service name is set to an (ugly) combination of input name &
  (sorted) tags' values...this allows connecting different events for
  the same input together on the Riemann side

closes #642
2016-02-09 11:17:07 -07:00
Cameron Sparr fc7fa4b6c5 Cleanup comments and indentation in config file 2016-02-09 11:01:50 -07:00
Cameron Sparr fb75db2f1f re-arrange and cleanup graphite output test 2016-02-09 11:01:13 -07:00
Mike Tonks 7c20522a30 Add calculated cpu and memory percentages to docker input (via config option) 2016-02-09 15:20:56 +00:00
Cameron Sparr c09884c686 Fixup some URL typos 2016-02-08 21:36:53 -07:00
Cameron Sparr 9273782093 changelog update 2016-02-08 21:34:22 -07:00
Cameron Sparr 44ffe29c10 Update Godeps and Godeps_windows files 2016-02-08 21:26:56 -07:00
Cameron Sparr e619493ece Implementing generic parser plugins and documentation
This constitutes a large change in how we will parse different data
formats going forward (for the plugins that support it)

This is working off @henrypfhu's changes.
2016-02-08 21:08:44 -07:00
Henry Hu 1449c8b887 Add Graphite line protocol parsing to exec plugin
closes #637
2016-02-08 17:12:28 -07:00
Cameron Sparr 6b06a23102 Change [tags] to [global_tags] to deal with toml bug
closes #662
2016-02-08 16:20:47 -07:00
Cameron Sparr b55a93a3e1 update changelog 2016-02-07 09:06:51 -07:00
Cameron Sparr f5f43e6d1b ping plugin: use -W for linux, -t for bsd/darwin
closes #443
2016-02-06 23:24:47 -07:00
Cameron Sparr 1e03a9440b Try ping plugin with -n and -s options added 2016-02-06 23:09:29 -07:00
codehate 9a59512f75 Add: Telegraf CouchDB Plugin
CouchDB Plugin - Formatted Code

closes #652

Minor fix for CouchDB Plugin

Formatted code fix for CouchDB Plugin

CouchDB Plugin - Changed hosts to full urls

CouchDB Plugin - Formatted Code

CouchDB Plugin - Fatal commit from local fix

CouchDB Plugin - Updated test case
2016-02-05 14:14:19 -07:00
Thibault Cohen 35150caea4 Add a make command with CGO disabled
closes #458
2016-02-04 17:33:40 -07:00
Cameron Sparr f01da8fee4 Remove extraneous 'v' from README tarball 2016-02-04 11:23:46 -07:00
Cameron Sparr 434c08a357 Release 0.10.2 2016-02-04 11:04:29 -07:00
Cameron Sparr bd9c5b6995 mqtt output: cleanup, implement TLS
Also normalize TLS config across all output plugins and normalize
comment strings as well.
2016-02-04 10:44:37 -07:00
Cameron Sparr b941d270ce changelog update 2016-02-03 08:35:03 -07:00
Reginaldo Sousa 9406961125 Fix a bug when setting host header in httpjson
closes #634
2016-02-02 21:59:18 -07:00
Rune Darrud 0d391b66a3 Added support for Windows operating systems pre-Vista. 2016-02-02 21:57:38 -07:00
Cameron Sparr a11e07e250 Minor change to forgotten config file exit 2016-02-01 17:44:19 -07:00
Cameron Sparr d266dad1f4 Don't compile ping plugin on windows.
closes #496
2016-02-01 16:39:53 -07:00
Rune Darrud 331b700d1b Corrected a issue that came from code cleanup earlier
wherein missing performance counters caused it to return
early from the loop, instead of ignoring missing in
default configuration mode.

closes #625
2016-01-31 23:17:45 -07:00
Christoph Wegener 2163fde0a4 Fix memory leak: Remove signal.Notify code from plugins/inputs/win_perf_counters.(*Win_PerfCounters).Gather 2016-01-31 23:16:09 -07:00
Cameron Sparr 24a2aaef4b Ansible role in readme 2016-01-30 11:55:48 -07:00
Cameron Sparr 042cf517b2 Mention yum/apt repo in README
Also add `make windows-build` to Makefile

closes #618
2016-01-30 11:35:39 -07:00
Cameron Sparr b97027ac9a Allow exec plugin to parse line-protocol
closes #613
2016-01-30 11:12:59 -07:00
Christoph Wegener 4ea3f82e50 Replace all single percentage characters with double
percentage characters in sampleConfig string so that fmt.Printf
will interpret them as literal percentage characters when
running 'telegraf.exe -sample-config'

closes #620
2016-01-30 10:10:55 -07:00
Cameron Sparr 38c4111e6c Add unit tests for the root telegraf package 2016-01-29 16:01:34 -07:00
Cameron Sparr 338341add8 Put windows dependencies into a separate Godeps file 2016-01-29 11:10:18 -07:00
Cameron Sparr 93bb679f9d Fix possible panic if stat is nil
closes #612
2016-01-29 10:47:30 -07:00
Pavel Yudin 40d859354f Add powerdns input plugin
closes #614
2016-01-29 09:40:04 -07:00
Cameron Sparr 9e7c8df384 statsd: allow template parsing fields. Default to value=
closes #602
2016-01-28 16:56:50 -07:00
Rune Darrud f088dd7e00 Added plugin to read Windows performance counters
closes #575
2016-01-28 16:35:13 -07:00
Cameron Sparr 10c4e4f63f Fix datadog json marshalling
fixes #607
2016-01-28 16:12:33 -07:00
Cameron Sparr 962325cc40 Warn when metrics are being overwritten
closes #601
2016-01-28 14:00:14 -07:00
root a9c33abfa5 sql server: update README.md
closes #594
2016-01-28 13:50:26 -07:00
Cameron Sparr d835c19fce Insert . between msrmnt and field name in datadog output
fixes #600
2016-01-28 12:04:26 -07:00
Marcin Bunsch 1f1384afc6 Use a single measurement with fields for timings in statsd plugin.
closes #603
2016-01-28 12:03:48 -07:00
Cameron Sparr 9d4b55be19 Include all tag values in graphite output
closes #595
2016-01-28 10:58:35 -07:00
Cameron Sparr c549ab907a Throughout telegraf, use telegraf.Metric rather than client.Point
closes #599
2016-01-27 23:47:32 -07:00
Cameron Sparr 9c0d14bb60 Create public models for telegraf metrics, accumlator, plugins
This will basically make the root directory a place for storing the
major telegraf interfaces, which will make telegraf's godoc looks quite
a bit nicer. And make it easier for contributors to lookup the few data
types that they actually care about.

closes #564
2016-01-27 15:42:50 -07:00
Cameron Sparr a822d942cd 386 -> i386 2016-01-27 13:42:34 -07:00
Cameron Sparr 3a64a01f91 Release 0.10.1 2016-01-27 12:55:06 -07:00
Cameron Sparr 6ebb6bc7ee Fix SNMP unit tests on OSX, improve tag config doc
closes #592
2016-01-27 11:27:10 -07:00
Cameron Sparr be95dfdd0e Update dependency hashes 2016-01-26 16:27:18 -07:00
Cameron Sparr 88890fa7c2 Update changelog 2016-01-26 16:05:20 -07:00
Andrea Sosso f8930b9cbc Additional request header parameters for httpjson plugin
closes #471
2016-01-26 16:02:47 -07:00
Cameron Sparr c10227a766 Update changelog and readme, and small tweaks to github_webhooks 2016-01-26 15:57:06 -07:00
Cameron Sparr 7e7e462de1 Merge branch 'ghWebhooks'
closes #573
2016-01-26 15:29:41 -07:00
root a93e1ceac8 Add sqlserver input plugin
closes #589
2016-01-26 14:55:27 -07:00
Cameron Sparr 7f8469b66a Fixup some disk usage reporting, make it reflect df
fixes #513
2016-01-26 11:56:28 -07:00
Wu Taizeng cf568487c8 Fix some inputs panic will lead to the telegraf exit
closes #585
closes #584
2016-01-26 10:48:24 -07:00
Jack Zampolin 4c74a2dd3a Fix naming issue 2016-01-25 17:34:44 -08:00
Jack Zampolin a70452219b Remove internal dependancy 2016-01-25 17:28:28 -08:00
Ross McDonald 47ea2d5fb4 Added Amazon Linux logic to post-installation script.
closes #579
2016-01-25 17:49:12 -07:00
Ross McDonald 16540e35f1 Backporting fixes from the influxdb build script, along with a few improvements:
- Added iteration to tar/zip output name (in case of pre-releases)
- Switched 32-bit signifier to i386 from 386
- Tweaked upload settings to allow for folder paths in bucket names
2016-01-25 15:13:55 -07:00
Cameron Sparr 3bfb3a9fe2 Insert documentation into sample-config on JSON parsing
closes #521
2016-01-25 13:29:05 -07:00
Lukasz Jagiello f9517dcf24 RabbitMQ plugin - extra fields:
Extra fields describing size of all message bodies in the queue.

* message_bytes
* message_bytes_ready
* message_bytes_unacknowledged
* message_bytes_ram
* message_bytes_persistent

More information about each field:
https://www.rabbitmq.com/man/rabbitmqctl.1.man.html

closes #577
2016-01-25 13:00:54 -07:00
Jack Zampolin 7878b22b09 Add README.md 2016-01-25 11:42:03 -08:00
Thibault Cohen e6d7e4e309 Add snmp input plugin
closes #546
closes #40
2016-01-25 12:35:27 -07:00
Tim Raymond 40d0da404e Change configuration package to influxdata/config
We are unifying the way that we handle configuration across the products
into the influxdata/config package. This provides the same API as
naoina/toml that was used previously, but provides some additional
features such as support for documenting generated TOML configs as well
as support for handling default options. This replaces all usage of
naoina/toml with influxdata/config.
2016-01-25 12:02:44 -07:00
Cameron Sparr 8675bd125a add 'gdm restore' to adding a dependency instructions 2016-01-25 10:59:44 -07:00
Jack Zampolin 4e5dfa5d33 Address PR comments and merge conflicts 2016-01-25 09:56:57 -08:00
Jack Zampolin 89f5b77550 Fix merge conflict in all.go 2016-01-22 16:51:54 -08:00
Jack Zampolin 5b15cd9163 Change github.com/influxdata to github.com/influxdb where necessary 2016-01-22 16:48:42 -08:00
Jack Zampolin dbf1383a38 Change github.com/influxdata to github.com/influxdata 2016-01-22 16:45:31 -08:00
Jack Zampolin 46b367e74b Add tests 2016-01-22 16:43:33 -08:00
Cameron Sparr 3da390682d Kinesis output shouldn't return an error for no reason 2016-01-22 17:32:36 -07:00
Cameron Sparr 5349a3b6d1 Implement a per-output fixed size metric buffer
Also moved some objects out of config.go and put them in their own
package, internal/models

fixes #568
closes #285
2016-01-22 16:29:02 -07:00
Cameron Sparr f2ab5f61f5 Gather elasticsearch nodes in goroutines, handle errors
fixes #464
2016-01-21 17:00:44 -07:00
Cameron Sparr e910a03af4 Changelog update 2016-01-21 16:44:35 -07:00
Cameron Sparr 4d0dc8b7c8 Refactor the docker plugin, use go-dockerclient throughout
fixes #503
fixes #463
2016-01-21 16:07:03 -07:00
Stephen Kwong e0dc1ef5bd Add Cloudwatch output
closes #553
2016-01-21 09:11:52 -07:00
Cameron Sparr f24f5e98dd Remove go get ./... from the Makefile 2016-01-20 15:01:08 -07:00
Cameron Sparr 6647cfc228 statsd: If parsing a value to int fails, try to float and cast to int
fixes #556
2016-01-20 14:30:57 -07:00
Jack Zampolin ddcd99a1ce Push ghwebhooks branch 2016-01-20 12:19:03 -08:00
Cameron Sparr 55c07f23b0 Update contributing document 2016-01-20 12:33:49 -07:00
Cameron Sparr 8192572e23 Update changelog 2016-01-20 12:22:11 -07:00
Jack Zampolin 0cdf1b07e9 Fix issue 524 2016-01-20 10:57:35 -08:00
Jack Zampolin 8653bae6ac Change start implementation 2016-01-20 10:49:42 -08:00
Cameron Sparr fc1aa7d3b4 Filter mount points before stats are collected
fixes #440
2016-01-20 11:46:59 -07:00
Jack Zampolin 8bdcd6d576 First commit for ghwebhooks service plugin 2016-01-19 23:14:11 -08:00
Cameron Sparr d3925fe578 Include CPU usage percent with procstat data
closes #484
2016-01-19 22:52:55 -07:00
Cameron Sparr d3a5cca1bc Collection interval random jittering
closes #460
2016-01-19 13:22:54 -07:00
Cameron Sparr f3b553712a Changelog update 2016-01-19 11:21:05 -07:00
Cameron Sparr 839651fadb Change default statsd packet size to 1500, make configurable
Also modifying the internal UDP listener/parser code to make it able to
handle higher load. The udp listener will no longer do any parsing or
string conversion. It will simply read UDP packets as bytes and put them
into a channel. The parser thread will now deal with splitting the UDP
metrics into separated strings.

This could probably be made even better by leaving everything as byte
arrays.

fixes #543
2016-01-19 11:08:16 -07:00
Thibault Cohen 6a50fceea4 Replace plugins by inputs in some strings
closes #542
2016-01-19 10:09:37 -07:00
Cameron Sparr 7efe108686 Update Godeps file 2016-01-19 09:44:25 -07:00
Hannu Valtonen c313af1b24 kafka: Add support for using TLS authentication for the kafka output
With the advent of Kafka 0.9.0+ it is possible to set up TLS client
certificate based authentication to limit access to Kafka.

Four new configuration variables are specified for setting up the
authentication. If they're not set the behavior stays the same as
before the change.

closes #541
2016-01-18 11:17:01 -07:00
Vinh 1388b1b58b Add phusion Passenger plugin
Gather metric by parsing XMLoutput of `passenger-status` utility.
More information of this utility:
https://www.phusionpassenger.com/library/admin/apache/overall_status_report.html

closes #522
2016-01-18 11:14:04 -07:00
Thibault Cohen 551db20657 Add SIGHUP support to reload telegraf config
closes #539
2016-01-18 11:07:07 -07:00
Cameron Sparr bc71e956a5 changelog bugfix update 2016-01-18 11:05:14 -07:00
Vinh 5af6974796 phpfpm plugin: enhance socket gathering and config
- If we detect errors when gathering stat via socket, return those error
  so it canbe appear in Telegraf log
- Improve fcgi client, also upgrade it to current version of Go at
  https://golang.org/src/net/http/fcgi/fcgi.go
- Add test for unix socket and fcgi
  to remotely connect but only as an extra url field.
- Allow customization of fpm status path
- Document about using of `host` in case `unixsocket` that it isn't used
- Documet upgrade for new data layout

closes #499
closes #502
closes #538
2016-01-18 10:56:45 -07:00
Eugene Dementiev a712036b56 core: print error on output connect fail
closes #537
2016-01-16 17:32:23 -07:00
Eugene Dementiev 37b96c192b output amqp: Add ssl support
closes #536
2016-01-16 17:31:05 -07:00
Cameron Sparr 8cbdf0f907 Tweak config messages for graphite. Update changelog and readme
closes #494
2016-01-16 17:29:02 -07:00
Thibault Cohen ef5c630d3a Add Graphite output 2016-01-16 17:19:27 -07:00
Cameron Sparr 6eea89f4c0 Make NSQ plugin compatible with version 0.10.0 2016-01-15 17:04:23 -07:00
Jeff Nickoloff dbbb2d9877 NSQ Plugin
- Polls a set of NSQD REST endpoints and collects counters for all topics, channels, and clients

Signed-off-by: Jeff Nickoloff <jeff@allingeek.com>

closes #492
2016-01-15 16:09:31 -07:00
Cameron Sparr c483e16d72 Add option to disable statsd name conversion
closes #467
closes #532
2016-01-15 15:58:09 -07:00
Cameron Sparr 40a5bad968 Update procstat doc 2016-01-15 15:55:52 -07:00
Kostas Botsas 1421bce371 Update README.md 2016-01-15 14:49:53 -08:00
Kostas Botsas 5e7dd6d51b Merge pull request #533 from influxdata/fix-interval-option-v0.10
interval options should have string value
2016-01-15 14:49:11 -08:00
Kostas Botsas 71f4e72b22 interval options should have string value
also mentioned name_override and name_prefix on top of name_suffix
2016-01-15 14:48:45 -08:00
Cameron Sparr b24e71b232 Removing old package script, trim Makefile 2016-01-15 14:03:04 -07:00
Cameron Sparr f60c090e4c Add a quiet mode to telegraf
closes #514
2016-01-15 13:31:04 -07:00
Cameron Sparr 50334e6bac Only compile the sensors plugin if the 'sensors' tag is set 2016-01-15 13:15:33 -07:00
Cameron Sparr 963a9429dd Tweak changelog for sensors plugin, and add a non-linux build file
closes #519
closes #168
2016-01-15 11:22:33 -07:00
Matt Davis 2eda8d64c7 Added infor to readme and changelog 2016-01-15 11:17:46 -07:00
Matt Davis 9b96c62e46 Change build configuration to linux only 2016-01-15 11:17:46 -07:00
Matt Davis 378b7467a4 Fixed an unused variable 2016-01-15 11:17:46 -07:00
Matt Davis c0d98ecd4b Added initial support for gosensors module 2016-01-15 11:17:46 -07:00
Thibault Cohen b44644b6bf Add response time to httpjson plugin
closes #475
2016-01-15 11:13:12 -07:00
Ross McDonald 7bfb42946e Switched to /etc/debian_version for Debian/Ubuntu distribution recognition in post-install.
closes #526
closes #525
2016-01-15 10:54:47 -07:00
Cameron Sparr e8907acd28 Update Godeps and fix changelog 2014->2016 2016-01-14 22:35:05 -07:00
Kevin Fitzpatrick d6ef3b1e02 Note on where to look for plugin information 2016-01-14 21:35:10 -07:00
Cameron Sparr a39a7a7a03 Add an interface:"all" tag to the net protocol counters
fixes #508
2016-01-14 19:55:19 -07:00
Kostas Botsas 923be102b3 Align exec documentation with v0.10 updates 2016-01-14 15:55:53 -08:00
Hannu Valtonen 7531e218c1 build.py: Make build script work on both Python2.x and Python3.x
While at it also add a missing dependency on lsof required by the
netstat plugin.

closes #512
2016-01-14 10:28:50 -08:00
Thibault Cohen 3cc1fecb53 Ping input doesn't return response time metric when timeout
closes #506
2016-01-14 10:12:10 -08:00
Philip Silva 3c89847489 internal: FlattenJSON, flatten arrays as well
With HTTP JSON or Elasticsearch, one can also process values nested in arrays.
2016-01-14 09:52:58 -08:00
Cameron Sparr fb837ca66d Add 0.10.0 blog post link to README 2016-01-14 09:21:01 -08:00
Cameron Sparr 2ec1ffdc11 Fix Telegraf s3 upload and readme links
fixes #505
2016-01-11 13:35:26 -07:00
Cameron Sparr 56509a61b9 Change 0.3.0 -> 0.10.0 2016-01-08 17:22:23 -07:00
Cameron Sparr f37f8ac815 Update changelog and readme for package updates 2016-01-08 15:13:58 -07:00
Ross McDonald 231b5feb23 Merge pull request #497 from influxdata/rm-package-updates
Packaging Updates
2016-01-08 15:54:09 -06:00
Ross McDonald 81fa063338 Removed data directory entries, since Telegraf doesn't need them. 2016-01-08 15:34:11 -06:00
Ross McDonald 07b4a4dbca Added a `build.py` script for compiling and packaging. Added post and pre install scripts to handle installation and upgrades in a cleaner way. Minor fixes to the init script and service unit file. 2016-01-08 15:28:33 -06:00
Cameron Sparr fd6daaa73b 0.3.0: update README and documentation 2016-01-08 15:25:04 -06:00
Cameron Sparr 6496d185ab add backwards-compatability for 'plugins', remove [inputs] and [outputs] headers 2016-01-08 12:49:50 -07:00
Cameron Sparr 7499c1f969 0.3.0: update README and documentation 2016-01-08 10:33:25 -07:00
Cameron Sparr 9c5db1057d renaming plugins -> inputs 2016-01-07 15:04:30 -07:00
Cameron Sparr 30d24a3c1c 0.3.0 documentation changes and improvements 2016-01-07 13:02:59 -07:00
Cameron Sparr ad4af06802 Update Makefile and Godeps and various fixups 2016-01-07 12:33:26 -07:00
Cameron Sparr 64b98a9b61 0.3.0 unit tests: agent and prometheus 2016-01-07 10:52:46 -07:00
Cameron Sparr 4fdcb136bc 0.3.0 unit tests: internal 2016-01-07 10:23:38 -07:00
Cameron Sparr 0e398f5802 0.3.0 unit tests: amon, datadog, librato 2016-01-07 10:09:04 -07:00
Cameron Sparr b9869eadc3 0.3.0 unit tests: influxdb 2016-01-07 01:11:52 -07:00
Cameron Sparr 936c5a8a7a 0.3.0 unit tests: rethinkdb, twemproxy, zfs 2016-01-06 22:16:04 -07:00
Cameron Sparr 10f19fade1 0.3.0 unit tests: statsd, trig, zookeeper 2016-01-06 18:19:18 -07:00
Cameron Sparr c01594c2a4 0.3.0 unit tests: rabbitmq, redis 2016-01-06 18:13:00 -07:00
Cameron Sparr ccbd7bb785 0.3.0 unit tests: procstat, prometheus, puppetagent 2016-01-06 17:56:30 -07:00
Cameron Sparr 6eb49dee5d 0.3.0 unit tests: mysql, nginx, phpfpm, ping, postgres 2016-01-06 17:37:56 -07:00
Cameron Sparr 6a4bf9fcff 0.3.0 unit tests: mailchimp, memcached, mongodb 2016-01-06 17:19:39 -07:00
Cameron Sparr 9ada89d51a 0.3.0 unit tests: jolokia, kafka_consumer, leofs, lustre2 2016-01-06 16:55:28 -07:00
Cameron Sparr 524fddedb4 0.3.0 unit tests: exec, httpjson, and haproxy 2016-01-06 16:11:16 -07:00
Cameron Sparr c4a7711e02 0.3.0 unit tests: disque and elasticsearch 2016-01-05 23:48:59 -07:00
Cameron Sparr 2e20fc413c 0.3.0 unit tests: aerospike, apache, bcache 2016-01-05 23:48:59 -07:00
Cameron Sparr 498482d0f6 0.3.0 unit tests: system plugins 2016-01-05 23:48:59 -07:00
Cameron Sparr 4bd5b6a4d6 Fix httpjson panic for nil request body 2016-01-05 23:48:59 -07:00
Cameron Sparr 2e764cb22d 0.3.0 Removing internal parallelism: twemproxy and rabbitmq 2016-01-05 23:48:59 -07:00
Cameron Sparr c8914679b7 0.3.0 Removing internal parallelism: procstat 2016-01-05 23:48:59 -07:00
Cameron Sparr e25ac0d587 0.3.0 Removing internal parallelism: postgresql 2016-01-05 23:48:59 -07:00
Cameron Sparr 41374aabcb 0.3.0 Removing internal parallelism: httpjson and exec 2016-01-05 23:48:59 -07:00
Cameron Sparr f60d846eb3 0.3.0 outputs: riemann 2016-01-05 23:48:59 -07:00
Cameron Sparr 96e54ab326 CHANGELOG update 2016-01-05 23:48:59 -07:00
Cameron Sparr 40a3feaad0 0.3.0 outputs: opentsdb 2016-01-05 23:48:59 -07:00
Cameron Sparr 2611931f82 0.3.0 output: librato 2016-01-05 23:48:59 -07:00
Cameron Sparr ec39d10695 0.3.0 output: datadog and amon 2016-01-05 23:48:59 -07:00
Cameron Sparr 30d8ed411a 0.3.0: mongodb and jolokia 2016-01-05 23:48:59 -07:00
Cameron Sparr 64a832467e 0.3.0: postgresql and phpfpm 2016-01-05 23:48:59 -07:00
Cameron Sparr 9c5321c538 0.3.0 HAProxy rebase 2016-01-05 23:48:59 -07:00
Cameron Sparr aba123dae0 0.3.0: rethinkdb 2016-01-05 23:48:59 -07:00
Cameron Sparr 5aca58ad2a 0.3.0: zookeeper and zfs 2016-01-05 23:48:59 -07:00
Cameron Sparr a34418d724 backwards compatability for io->diskio change 2016-01-05 23:48:59 -07:00
Cameron Sparr 5f4262921a 0.3.0: trig and twemproxy 2016-01-05 23:48:59 -07:00
Cameron Sparr 6fcd05b855 0.3.0 redis & rabbitmq 2016-01-05 23:48:59 -07:00
Cameron Sparr 7746a2b3cd 0.3.0: prometheus & puppetagent 2016-01-05 23:48:59 -07:00
Cameron Sparr 2749dcd128 0.3.0: procstat 2016-01-05 23:48:59 -07:00
Cameron Sparr 92343d91d6 0.3.0: ping, mysql, nginx 2016-01-05 23:48:59 -07:00
Cameron Sparr ce7b48143a 0.3.0: mailchimp & memcached 2016-01-05 23:48:59 -07:00
Cameron Sparr e30e98a496 0.3.0: leofs & lustre2 2016-01-05 23:48:59 -07:00
Cameron Sparr 4798bd9d33 0.3.0 httpjson 2016-01-05 23:48:59 -07:00
Cameron Sparr 38d6cb97ad 0.3.0: HAProxy 2016-01-05 23:48:59 -07:00
Cameron Sparr 3be111a160 Breakout JSON flattening into internal package, exec & elasticsearch aggregation 2016-01-05 23:48:59 -07:00
Cameron Sparr 97a66b73cf Updating aerospike & apache plugins for 0.3.0 2016-01-05 23:48:59 -07:00
Cameron Sparr 50fc3ec974 Updating system plugins for 0.3.0 2016-01-05 23:48:59 -07:00
Filippo Vitale ee8d99b955 fix too restrictive .gitignore
closes #483
2016-01-05 20:30:45 -07:00
Cameron Sparr 5bf7c4d241 Update circleci badge 2016-01-05 14:18:31 -07:00
Aleksei Magusev c2b5f21832 Fix typo in telegraf.conf
Closes #456.
2016-01-04 01:30:49 +01:00
Cameron Sparr bdac9b7241 Update 0.3.0 beta links in readme 2015-12-21 13:53:16 -08:00
Cameron Sparr ec6eae9537 Links for the 0.3.0 beta version 2015-12-19 23:50:05 -07:00
Cameron Sparr f607074899 remove Name from influxdb unit test 2015-12-18 16:39:23 -07:00
Cameron Sparr 0571eecb0c Remove 'Name' argument from influxdb plugin for 0.3.0 compatability
closes #449
2015-12-18 16:26:15 -07:00
Mark Rushakoff 4f3d6ddf17 Add influxdb plugin
This was primarily intended to consume InfluxDB-style expvars,
particularly InfluxDB's `/debug/vars` endpoint.

That endpoint follows a structure like

```json
{
  "httpd::8086": {
    "name": "httpd",
    "tags": {
      "bind": ":8086"
    },
    "values": {
      "pointsWrittenOK": 33756,
      "queryReq": 19,
      "queryRespBytes": 26973,
      "req": 428,
      "writeReq": 205,
      "writeReqBytes": 3939161
    }
  }
}
```

There are an arbitrary number of top-level keys in the JSON response at
the configured URLs, and this plugin will iterate through all of their
values looking for objects with keys "name", "tags", and "values"
indicating a metric to be consumed by telegraf.

Running this on current master of InfluxDB, I am able to record nearly
the same information that is normally stored in the `_internal`
database; the only measurement missing from `_internal` is `runtime`,
which is present under the "memstats" key but does not follow the format
and so is not consumed in this plugin.

```
$ influx -database=telegraf -execute 'SHOW FIELD KEYS FROM /influxdb/'

name: influxdb_influxdb_engine
----------------------------
fieldKey
blksWrite
blksWriteBytes
blksWriteBytesC
pointsWrite
pointsWriteDedupe

name: influxdb_influxdb_httpd
---------------------------
fieldKey
pingReq
pointsWrittenOK
queryReq
queryRespBytes
req
writeReq
writeReqBytes

name: influxdb_influxdb_shard
---------------------------
fieldKey
fieldsCreate
seriesCreate
writePointsOk
writeReq

name: influxdb_influxdb_subscriber
--------------------------------
fieldKey
pointsWritten

name: influxdb_influxdb_wal
-------------------------
fieldKey
autoFlush
flushDuration
idleFlush
memSize
metaFlush
pointsFlush
pointsWrite
pointsWriteReq
seriesFlush

name: influxdb_influxdb_write
---------------------------
fieldKey
pointReq
pointReqLocal
req
subWriteOk
writeOk
```
2015-12-18 15:41:16 -07:00
chrispeterson 34f0c593ad add additional stats that were already being collected
and rearrange the order to match the index order from the CSV endpoint

add test coverage. add back wretr.  remove check_status from recently added column

closes #445
2015-12-17 15:00:17 -07:00
jipperinbham 97ebcc2af1 close r.Body, remove network metrics, updated other sections as needed
closes #430
closes #452
2015-12-17 14:43:14 -07:00
Cameron Sparr 4852b5c11e Do not rely on external server for amon unit tests 2015-12-11 13:09:09 -07:00
Cameron Sparr 16ce06f621 Use gdm for dependency management 2015-12-11 12:22:16 -07:00
Cameron Sparr 811a54af6c Remove Godeps/ directory 2015-12-11 11:45:20 -07:00
Cameron Sparr e02973b6f4 Go fmt kinesis output test file 2015-12-11 11:45:07 -07:00
James Lamb b91eab6737 add amazon kinesis as an output plugin
closes #428
2015-12-11 11:29:03 -07:00
Allen Petersen c89ef84df7 Separate pool tag and stat collection.
closes #427
2015-12-11 10:59:11 -07:00
Allen Petersen e3c8a1131a Fix single dataset test.
The "two pool, one metic" test was only passing because of previous calls to Gather() had already populated the values.
2015-12-08 05:53:11 -08:00
Allen Petersen eb78b9268f Add zfs pool stats collection. 2015-12-08 05:11:41 -08:00
3161 changed files with 305272 additions and 407229 deletions

219
.circleci/config.yml Normal file
View File

@ -0,0 +1,219 @@
---
defaults:
defaults: &defaults
working_directory: '/go/src/github.com/influxdata/telegraf'
environment:
GOFLAGS: -p=8
go-1_13: &go-1_13
docker:
- image: 'quay.io/influxdb/telegraf-ci:1.13.11'
go-1_14: &go-1_14
docker:
- image: 'quay.io/influxdb/telegraf-ci:1.14.3'
mac: &mac
macos:
xcode: 11.3.1
working_directory: '~/go/src/github.com/influxdata/telegraf'
environment:
HOMEBREW_NO_AUTO_UPDATE: 1
GOFLAGS: -p=8
version: 2
jobs:
deps:
<<: [ *defaults, *go-1_14 ]
steps:
- checkout
- restore_cache:
key: go-mod-v1-{{ checksum "go.sum" }}
- run: 'make deps'
- run: 'make tidy'
- save_cache:
name: 'go module cache'
key: go-mod-v1-{{ checksum "go.sum" }}
paths:
- '/go/pkg/mod'
- persist_to_workspace:
root: '/go'
paths:
- '*'
macdeps:
<<: [ *mac ]
steps:
- checkout
- restore_cache:
key: mac-go-mod-v1-{{ checksum "go.sum" }}
- run: 'brew install go@1.13'
- run: 'make deps'
- run: 'make tidy'
- save_cache:
name: 'go module cache'
key: mac-go-mod-v1-{{ checksum "go.sum" }}
paths:
- '~/go/pkg/mod'
- '/usr/local/Cellar/go'
- '/usr/local/bin/go'
- '/usr/local/bin/gofmt'
- persist_to_workspace:
root: '/'
paths:
- 'usr/local/bin/go'
- 'usr/local/Cellar/go'
- 'usr/local/bin/gofmt'
- 'Users/distiller/go'
test-go-1.13:
<<: [ *defaults, *go-1_13 ]
steps:
- attach_workspace:
at: '/go'
- run: 'make'
- run: 'make test'
test-go-1.13-386:
<<: [ *defaults, *go-1_13 ]
steps:
- attach_workspace:
at: '/go'
- run: 'GOARCH=386 make'
- run: 'GOARCH=386 make test'
test-go-1.14:
<<: [ *defaults, *go-1_14 ]
steps:
- attach_workspace:
at: '/go'
- run: 'make'
- run: 'make check'
- run: 'make check-deps'
- run: 'make test'
test-go-1.14-386:
<<: [ *defaults, *go-1_14 ]
steps:
- attach_workspace:
at: '/go'
- run: 'GOARCH=386 make'
- run: 'GOARCH=386 make check'
- run: 'GOARCH=386 make test'
test-go-1.13-darwin:
<<: [ *mac ]
steps:
- attach_workspace:
at: '/'
- run: 'make'
- run: 'make check'
- run: 'make test'
package:
<<: [ *defaults, *go-1_14 ]
steps:
- attach_workspace:
at: '/go'
- run: 'make package'
- store_artifacts:
path: './build'
destination: 'build'
release:
<<: [ *defaults, *go-1_14 ]
steps:
- attach_workspace:
at: '/go'
- run: 'make package-release'
- store_artifacts:
path: './build'
destination: 'build'
nightly:
<<: [ *defaults, *go-1_14 ]
steps:
- attach_workspace:
at: '/go'
- run: 'make package-nightly'
- store_artifacts:
path: './build'
destination: 'build'
workflows:
version: 2
check:
jobs:
- 'macdeps':
filters:
tags:
only: /.*/
- 'deps':
filters:
tags:
only: /.*/
- 'test-go-1.13':
requires:
- 'deps'
filters:
tags:
only: /.*/
- 'test-go-1.13-386':
requires:
- 'deps'
filters:
tags:
only: /.*/
- 'test-go-1.14':
requires:
- 'deps'
filters:
tags:
only: /.*/
- 'test-go-1.14-386':
requires:
- 'deps'
filters:
tags:
only: /.*/
- 'test-go-1.13-darwin':
requires:
- 'macdeps'
filters:
tags: # only runs on tags if you specify this filter
only: /.*/
- 'package':
requires:
- 'test-go-1.13'
- 'test-go-1.13-386'
- 'test-go-1.14'
- 'test-go-1.14-386'
- 'release':
requires:
- 'test-go-1.13'
- 'test-go-1.13-386'
- 'test-go-1.14'
- 'test-go-1.14-386'
filters:
tags:
only: /.*/
branches:
ignore: /.*/
nightly:
jobs:
- 'deps'
- 'test-go-1.13':
requires:
- 'deps'
- 'test-go-1.13-386':
requires:
- 'deps'
- 'test-go-1.14':
requires:
- 'deps'
- 'test-go-1.14-386':
requires:
- 'deps'
- 'nightly':
requires:
- 'test-go-1.13'
- 'test-go-1.13-386'
- 'test-go-1.14'
- 'test-go-1.14-386'
triggers:
- schedule:
cron: "0 7 * * *"
filters:
branches:
only:
- master

5
.gitattributes vendored Normal file
View File

@ -0,0 +1,5 @@
CHANGELOG.md merge=union
README.md merge=union
go.sum merge=union
plugins/inputs/all/all.go merge=union
plugins/outputs/all/all.go merge=union

45
.github/ISSUE_TEMPLATE/Bug_report.md vendored Normal file
View File

@ -0,0 +1,45 @@
---
name: Bug report
about: Create a report to help us improve
---
<!--
Please redirect any questions about Telegraf usage to the InfluxData Community
site: https://community.influxdata.com
Check the documentation for the related plugin including the troubleshooting
section if available.
-->
### Relevant telegraf.conf:
<!-- Place config in the toml code section. -->
```toml
```
### System info:
<!-- Include Telegraf version, operating system, and other relevant details -->
### Docker
<!-- If your bug involves third party dependencies or services, it can be very helpful to provide a Dockerfile or docker-compose.yml that reproduces the environment you're testing against -->
### Steps to reproduce:
<!-- Describe the steps to reproduce the bug. -->
1. ...
2. ...
### Expected behavior:
<!-- Describe what you expected to happen when you performed the above steps. -->
### Actual behavior:
<!-- Describe what actually happened when you performed the above steps. -->
### Additional info:
<!-- Include gist of relevant config, logs, etc. -->

View File

@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project
---
## Feature Request
Opening a feature request kicks off a discussion.
### Proposal:
### Current behavior:
### Desired behavior:
### Use case: <!-- [Why is this important (helps with prioritizing requests)] -->

5
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,5 @@
### Required for all PRs:
- [ ] Signed [CLA](https://influxdata.com/community/cla/).
- [ ] Associated README.md updated.
- [ ] Has appropriate unit tests.

8
.gitignore vendored
View File

@ -1,3 +1,5 @@
tivan
.vagrant
telegraf
/build
/telegraf
/telegraf.exe
/telegraf.gz
/vendor

File diff suppressed because it is too large Load Diff

View File

@ -1,293 +1,76 @@
## Sign the CLA
### Contributing
Before we can merge a pull request, you will need to sign the CLA,
which can be found [on our website](http://influxdb.com/community/cla.html)
1. [Sign the CLA][cla].
1. Open a [new issue][] to discuss the changes you would like to make. This is
not strictly required but it may help reduce the amount of rework you need
to do later.
1. Make changes or write plugin using the guidelines in the following
documents:
- [Input Plugins][inputs]
- [Processor Plugins][processors]
- [Aggregator Plugins][aggregators]
- [Output Plugins][outputs]
1. Ensure you have added proper unit tests and documentation.
1. Open a new [pull request][].
## Plugins
#### Contributing an External Plugin *(experimental)*
Input plugins written for internal Telegraf can be run as externally-compiled plugins through the [Execd Input Plugin](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/execd) without having to change the plugin code.
This section is for developers who want to create new collection plugins.
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.
Follow the guidelines of how to integrate your plugin with the [Execd Go Shim](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/execd/shim) to easily compile it as a separate app and run it from the inputs.execd plugin.
Plugin authorship is kept as simple as possible to promote people to develop
and submit new plugins.
#### Security Vulnerability Reporting
InfluxData takes security and our users' trust very seriously. If you believe you have found a security issue in any of our
open source projects, please responsibly disclose it by contacting security@influxdata.com. More details about
security vulnerability reporting,
including our GPG key, [can be found here](https://www.influxdata.com/how-to-report-security-vulnerabilities/).
### Plugin Guidelines
### GoDoc
* A plugin must conform to the `plugins.Plugin` interface.
* 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 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.
Public interfaces for inputs, outputs, processors, aggregators, metrics,
and the accumulator can be found in the GoDoc:
### Plugin interface
[![GoDoc](https://godoc.org/github.com/influxdata/telegraf?status.svg)](https://godoc.org/github.com/influxdata/telegraf)
```go
type Plugin interface {
SampleConfig() string
Description() string
Gather(Accumulator) error
}
### Common development tasks
type Accumulator interface {
Add(measurement string,
value interface{},
tags map[string]string,
timestamp ...time.Time)
AddFields(measurement string,
fields map[string]interface{},
tags map[string]string,
timestamp ...time.Time)
}
```
**Adding a dependency:**
### Accumulator
Telegraf uses Go modules. Assuming you can already build the project, run this in the telegraf directory:
The way that a plugin emits metrics is by interacting with the Accumulator.
1. `go get github.com/[dependency]/[new-package]`
The `Add` function takes 3 arguments:
* **measurement**: A string description of the metric. For instance `bytes_read` or `faults`.
* **value**: A value for the metric. This accepts 5 different types of value:
* **int**: The most common type. All int types are accepted but favor using `int64`
Useful for counters, etc.
* **float**: Favor `float64`, useful for gauges, percentages, etc.
* **bool**: `true` or `false`, useful to indicate the presence of a state. `light_on`, etc.
* **string**: Typically used to indicate a message, or some kind of freeform information.
* **time.Time**: Useful for indicating when a state last occurred, for instance `light_on_since`.
* **tags**: This is a map of strings to strings to describe the where or who
about the metric. For instance, the `net` plugin adds a tag named `"interface"`
set to the name of the network interface, like `"eth0"`.
**Unit Tests:**
The `AddFieldsWithTime` allows multiple values for a point to be passed. The values
used are the same type profile as **value** above. The **timestamp** argument
allows a point to be registered as having occurred at an arbitrary time.
Let's say you've written a plugin that emits metrics about processes on the current host.
```go
type Process struct {
CPUTime float64
MemoryBytes int64
PID int
}
func Gather(acc plugins.Accumulator) error {
for _, process := range system.Processes() {
tags := map[string]string {
"pid": fmt.Sprintf("%d", process.Pid),
}
acc.Add("cpu", process.CPUTime, tags, time.Now())
acc.Add("memory", process.MemoryBytes, tags, time.Now())
}
}
```
### Plugin Example
```go
package simple
// simple.go
import "github.com/influxdb/telegraf/plugins"
type Simple struct {
Ok bool
}
func (s *Simple) Description() string {
return "a demo plugin"
}
func (s *Simple) SampleConfig() string {
return "ok = true # indicate if everything is fine"
}
func (s *Simple) Gather(acc plugins.Accumulator) error {
if s.Ok {
acc.Add("state", "pretty good", nil)
} else {
acc.Add("state", "not great", nil)
}
return nil
}
func init() {
plugins.Add("simple", func() plugins.Plugin { return &Simple{} })
}
```
## Service Plugins
This section is for developers who want to create new "service" collection
plugins. A service plugin differs from a regular plugin in that it operates
a background service while Telegraf is running. One example would be the `statsd`
plugin, which operates a statsd server.
Service Plugins are substantially more complicated than a regular plugin, as they
will require threads and locks to verify data integrity. Service Plugins should
be avoided unless there is no way to create their behavior with a regular plugin.
Their interface is quite similar to a regular plugin, with the addition of `Start()`
and `Stop()` methods.
### Service Plugin Guidelines
* Same as the `Plugin` guidelines, except that they must conform to the
`plugins.ServicePlugin` interface.
### Service Plugin interface
```go
type ServicePlugin interface {
SampleConfig() string
Description() string
Gather(Accumulator) error
Start() error
Stop()
}
```
## Outputs
This section is for developers who want to create a new output sink. Outputs
are created in a similar manner as collection plugins, and their interface has
similar constructs.
### Output Guidelines
* An output must conform to the `outputs.Output` interface.
* Outputs should call `outputs.Add` in their `init` function to register themselves.
See below for a quick example.
* To be available within Telegraf itself, plugins must add themselves to the
`github.com/influxdb/telegraf/outputs/all/all.go` file.
* The `SampleConfig` function should return valid toml that describes how the
output can be configured. This is include in `telegraf -sample-config`.
* The `Description` function should say in one line what this output does.
### Output interface
```go
type Output interface {
Connect() error
Close() error
Description() string
SampleConfig() string
Write(points []*client.Point) error
}
```
### Output Example
```go
package simpleoutput
// simpleoutput.go
import "github.com/influxdb/telegraf/outputs"
type Simple struct {
Ok bool
}
func (s *Simple) Description() string {
return "a demo output"
}
func (s *Simple) SampleConfig() string {
return "url = localhost"
}
func (s *Simple) Connect() error {
// Make a connection to the URL here
return nil
}
func (s *Simple) Close() error {
// Close connection to the URL here
return nil
}
func (s *Simple) Write(points []*client.Point) error {
for _, pt := range points {
// write `pt` to the output sink here
}
return nil
}
func init() {
outputs.Add("simpleoutput", func() outputs.Output { return &Simple{} })
}
Before opening a pull request you should run the linter checks and
the short tests.
```
## Service Outputs
This section is for developers who want to create new "service" output. A
service output differs from a regular output in that it operates a background service
while Telegraf is running. One example would be the `prometheus_client` output,
which operates an HTTP server.
Their interface is quite similar to a regular output, with the addition of `Start()`
and `Stop()` methods.
### Service Output Guidelines
* Same as the `Output` guidelines, except that they must conform to the
`plugins.ServiceOutput` interface.
### Service Output interface
```go
type ServiceOutput interface {
Connect() error
Close() error
Description() string
SampleConfig() string
Write(points []*client.Point) error
Start() error
Stop()
}
make check
make test
```
## Unit Tests
**Execute integration tests:**
### Execute short tests
(Optional)
execute `make test-short`
Running the integration tests requires several docker containers to be
running. You can start the containers with:
```
docker-compose up
```
### Execute long tests
And run the full test suite with:
```
make test-all
```
As Telegraf collects metrics from several third-party services it becomes a
difficult task to mock each service as some of them have complicated protocols
which would take some time to replicate.
Use `make docker-kill` to stop the containers.
To overcome this situation we've decided to use docker containers to provide a
fast and reproducible environment to test those services which require it.
For other situations
(i.e: https://github.com/influxdb/telegraf/blob/master/plugins/redis/redis_test.go )
a simple mock will suffice.
To execute Telegraf tests follow these simple steps:
- Install docker following [these](https://docs.docker.com/installation/)
instructions
- execute `make test`
**OSX users**: you will need to install `boot2docker` or `docker-machine`.
The Makefile will assume that you have a `docker-machine` box called `default` to
get the IP address.
### Unit test troubleshooting
Try cleaning up your test environment by executing `make docker-kill` and
re-running
[cla]: https://www.influxdata.com/legal/cla/
[new issue]: https://github.com/influxdata/telegraf/issues/new/choose
[pull request]: https://github.com/influxdata/telegraf/compare
[inputs]: /docs/INPUTS.md
[processors]: /docs/PROCESSORS.md
[aggregators]: /docs/AGGREGATORS.md
[outputs]: /docs/OUTPUTS.md

16
Dockerfile Normal file
View File

@ -0,0 +1,16 @@
# Copy of scripts/stretch.docker
FROM golang:1.13.8 as builder
WORKDIR /go/src/github.com/influxdata/telegraf
COPY . /go/src/github.com/influxdata/telegraf
RUN make go-install
FROM buildpack-deps:stretch-curl
COPY --from=builder /go/bin/* /usr/bin/
COPY etc/telegraf.conf /etc/telegraf/telegraf.conf
EXPOSE 8125/udp 8092/udp 8094
COPY scripts/docker-entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["telegraf"]

9
EXTERNAL_PLUGINS.md Normal file
View File

@ -0,0 +1,9 @@
# External Plugins
This is a list of plugins that can be compiled outside of Telegraf and used via the execd input.
Pull requests welcome.
## Inputs
- [rand](https://github.com/ssoroka/rand) - Generate random numbers
- [twitter](https://github.com/inabagumi/twitter-telegraf-plugin) - Gather account information from Twitter accounts

277
Godeps/Godeps.json generated
View File

@ -1,277 +0,0 @@
{
"ImportPath": "github.com/influxdb/telegraf",
"GoVersion": "go1.5.1",
"Deps": [
{
"ImportPath": "bitbucket.org/ww/goautoneg",
"Comment": "null-5",
"Rev": "75cd24fc2f2c2a2088577d12123ddee5f54e0675"
},
{
"ImportPath": "git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git",
"Comment": "v0.9.1-14-g546c47a",
"Rev": "546c47a6d0e9492e77f6f37473d59c36a708e08b"
},
{
"ImportPath": "github.com/Shopify/sarama",
"Comment": "v1.4.3-45-g5b18996",
"Rev": "5b18996ef1cd555a60562ae4c5d7843ae137e12d"
},
{
"ImportPath": "github.com/Sirupsen/logrus",
"Comment": "v0.8.6-7-g9c060de",
"Rev": "9c060de643590dae45da9d7c26276463bfc46fa0"
},
{
"ImportPath": "github.com/amir/raidman",
"Rev": "6a8e089bbe32e6b907feae5ba688841974b3c339"
},
{
"ImportPath": "github.com/armon/go-metrics",
"Rev": "b2d95e5291cdbc26997d1301a5e467ecbb240e25"
},
{
"ImportPath": "github.com/beorn7/perks/quantile",
"Rev": "b965b613227fddccbfffe13eae360ed3fa822f8d"
},
{
"ImportPath": "github.com/boltdb/bolt",
"Comment": "v1.0-117-g0f053fa",
"Rev": "0f053fabc06119583d61937a0a06ef0ba0f1b301"
},
{
"ImportPath": "github.com/cenkalti/backoff",
"Rev": "4dc77674aceaabba2c7e3da25d4c823edfb73f99"
},
{
"ImportPath": "github.com/dancannon/gorethink/encoding",
"Comment": "v1.x.x-1-g786f12a",
"Rev": "786f12ae730ea93485c4eb2c44b3ede6e1e8745f"
},
{
"ImportPath": "github.com/dancannon/gorethink/ql2",
"Comment": "v1.x.x-1-g786f12a",
"Rev": "786f12ae730ea93485c4eb2c44b3ede6e1e8745f"
},
{
"ImportPath": "github.com/dancannon/gorethink/types",
"Comment": "v1.x.x-1-g786f12a",
"Rev": "786f12ae730ea93485c4eb2c44b3ede6e1e8745f"
},
{
"ImportPath": "github.com/eapache/go-resiliency/breaker",
"Comment": "v1.0.0-1-ged0319b",
"Rev": "ed0319b32e66e3295db52695ba3ee493e823fbfe"
},
{
"ImportPath": "github.com/eapache/queue",
"Comment": "v1.0.2",
"Rev": "ded5959c0d4e360646dc9e9908cff48666781367"
},
{
"ImportPath": "github.com/fsouza/go-dockerclient",
"Rev": "ef410296f87750305e1e1acf9ad2ba3833dcb004"
},
{
"ImportPath": "github.com/go-sql-driver/mysql",
"Comment": "v1.2-118-g3dd7008",
"Rev": "3dd7008ac1529aca1bcd8a9db75228a71ba23cac"
},
{
"ImportPath": "github.com/gogo/protobuf/proto",
"Rev": "cabd153b69f71bab8b89fd667a2d9bb28c92ceb4"
},
{
"ImportPath": "github.com/golang/protobuf/proto",
"Rev": "73aaaa9eb61d74fbf7e256ca586a3a565b308eea"
},
{
"ImportPath": "github.com/golang/snappy",
"Rev": "723cc1e459b8eea2dea4583200fd60757d40097a"
},
{
"ImportPath": "github.com/gonuts/go-shellquote",
"Rev": "e842a11b24c6abfb3dd27af69a17f482e4b483c2"
},
{
"ImportPath": "github.com/hashicorp/go-msgpack/codec",
"Rev": "fa3f63826f7c23912c15263591e65d54d080b458"
},
{
"ImportPath": "github.com/hashicorp/raft",
"Rev": "9b586e29edf1ed085b11da7772479ee45c433996"
},
{
"ImportPath": "github.com/hashicorp/raft-boltdb",
"Rev": "d1e82c1ec3f15ee991f7cc7ffd5b67ff6f5bbaee"
},
{
"ImportPath": "github.com/influxdb/influxdb",
"Comment": "v0.9.4-rc1-922-gb0e9f7e",
"Rev": "b0e9f7e844225b05abf9f4455229490f99348ac4"
},
{
"ImportPath": "github.com/lib/pq",
"Comment": "go1.0-cutoff-59-gb269bd0",
"Rev": "b269bd035a727d6c1081f76e7a239a1b00674c40"
},
{
"ImportPath": "github.com/matttproud/golang_protobuf_extensions/pbutil",
"Rev": "fc2b8d3a73c4867e51861bbdd5ae3c1f0869dd6a"
},
{
"ImportPath": "github.com/mreiferson/go-snappystream",
"Comment": "v0.2.3",
"Rev": "028eae7ab5c4c9e2d1cb4c4ca1e53259bbe7e504"
},
{
"ImportPath": "github.com/naoina/go-stringutil",
"Rev": "360db0db4b01d34e12a2ec042c09e7d37fece761"
},
{
"ImportPath": "github.com/naoina/toml",
"Rev": "5811abcabb29d6af0fdf060f96d328962bd3cd5e"
},
{
"ImportPath": "github.com/nsqio/go-nsq",
"Comment": "v1.0.5-6-g2118015",
"Rev": "2118015c120962edc5d03325c680daf3163a8b5f"
},
{
"ImportPath": "github.com/pborman/uuid",
"Rev": "ca53cad383cad2479bbba7f7a1a05797ec1386e4"
},
{
"ImportPath": "github.com/prometheus/client_golang/prometheus",
"Comment": "0.7.0-52-ge51041b",
"Rev": "e51041b3fa41cece0dca035740ba6411905be473"
},
{
"ImportPath": "github.com/prometheus/client_model/go",
"Comment": "model-0.0.2-12-gfa8ad6f",
"Rev": "fa8ad6fec33561be4280a8f0514318c79d7f6cb6"
},
{
"ImportPath": "github.com/prometheus/common/expfmt",
"Rev": "369ec0491ce7be15431bd4f23b7fa17308f94190"
},
{
"ImportPath": "github.com/prometheus/common/model",
"Rev": "369ec0491ce7be15431bd4f23b7fa17308f94190"
},
{
"ImportPath": "github.com/prometheus/procfs",
"Rev": "454a56f35412459b5e684fd5ec0f9211b94f002a"
},
{
"ImportPath": "github.com/samuel/go-zookeeper/zk",
"Rev": "5bb5cfc093ad18a28148c578f8632cfdb4d802e4"
},
{
"ImportPath": "github.com/shirou/gopsutil/cpu",
"Comment": "1.0.0-208-g759e96e",
"Rev": "759e96ebaffb01c3cba0e8b129ef29f56507b323"
},
{
"ImportPath": "github.com/shirou/gopsutil/disk",
"Comment": "1.0.0-208-g759e96e",
"Rev": "759e96ebaffb01c3cba0e8b129ef29f56507b323"
},
{
"ImportPath": "github.com/shirou/gopsutil/docker",
"Comment": "1.0.0-208-g759e96e",
"Rev": "759e96ebaffb01c3cba0e8b129ef29f56507b323"
},
{
"ImportPath": "github.com/shirou/gopsutil/host",
"Comment": "1.0.0-208-g759e96e",
"Rev": "759e96ebaffb01c3cba0e8b129ef29f56507b323"
},
{
"ImportPath": "github.com/shirou/gopsutil/load",
"Comment": "1.0.0-208-g759e96e",
"Rev": "759e96ebaffb01c3cba0e8b129ef29f56507b323"
},
{
"ImportPath": "github.com/shirou/gopsutil/mem",
"Comment": "1.0.0-208-g759e96e",
"Rev": "759e96ebaffb01c3cba0e8b129ef29f56507b323"
},
{
"ImportPath": "github.com/shirou/gopsutil/net",
"Comment": "1.0.0-208-g759e96e",
"Rev": "759e96ebaffb01c3cba0e8b129ef29f56507b323"
},
{
"ImportPath": "github.com/shirou/gopsutil/process",
"Comment": "1.0.0-208-g759e96e",
"Rev": "759e96ebaffb01c3cba0e8b129ef29f56507b323"
},
{
"ImportPath": "github.com/streadway/amqp",
"Rev": "f4879ba28fffbb576743b03622a9ff20461826b2"
},
{
"ImportPath": "github.com/stretchr/objx",
"Rev": "cbeaeb16a013161a98496fad62933b1d21786672"
},
{
"ImportPath": "github.com/stretchr/testify/assert",
"Comment": "v1.0-21-gf552045",
"Rev": "f5520455607c0233cb6d7b056f71b22c1d265ef1"
},
{
"ImportPath": "github.com/stretchr/testify/mock",
"Comment": "v1.0-21-gf552045",
"Rev": "f5520455607c0233cb6d7b056f71b22c1d265ef1"
},
{
"ImportPath": "github.com/stretchr/testify/require",
"Comment": "v1.0-21-gf552045",
"Rev": "f5520455607c0233cb6d7b056f71b22c1d265ef1"
},
{
"ImportPath": "github.com/stretchr/testify/suite",
"Comment": "v1.0-21-gf552045",
"Rev": "f5520455607c0233cb6d7b056f71b22c1d265ef1"
},
{
"ImportPath": "github.com/wvanbergen/kafka/consumergroup",
"Rev": "b0e5c20a0d7c3ccfd37a5965ae30a3a0fd15945d"
},
{
"ImportPath": "github.com/wvanbergen/kazoo-go",
"Rev": "02a3868e9b87153285439cd27a39c0a2984a13af"
},
{
"ImportPath": "golang.org/x/crypto/bcrypt",
"Rev": "173ce04bfaf66c7bb0fa9d5c0bfd93e773909dbd"
},
{
"ImportPath": "golang.org/x/crypto/blowfish",
"Rev": "173ce04bfaf66c7bb0fa9d5c0bfd93e773909dbd"
},
{
"ImportPath": "golang.org/x/net/websocket",
"Rev": "db8e4de5b2d6653f66aea53094624468caad15d2"
},
{
"ImportPath": "gopkg.in/dancannon/gorethink.v1",
"Comment": "v1.x.x",
"Rev": "8aca6ba2cc6e873299617d730fac0d7f6593113a"
},
{
"ImportPath": "gopkg.in/fatih/pool.v2",
"Rev": "cba550ebf9bce999a02e963296d4bc7a486cb715"
},
{
"ImportPath": "gopkg.in/mgo.v2",
"Comment": "r2015.06.03-3-g3569c88",
"Rev": "3569c88678d88179dcbd68d02ab081cbca3cd4d0"
},
{
"ImportPath": "gopkg.in/yaml.v2",
"Rev": "7ad95dd0798a40da1ccdff6dff35fd177b5edf40"
}
]
}

5
Godeps/Readme generated
View File

@ -1,5 +0,0 @@
This directory tree is generated automatically by godep.
Please do not edit.
See https://github.com/tools/godep for more information.

2
Godeps/_workspace/.gitignore generated vendored
View File

@ -1,2 +0,0 @@
/pkg
/bin

View File

@ -1,13 +0,0 @@
include $(GOROOT)/src/Make.inc
TARG=bitbucket.org/ww/goautoneg
GOFILES=autoneg.go
include $(GOROOT)/src/Make.pkg
format:
gofmt -w *.go
docs:
gomake clean
godoc ${TARG} > README.txt

View File

@ -1,67 +0,0 @@
PACKAGE
package goautoneg
import "bitbucket.org/ww/goautoneg"
HTTP Content-Type Autonegotiation.
The functions in this package implement the behaviour specified in
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
Copyright (c) 2011, Open Knowledge Foundation Ltd.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
Neither the name of the Open Knowledge Foundation Ltd. nor the
names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
FUNCTIONS
func Negotiate(header string, alternatives []string) (content_type string)
Negotiate the most appropriate content_type given the accept header
and a list of alternatives.
func ParseAccept(header string) (accept []Accept)
Parse an Accept Header string returning a sorted list
of clauses
TYPES
type Accept struct {
Type, SubType string
Q float32
Params map[string]string
}
Structure to represent a clause in an HTTP Accept Header
SUBDIRECTORIES
.hg

View File

@ -1,162 +0,0 @@
/*
HTTP Content-Type Autonegotiation.
The functions in this package implement the behaviour specified in
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
Copyright (c) 2011, Open Knowledge Foundation Ltd.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
Neither the name of the Open Knowledge Foundation Ltd. nor the
names of its contributors may be used to endorse or promote
products derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package goautoneg
import (
"sort"
"strconv"
"strings"
)
// Structure to represent a clause in an HTTP Accept Header
type Accept struct {
Type, SubType string
Q float64
Params map[string]string
}
// For internal use, so that we can use the sort interface
type accept_slice []Accept
func (accept accept_slice) Len() int {
slice := []Accept(accept)
return len(slice)
}
func (accept accept_slice) Less(i, j int) bool {
slice := []Accept(accept)
ai, aj := slice[i], slice[j]
if ai.Q > aj.Q {
return true
}
if ai.Type != "*" && aj.Type == "*" {
return true
}
if ai.SubType != "*" && aj.SubType == "*" {
return true
}
return false
}
func (accept accept_slice) Swap(i, j int) {
slice := []Accept(accept)
slice[i], slice[j] = slice[j], slice[i]
}
// Parse an Accept Header string returning a sorted list
// of clauses
func ParseAccept(header string) (accept []Accept) {
parts := strings.Split(header, ",")
accept = make([]Accept, 0, len(parts))
for _, part := range parts {
part := strings.Trim(part, " ")
a := Accept{}
a.Params = make(map[string]string)
a.Q = 1.0
mrp := strings.Split(part, ";")
media_range := mrp[0]
sp := strings.Split(media_range, "/")
a.Type = strings.Trim(sp[0], " ")
switch {
case len(sp) == 1 && a.Type == "*":
a.SubType = "*"
case len(sp) == 2:
a.SubType = strings.Trim(sp[1], " ")
default:
continue
}
if len(mrp) == 1 {
accept = append(accept, a)
continue
}
for _, param := range mrp[1:] {
sp := strings.SplitN(param, "=", 2)
if len(sp) != 2 {
continue
}
token := strings.Trim(sp[0], " ")
if token == "q" {
a.Q, _ = strconv.ParseFloat(sp[1], 32)
} else {
a.Params[token] = strings.Trim(sp[1], " ")
}
}
accept = append(accept, a)
}
slice := accept_slice(accept)
sort.Sort(slice)
return
}
// Negotiate the most appropriate content_type given the accept header
// and a list of alternatives.
func Negotiate(header string, alternatives []string) (content_type string) {
asp := make([][]string, 0, len(alternatives))
for _, ctype := range alternatives {
asp = append(asp, strings.SplitN(ctype, "/", 2))
}
for _, clause := range ParseAccept(header) {
for i, ctsp := range asp {
if clause.Type == ctsp[0] && clause.SubType == ctsp[1] {
content_type = alternatives[i]
return
}
if clause.Type == ctsp[0] && clause.SubType == "*" {
content_type = alternatives[i]
return
}
if clause.Type == "*" && clause.SubType == "*" {
content_type = alternatives[i]
return
}
}
}
return
}

View File

@ -1,36 +0,0 @@
# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
*.a
*.so
# Folders
_obj
_test
# Architecture specific extensions/prefixes
*.[568vq]
[568vq].out
*.cgo1.go
*.cgo2.c
_cgo_defun.c
_cgo_gotypes.go
_cgo_export.*
_testmain.go
*.exe
*.msg
*.lok
samples/trivial
samples/trivial2
samples/sample
samples/reconnect
samples/ssl
samples/custom_store
samples/simple
samples/stdinpub
samples/stdoutsub
samples/routing

View File

@ -1,69 +0,0 @@
Contributing to Paho
====================
Thanks for your interest in this project.
Project description:
--------------------
The Paho project has been created to provide scalable open-source implementations of open and standard messaging protocols aimed at new, existing, and emerging applications for Machine-to-Machine (M2M) and Internet of Things (IoT).
Paho reflects the inherent physical and cost constraints of device connectivity. Its objectives include effective levels of decoupling between devices and applications, designed to keep markets open and encourage the rapid growth of scalable Web and Enterprise middleware and applications. Paho is being kicked off with MQTT publish/subscribe client implementations for use on embedded platforms, along with corresponding server support as determined by the community.
- https://projects.eclipse.org/projects/technology.paho
Developer resources:
--------------------
Information regarding source code management, builds, coding standards, and more.
- https://projects.eclipse.org/projects/technology.paho/developer
Contributor License Agreement:
------------------------------
Before your contribution can be accepted by the project, you need to create and electronically sign the Eclipse Foundation Contributor License Agreement (CLA).
- http://www.eclipse.org/legal/CLA.php
Contributing Code:
------------------
The Go client uses git with Gerrit for code review, use the following URLs for Gerrit access;
ssh://<username>@git.eclipse.org:29418/paho/org.eclipse.paho.mqtt.golang
Configure a remote called review to push your changes to;
git config remote.review.url ssh://<username>@git.eclipse.org:29418/paho/org.eclipse.paho.mqtt.golang
git config remote.review.push HEAD:refs/for/<branch>
When you have made and committed a change you can push it to Gerrit for review with;
git push review
See https://wiki.eclipse.org/Gerrit for more details on how Gerrit is used in Eclipse, https://wiki.eclipse.org/Gerrit#Gerrit_Code_Review_Cheatsheet has some particularly useful information.
Git commit messages should follow the style described here;
http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
Contact:
--------
Contact the project developers via the project's "dev" list.
- https://dev.eclipse.org/mailman/listinfo/paho-dev
Search for bugs:
----------------
This project uses Bugzilla to track ongoing development and issues.
- https://bugs.eclipse.org/bugs/buglist.cgi?product=Paho&component=MQTT-Go
Create a new bug:
-----------------
Be sure to search for existing bugs before you create another one. Remember that contributions are always welcome!
- https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Paho

View File

@ -1,15 +0,0 @@
Eclipse Distribution License - v 1.0
Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of the Eclipse Foundation, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -1,87 +0,0 @@
Eclipse Public License - v 1.0
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
1. DEFINITIONS
"Contribution" means:
a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
b) in the case of each subsequent Contributor:
i) changes to the Program, and
ii) additions to the Program;
where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
"Contributor" means any person or entity that distributes the Program.
"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
"Program" means the Contributions distributed in accordance with this Agreement.
"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
2. GRANT OF RIGHTS
a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
3. REQUIREMENTS
A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
a) it complies with the terms and conditions of this Agreement; and
b) its license agreement:
i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
When the Program is made available in source code form:
a) it must be made available under this Agreement; and
b) a copy of this Agreement must be included with each copy of the Program.
Contributors may not remove or alter any copyright notices contained within the Program.
Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
4. COMMERCIAL DISTRIBUTION
Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
5. NO WARRANTY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
6. DISCLAIMER OF LIABILITY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
7. GENERAL
If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.

View File

@ -1,62 +0,0 @@
Eclipse Paho MQTT Go client
===========================
This repository contains the source code for the [Eclipse Paho](http://eclipse.org/paho) MQTT Go client library.
This code builds a library which enable applications to connect to an [MQTT](http://mqtt.org) broker to publish messages, and to subscribe to topics and receive published messages.
This library supports a fully asynchronous mode of operation.
Installation and Build
----------------------
This client is designed to work with the standard Go tools, so installation is as easy as:
```
go get git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git
```
The client depends on Google's [websockets](http://godoc.org/code.google.com/p/go.net/websocket) package,
also easily installed with the command:
```
go get code.google.com/p/go.net/websocket
```
Usage and API
-------------
Detailed API documentation is available by using to godoc tool, or can be browsed online
using the [godoc.org](http://godoc.org/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git) service.
Make use of the library by importing it in your Go client source code. For example,
```
import MQTT "git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git"
```
Samples are available in the `/samples` directory for reference.
Runtime tracing
---------------
Tracing is enabled by assigning logs (from the Go log package) to the logging endpoints, ERROR, CRITICAL, WARN and DEBUG
Reporting bugs
--------------
Please report bugs under the "MQTT-Go" Component in [Eclipse Bugzilla](http://bugs.eclipse.org/bugs/) for the Paho Technology project. This is a very new library as of Q1 2014, so there are sure to be bugs.
More information
----------------
Discussion of the Paho clients takes place on the [Eclipse paho-dev mailing list](https://dev.eclipse.org/mailman/listinfo/paho-dev).
General questions about the MQTT protocol are discussed in the [MQTT Google Group](https://groups.google.com/forum/?hl=en-US&fromgroups#!forum/mqtt).
There is much more information available via the [MQTT community site](http://mqtt.org).

View File

@ -1,41 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>About</title>
</head>
<body lang="EN-US">
<h2>About This Content</h2>
<p><em>December 9, 2013</em></p>
<h3>License</h3>
<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
indicated below, the Content is provided to you under the terms and conditions of the
Eclipse Public License Version 1.0 ("EPL") and Eclipse Distribution License Version 1.0 ("EDL").
A copy of the EPL is available at
<a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>
and a copy of the EDL is available at
<a href="http://www.eclipse.org/org/documents/edl-v10.php">http://www.eclipse.org/org/documents/edl-v10.php</a>.
For purposes of the EPL, "Program" will mean the Content.</p>
<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
being redistributed by another party ("Redistributor") and different terms and conditions may
apply to your use of any object code in the Content. Check the Redistributor's license that was
provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
indicated below, the terms and conditions of the EPL still apply to any source code in the Content
and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
<h3>Third Party Content</h3>
<p>The Content includes items that have been sourced from third parties as set out below. If you
did not receive this Content directly from the Eclipse Foundation, the following is provided
for informational purposes only, and you should look to the Redistributor's license for
terms and conditions of use.</p>
<p><em>
<strong>None</strong> <br><br>
<br><br>
</em></p>
</body></html>

View File

@ -1,517 +0,0 @@
/*
* Copyright (c) 2013 IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Seth Hoenig
* Allan Stockdill-Mander
* Mike Robertson
*/
// Package mqtt provides an MQTT v3.1.1 client library.
package mqtt
import (
"errors"
"fmt"
"git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets"
"net"
"sync"
"time"
)
// ClientInt is the interface definition for a Client as used by this
// library, the interface is primarily to allow mocking tests.
type ClientInt interface {
IsConnected() bool
Connect() Token
Disconnect(uint)
disconnect()
Publish(string, byte, bool, interface{}) Token
Subscribe(string, byte, MessageHandler) Token
SubscribeMultiple(map[string]byte, MessageHandler) Token
Unsubscribe(...string) Token
}
// Client is an MQTT v3.1.1 client for communicating
// with an MQTT server using non-blocking methods that allow work
// to be done in the background.
// An application may connect to an MQTT server using:
// A plain TCP socket
// A secure SSL/TLS socket
// A websocket
// To enable ensured message delivery at Quality of Service (QoS) levels
// described in the MQTT spec, a message persistence mechanism must be
// used. This is done by providing a type which implements the Store
// interface. For convenience, FileStore and MemoryStore are provided
// implementations that should be sufficient for most use cases. More
// information can be found in their respective documentation.
// Numerous connection options may be specified by configuring a
// and then supplying a ClientOptions type.
type Client struct {
sync.RWMutex
messageIds
conn net.Conn
ibound chan packets.ControlPacket
obound chan *PacketAndToken
oboundP chan *PacketAndToken
msgRouter *router
stopRouter chan bool
incomingPubChan chan *packets.PublishPacket
errors chan error
stop chan struct{}
persist Store
options ClientOptions
lastContact lastcontact
pingOutstanding bool
connected bool
workers sync.WaitGroup
}
// NewClient will create an MQTT v3.1.1 client with all of the options specified
// in the provided ClientOptions. The client must have the Start method called
// on it before it may be used. This is to make sure resources (such as a net
// connection) are created before the application is actually ready.
func NewClient(o *ClientOptions) *Client {
c := &Client{}
c.options = *o
if c.options.Store == nil {
c.options.Store = NewMemoryStore()
}
switch c.options.ProtocolVersion {
case 3, 4:
c.options.protocolVersionExplicit = true
default:
c.options.ProtocolVersion = 4
c.options.protocolVersionExplicit = false
}
c.persist = c.options.Store
c.connected = false
c.messageIds = messageIds{index: make(map[uint16]Token)}
c.msgRouter, c.stopRouter = newRouter()
c.msgRouter.setDefaultHandler(c.options.DefaultPublishHander)
return c
}
// IsConnected returns a bool signifying whether
// the client is connected or not.
func (c *Client) IsConnected() bool {
c.RLock()
defer c.RUnlock()
return c.connected
}
func (c *Client) setConnected(status bool) {
c.Lock()
defer c.Unlock()
c.connected = status
}
//ErrNotConnected is the error returned from function calls that are
//made when the client is not connected to a broker
var ErrNotConnected = errors.New("Not Connected")
// Connect will create a connection to the message broker
// If clean session is false, then a slice will
// be returned containing Receipts for all messages
// that were in-flight at the last disconnect.
// If clean session is true, then any existing client
// state will be removed.
func (c *Client) Connect() Token {
var err error
t := newToken(packets.Connect).(*ConnectToken)
DEBUG.Println(CLI, "Connect()")
go func() {
var rc byte
cm := newConnectMsgFromOptions(&c.options)
for _, broker := range c.options.Servers {
CONN:
DEBUG.Println(CLI, "about to write new connect msg")
c.conn, err = openConnection(broker, &c.options.TLSConfig, c.options.ConnectTimeout)
if err == nil {
DEBUG.Println(CLI, "socket connected to broker")
switch c.options.ProtocolVersion {
case 3:
DEBUG.Println(CLI, "Using MQTT 3.1 protocol")
cm.ProtocolName = "MQIsdp"
cm.ProtocolVersion = 3
default:
DEBUG.Println(CLI, "Using MQTT 3.1.1 protocol")
c.options.ProtocolVersion = 4
cm.ProtocolName = "MQTT"
cm.ProtocolVersion = 4
}
cm.Write(c.conn)
rc = c.connect()
if rc != packets.Accepted {
c.conn.Close()
c.conn = nil
//if the protocol version was explicitly set don't do any fallback
if c.options.protocolVersionExplicit {
ERROR.Println(CLI, "Connecting to", broker, "CONNACK was not CONN_ACCEPTED, but rather", packets.ConnackReturnCodes[rc])
continue
}
if c.options.ProtocolVersion == 4 {
DEBUG.Println(CLI, "Trying reconnect using MQTT 3.1 protocol")
c.options.ProtocolVersion = 3
goto CONN
}
}
break
} else {
ERROR.Println(CLI, err.Error())
WARN.Println(CLI, "failed to connect to broker, trying next")
rc = packets.ErrNetworkError
}
}
if c.conn == nil {
ERROR.Println(CLI, "Failed to connect to a broker")
t.returnCode = rc
if rc != packets.ErrNetworkError {
t.err = packets.ConnErrors[rc]
} else {
t.err = fmt.Errorf("%s : %s", packets.ConnErrors[rc], err)
}
t.flowComplete()
return
}
c.lastContact.update()
c.persist.Open()
c.obound = make(chan *PacketAndToken, 100)
c.oboundP = make(chan *PacketAndToken, 100)
c.ibound = make(chan packets.ControlPacket)
c.errors = make(chan error)
c.stop = make(chan struct{})
c.incomingPubChan = make(chan *packets.PublishPacket, 100)
c.msgRouter.matchAndDispatch(c.incomingPubChan, c.options.Order, c)
c.workers.Add(1)
go outgoing(c)
go alllogic(c)
c.connected = true
DEBUG.Println(CLI, "client is connected")
if c.options.OnConnect != nil {
go c.options.OnConnect(c)
}
if c.options.KeepAlive != 0 {
c.workers.Add(1)
go keepalive(c)
}
// Take care of any messages in the store
//var leftovers []Receipt
if c.options.CleanSession == false {
//leftovers = c.resume()
} else {
c.persist.Reset()
}
// Do not start incoming until resume has completed
c.workers.Add(1)
go incoming(c)
DEBUG.Println(CLI, "exit startClient")
t.flowComplete()
}()
return t
}
// internal function used to reconnect the client when it loses its connection
func (c *Client) reconnect() {
DEBUG.Println(CLI, "enter reconnect")
var rc byte = 1
var sleep uint = 1
var err error
for rc != 0 {
cm := newConnectMsgFromOptions(&c.options)
for _, broker := range c.options.Servers {
CONN:
DEBUG.Println(CLI, "about to write new connect msg")
c.conn, err = openConnection(broker, &c.options.TLSConfig, c.options.ConnectTimeout)
if err == nil {
DEBUG.Println(CLI, "socket connected to broker")
switch c.options.ProtocolVersion {
case 3:
DEBUG.Println(CLI, "Using MQTT 3.1 protocol")
cm.ProtocolName = "MQIsdp"
cm.ProtocolVersion = 3
default:
DEBUG.Println(CLI, "Using MQTT 3.1.1 protocol")
c.options.ProtocolVersion = 4
cm.ProtocolName = "MQTT"
cm.ProtocolVersion = 4
}
cm.Write(c.conn)
rc = c.connect()
if rc != packets.Accepted {
c.conn.Close()
c.conn = nil
//if the protocol version was explicitly set don't do any fallback
if c.options.protocolVersionExplicit {
ERROR.Println(CLI, "Connecting to", broker, "CONNACK was not Accepted, but rather", packets.ConnackReturnCodes[rc])
continue
}
if c.options.ProtocolVersion == 4 {
DEBUG.Println(CLI, "Trying reconnect using MQTT 3.1 protocol")
c.options.ProtocolVersion = 3
goto CONN
}
}
break
} else {
ERROR.Println(CLI, err.Error())
WARN.Println(CLI, "failed to connect to broker, trying next")
rc = packets.ErrNetworkError
}
}
if rc != 0 {
DEBUG.Println(CLI, "Reconnect failed, sleeping for", sleep, "seconds")
time.Sleep(time.Duration(sleep) * time.Second)
if sleep <= uint(c.options.MaxReconnectInterval.Seconds()) {
sleep *= 2
}
}
}
c.lastContact.update()
c.stop = make(chan struct{})
c.workers.Add(1)
go outgoing(c)
go alllogic(c)
c.setConnected(true)
DEBUG.Println(CLI, "client is reconnected")
if c.options.OnConnect != nil {
go c.options.OnConnect(c)
}
if c.options.KeepAlive != 0 {
c.workers.Add(1)
go keepalive(c)
}
c.workers.Add(1)
go incoming(c)
}
// This function is only used for receiving a connack
// when the connection is first started.
// This prevents receiving incoming data while resume
// is in progress if clean session is false.
func (c *Client) connect() byte {
DEBUG.Println(NET, "connect started")
ca, err := packets.ReadPacket(c.conn)
if err != nil {
ERROR.Println(NET, "connect got error", err)
//c.errors <- err
return packets.ErrNetworkError
}
msg := ca.(*packets.ConnackPacket)
if msg == nil || msg.FixedHeader.MessageType != packets.Connack {
ERROR.Println(NET, "received msg that was nil or not CONNACK")
} else {
DEBUG.Println(NET, "received connack")
}
return msg.ReturnCode
}
// Disconnect will end the connection with the server, but not before waiting
// the specified number of milliseconds to wait for existing work to be
// completed.
func (c *Client) Disconnect(quiesce uint) {
if !c.IsConnected() {
WARN.Println(CLI, "already disconnected")
return
}
DEBUG.Println(CLI, "disconnecting")
c.setConnected(false)
dm := packets.NewControlPacket(packets.Disconnect).(*packets.DisconnectPacket)
dt := newToken(packets.Disconnect)
c.oboundP <- &PacketAndToken{p: dm, t: dt}
// wait for work to finish, or quiesce time consumed
dt.WaitTimeout(time.Duration(quiesce) * time.Millisecond)
c.disconnect()
}
// ForceDisconnect will end the connection with the mqtt broker immediately.
func (c *Client) forceDisconnect() {
if !c.IsConnected() {
WARN.Println(CLI, "already disconnected")
return
}
c.setConnected(false)
c.conn.Close()
DEBUG.Println(CLI, "forcefully disconnecting")
c.disconnect()
}
func (c *Client) internalConnLost(err error) {
close(c.stop)
c.conn.Close()
c.workers.Wait()
if c.IsConnected() {
if c.options.OnConnectionLost != nil {
go c.options.OnConnectionLost(c, err)
}
if c.options.AutoReconnect {
go c.reconnect()
} else {
c.setConnected(false)
}
}
}
func (c *Client) disconnect() {
select {
case <-c.stop:
//someone else has already closed the channel, must be error
default:
close(c.stop)
}
c.conn.Close()
c.workers.Wait()
close(c.stopRouter)
DEBUG.Println(CLI, "disconnected")
c.persist.Close()
}
// Publish will publish a message with the specified QoS
// and content to the specified topic.
// Returns a read only channel used to track
// the delivery of the message.
func (c *Client) Publish(topic string, qos byte, retained bool, payload interface{}) Token {
token := newToken(packets.Publish).(*PublishToken)
DEBUG.Println(CLI, "enter Publish")
if !c.IsConnected() {
token.err = ErrNotConnected
token.flowComplete()
return token
}
pub := packets.NewControlPacket(packets.Publish).(*packets.PublishPacket)
pub.Qos = qos
pub.TopicName = topic
pub.Retain = retained
switch payload.(type) {
case string:
pub.Payload = []byte(payload.(string))
case []byte:
pub.Payload = payload.([]byte)
default:
token.err = errors.New("Unknown payload type")
token.flowComplete()
return token
}
DEBUG.Println(CLI, "sending publish message, topic:", topic)
c.obound <- &PacketAndToken{p: pub, t: token}
return token
}
// Subscribe starts a new subscription. Provide a MessageHandler to be executed when
// a message is published on the topic provided.
func (c *Client) Subscribe(topic string, qos byte, callback MessageHandler) Token {
token := newToken(packets.Subscribe).(*SubscribeToken)
DEBUG.Println(CLI, "enter Subscribe")
if !c.IsConnected() {
token.err = ErrNotConnected
token.flowComplete()
return token
}
sub := packets.NewControlPacket(packets.Subscribe).(*packets.SubscribePacket)
if err := validateTopicAndQos(topic, qos); err != nil {
token.err = err
return token
}
sub.Topics = append(sub.Topics, topic)
sub.Qoss = append(sub.Qoss, qos)
DEBUG.Println(sub.String())
if callback != nil {
c.msgRouter.addRoute(topic, callback)
}
token.subs = append(token.subs, topic)
c.oboundP <- &PacketAndToken{p: sub, t: token}
DEBUG.Println(CLI, "exit Subscribe")
return token
}
// SubscribeMultiple starts a new subscription for multiple topics. Provide a MessageHandler to
// be executed when a message is published on one of the topics provided.
func (c *Client) SubscribeMultiple(filters map[string]byte, callback MessageHandler) Token {
var err error
token := newToken(packets.Subscribe).(*SubscribeToken)
DEBUG.Println(CLI, "enter SubscribeMultiple")
if !c.IsConnected() {
token.err = ErrNotConnected
token.flowComplete()
return token
}
sub := packets.NewControlPacket(packets.Subscribe).(*packets.SubscribePacket)
if sub.Topics, sub.Qoss, err = validateSubscribeMap(filters); err != nil {
token.err = err
return token
}
if callback != nil {
for topic := range filters {
c.msgRouter.addRoute(topic, callback)
}
}
token.subs = make([]string, len(sub.Topics))
copy(token.subs, sub.Topics)
c.oboundP <- &PacketAndToken{p: sub, t: token}
DEBUG.Println(CLI, "exit SubscribeMultiple")
return token
}
// Unsubscribe will end the subscription from each of the topics provided.
// Messages published to those topics from other clients will no longer be
// received.
func (c *Client) Unsubscribe(topics ...string) Token {
token := newToken(packets.Unsubscribe).(*UnsubscribeToken)
DEBUG.Println(CLI, "enter Unsubscribe")
if !c.IsConnected() {
token.err = ErrNotConnected
token.flowComplete()
return token
}
unsub := packets.NewControlPacket(packets.Unsubscribe).(*packets.UnsubscribePacket)
unsub.Topics = make([]string, len(topics))
copy(unsub.Topics, topics)
c.oboundP <- &PacketAndToken{p: unsub, t: token}
for _, topic := range topics {
c.msgRouter.deleteRoute(topic)
}
DEBUG.Println(CLI, "exit Unsubscribe")
return token
}
//DefaultConnectionLostHandler is a definition of a function that simply
//reports to the DEBUG log the reason for the client losing a connection.
func DefaultConnectionLostHandler(client *Client, reason error) {
DEBUG.Println("Connection lost:", reason.Error())
}

View File

@ -1,31 +0,0 @@
/*
* Copyright (c) 2013 IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Seth Hoenig
* Allan Stockdill-Mander
* Mike Robertson
*/
package mqtt
type component string
// Component names for debug output
const (
NET component = "[net] "
PNG component = "[pinger] "
CLI component = "[client] "
DEC component = "[decode] "
MES component = "[message] "
STR component = "[store] "
MID component = "[msgids] "
TST component = "[test] "
STA component = "[state] "
ERR component = "[error] "
)

View File

@ -1,15 +0,0 @@
Eclipse Distribution License - v 1.0
Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of the Eclipse Foundation, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -1,70 +0,0 @@
Eclipse Public License - v 1.0
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
1. DEFINITIONS
"Contribution" means:
a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
b) in the case of each subsequent Contributor:
i) changes to the Program, and
ii) additions to the Program;
where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
"Contributor" means any person or entity that distributes the Program.
"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
"Program" means the Contributions distributed in accordance with this Agreement.
"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
2. GRANT OF RIGHTS
a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
3. REQUIREMENTS
A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
a) it complies with the terms and conditions of this Agreement; and
b) its license agreement:
i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
When the Program is made available in source code form:
a) it must be made available under this Agreement; and
b) a copy of this Agreement must be included with each copy of the Program.
Contributors may not remove or alter any copyright notices contained within the Program.
Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
4. COMMERCIAL DISTRIBUTION
Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
5. NO WARRANTY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
6. DISCLAIMER OF LIABILITY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
7. GENERAL
If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.

View File

@ -1,258 +0,0 @@
/*
* Copyright (c) 2013 IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Seth Hoenig
* Allan Stockdill-Mander
* Mike Robertson
*/
package mqtt
import (
"git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets"
"io"
"io/ioutil"
"os"
"path"
"sync"
)
const (
msgExt = ".msg"
bkpExt = ".bkp"
)
// FileStore implements the store interface using the filesystem to provide
// true persistence, even across client failure. This is designed to use a
// single directory per running client. If you are running multiple clients
// on the same filesystem, you will need to be careful to specify unique
// store directories for each.
type FileStore struct {
sync.RWMutex
directory string
opened bool
}
// NewFileStore will create a new FileStore which stores its messages in the
// directory provided.
func NewFileStore(directory string) *FileStore {
store := &FileStore{
directory: directory,
opened: false,
}
return store
}
// Open will allow the FileStore to be used.
func (store *FileStore) Open() {
store.Lock()
defer store.Unlock()
// if no store directory was specified in ClientOpts, by default use the
// current working directory
if store.directory == "" {
store.directory, _ = os.Getwd()
}
// if store dir exists, great, otherwise, create it
if !exists(store.directory) {
perms := os.FileMode(0770)
merr := os.MkdirAll(store.directory, perms)
chkerr(merr)
}
store.opened = true
DEBUG.Println(STR, "store is opened at", store.directory)
}
// Close will disallow the FileStore from being used.
func (store *FileStore) Close() {
store.Lock()
defer store.Unlock()
store.opened = false
WARN.Println(STR, "store is not open")
}
// Put will put a message into the store, associated with the provided
// key value.
func (store *FileStore) Put(key string, m packets.ControlPacket) {
store.Lock()
defer store.Unlock()
chkcond(store.opened)
full := fullpath(store.directory, key)
if exists(full) {
backup(store.directory, key) // make a copy of what already exists
defer unbackup(store.directory, key)
}
write(store.directory, key, m)
chkcond(exists(full))
}
// Get will retrieve a message from the store, the one associated with
// the provided key value.
func (store *FileStore) Get(key string) packets.ControlPacket {
store.RLock()
defer store.RUnlock()
chkcond(store.opened)
filepath := fullpath(store.directory, key)
if !exists(filepath) {
return nil
}
mfile, oerr := os.Open(filepath)
chkerr(oerr)
//all, rerr := ioutil.ReadAll(mfile)
//chkerr(rerr)
msg, rerr := packets.ReadPacket(mfile)
chkerr(rerr)
cerr := mfile.Close()
chkerr(cerr)
return msg
}
// All will provide a list of all of the keys associated with messages
// currenly residing in the FileStore.
func (store *FileStore) All() []string {
store.RLock()
defer store.RUnlock()
return store.all()
}
// Del will remove the persisted message associated with the provided
// key from the FileStore.
func (store *FileStore) Del(key string) {
store.Lock()
defer store.Unlock()
store.del(key)
}
// Reset will remove all persisted messages from the FileStore.
func (store *FileStore) Reset() {
store.Lock()
defer store.Unlock()
WARN.Println(STR, "FileStore Reset")
for _, key := range store.all() {
store.del(key)
}
}
// lockless
func (store *FileStore) all() []string {
chkcond(store.opened)
keys := []string{}
files, rderr := ioutil.ReadDir(store.directory)
chkerr(rderr)
for _, f := range files {
DEBUG.Println(STR, "file in All():", f.Name())
key := f.Name()[0 : len(f.Name())-4] // remove file extension
keys = append(keys, key)
}
return keys
}
// lockless
func (store *FileStore) del(key string) {
chkcond(store.opened)
DEBUG.Println(STR, "store del filepath:", store.directory)
DEBUG.Println(STR, "store delete key:", key)
filepath := fullpath(store.directory, key)
DEBUG.Println(STR, "path of deletion:", filepath)
if !exists(filepath) {
WARN.Println(STR, "store could not delete key:", key)
return
}
rerr := os.Remove(filepath)
chkerr(rerr)
DEBUG.Println(STR, "del msg:", key)
chkcond(!exists(filepath))
}
func fullpath(store string, key string) string {
p := path.Join(store, key+msgExt)
return p
}
func bkppath(store string, key string) string {
p := path.Join(store, key+bkpExt)
return p
}
// create file called "X.[messageid].msg" located in the store
// the contents of the file is the bytes of the message
// if a message with m's message id already exists, it will
// be overwritten
// X will be 'i' for inbound messages, and O for outbound messages
func write(store, key string, m packets.ControlPacket) {
filepath := fullpath(store, key)
f, err := os.Create(filepath)
chkerr(err)
werr := m.Write(f)
chkerr(werr)
cerr := f.Close()
chkerr(cerr)
}
func exists(file string) bool {
if _, err := os.Stat(file); err != nil {
if os.IsNotExist(err) {
return false
}
chkerr(err)
}
return true
}
func backup(store, key string) {
bkpp := bkppath(store, key)
fulp := fullpath(store, key)
backup, err := os.Create(bkpp)
chkerr(err)
mfile, oerr := os.Open(fulp)
chkerr(oerr)
_, cerr := io.Copy(backup, mfile)
chkerr(cerr)
clberr := backup.Close()
chkerr(clberr)
clmerr := mfile.Close()
chkerr(clmerr)
}
// Identify .bkp files in the store and turn them into .msg files,
// whether or not it overwrites an existing file. This is safe because
// I'm copying the Paho Java client and they say it is.
func restore(store string) {
files, rderr := ioutil.ReadDir(store)
chkerr(rderr)
for _, f := range files {
fname := f.Name()
if len(fname) > 4 {
if fname[len(fname)-4:] == bkpExt {
key := fname[0 : len(fname)-4]
fulp := fullpath(store, key)
msg, cerr := os.Create(fulp)
chkerr(cerr)
bkpp := path.Join(store, fname)
bkp, oerr := os.Open(bkpp)
chkerr(oerr)
n, cerr := io.Copy(msg, bkp)
chkerr(cerr)
chkcond(n > 0)
clmerr := msg.Close()
chkerr(clmerr)
clberr := bkp.Close()
chkerr(clberr)
remerr := os.Remove(bkpp)
chkerr(remerr)
}
}
}
}
func unbackup(store, key string) {
bkpp := bkppath(store, key)
remerr := os.Remove(bkpp)
chkerr(remerr)
}

View File

@ -1,74 +0,0 @@
FVT Instructions
================
The FVT tests are currenly only supported by [IBM MessageSight](http://www-03.ibm.com/software/products/us/en/messagesight/).
Support for [mosquitto](http://mosquitto.org/) and [IBM Really Small Message Broker](https://www.ibm.com/developerworks/community/groups/service/html/communityview?communityUuid=d5bedadd-e46f-4c97-af89-22d65ffee070) might be added in the future.
IBM MessageSight Configuration
------------------------------
The IBM MessageSight Virtual Appliance can be downloaded here:
[Download](http://www-933.ibm.com/support/fixcentral/swg/selectFixes?parent=ibm~Other+software&product=ibm/Other+software/MessageSight&function=fixId&fixids=1.0.0.1-IMA-DeveloperImage&includeSupersedes=0 "IBM MessageSight")
There is a nice blog post about it here:
[Blog](https://www.ibm.com/developerworks/community/blogs/c565c720-fe84-4f63-873f-607d87787327/entry/ibm_messagesight_for_developers_is_here?lang=en "Blog")
The virtual appliance must be installed into a virtual machine like
Oracle VirtualBox or VMWare Player. (Follow the instructions that come
with the download).
Next, copy your authorized keys (basically a file containing the public
rsa key of your own computer) onto the appliance to enable passwordless ssh.
For example,
Console> user sshkey add "scp://user@host:~/.ssh/authorized_keys"
More information can be found in the IBM MessageSight InfoCenter:
[InfoCenter](https://infocenters.hursley.ibm.com/ism/v1/help/index.jsp "InfoCenter")
Now, execute the script setup_IMA.sh to create the objects necessary
to configure the server for the unit test cases provided.
For example,
./setup_IMA.sh
You should now be able to view the objects on your server:
Console> imaserver show Endpoint Name=GoMqttEP1
Name = GoMqttEP1
Enabled = True
Port = 17001
Protocol = MQTT
Interface = all
SecurityProfile =
ConnectionPolicies = GoMqttCP1
MessagingPolicies = GoMqttMP1
MaxMessageSize = 1024KB
MessageHub = GoMqttTestHub
Description =
RSMB Configuration
------------------
Wait for SSL support?
Mosquitto Configuration
-----------------------
Launch mosquitto from the fvt directory, specifiying mosquitto.cfg as config file
``ex: /usr/bin/mosquitto -c ./mosquitto.cfg``
Note: Mosquitto requires SSL 1.1 or better, while Go 1.1.2 supports
only SSL v1.0. However, Go 1.2+ supports SSL v1.1 and SSL v1.2.
Other Notes
-----------
Go 1.1.2 does not support intermediate certificates, however Go 1.2+ does.

View File

@ -1,17 +0,0 @@
allow_anonymous true
allow_duplicate_messages false
connection_messages true
log_dest stdout
log_timestamp true
log_type all
persistence false
bind_address 127.0.0.1
listener 17001
listener 17002
listener 17003
listener 17004
#capath ../samples/samplecerts
#certfile ../samples/samplecerts/server-crt.pem
#keyfile ../samples/samplecerts/server-key.pem

View File

@ -1,8 +0,0 @@
allow_anonymous false
bind_address 127.0.0.1
connection_messages true
log_level detail
listener 17001
#listener 17003
#listener 17004

View File

@ -1,111 +0,0 @@
#!/bin/bash
#######################################################################
# This script is for configuring your IBM Messaging Appliance for use #
# as an mqtt test server for testing the go-mqtt open source client. #
# It creates the Policies and Endpoints necessary to test particular #
# features of the client, such as IPv6, SSL, and other things #
# #
# You do not need this script for any other purpose. #
#######################################################################
# Edit options to match your configuration
IMA_HOST=9.41.55.184
IMA_USER=admin
HOST=9.41.55.146
USER=root
CERTDIR=~/GO/src/github.com/shoenig/go-mqtt/samples/samplecerts
echo 'Configuring your IBM Messaging Appliance for testing go-mqtt'
echo 'IMA_HOST: ' $IMA_HOST
function ima {
reply=`ssh $IMA_USER@$IMA_HOST imaserver $@`
}
function imp {
reply=`ssh $IMA_USER@$IMA_HOST file get $@`
}
ima create MessageHub Name=GoMqttTestHub
# Config "1" is a basic, open endpoint, port 17001
ima create MessagingPolicy \
Name=GoMqttMP1 \
Protocol=MQTT \
ActionList=Publish,Subscribe \
MaxMessages=100000 \
DestinationType=Topic \
Destination=*
ima create ConnectionPolicy \
Name=GoMqttCP1 \
Protocol=MQTT
ima create Endpoint \
Name=GoMqttEP1 \
Protocol=MQTT \
MessageHub=GoMqttTestHub \
ConnectionPolicies=GoMqttCP1 \
MessagingPolicies=GoMqttMP1 \
Port=17001
# Config "2" is IPv6 only , port 17002
# Config "3" is for authorization failures, port 17003
ima create ConnectionPolicy \
Name=GoMqttCP2 \
Protocol=MQTT \
ClientID=GoMqttClient
ima create Endpoint \
Name=GoMqttEP3 \
Protocol=MQTT \
MessageHub=GoMqttTestHub \
ConnectionPolicies=GoMqttCP2 \
MessagingPolicies=GoMqttMP1 \
Port=17003
# Config "4" is secure connections, port 17004
imp scp://$USER@$HOST:${CERTDIR}/server-crt.pem .
imp scp://$USER@$HOST:${CERTDIR}/server-key.pem .
imp scp://$USER@$HOST:${CERTDIR}/rootCA-crt.pem .
imp scp://$USER@$HOST:${CERTDIR}/intermediateCA-crt.pem .
ima apply Certificate \
CertFileName=server-crt.pem \
"CertFilePassword=" \
KeyFileName=server-key.pem \
"KeyFilePassword="
ima create CertificateProfile \
Name=GoMqttCertProf \
Certificate=server-crt.pem \
Key=server-key.pem
ima create SecurityProfile \
Name=GoMqttSecProf \
MinimumProtocolMethod=SSLv3 \
UseClientCertificate=True \
UsePasswordAuthentication=False \
Ciphers=Fast \
CertificateProfile=GoMqttCertProf
ima apply Certificate \
TrustedCertificate=rootCA-crt.pem \
SecurityProfileName=GoMqttSecProf
ima apply Certificate \
TrustedCertificate=intermediateCA-crt.pem \
SecurityProfileName=GoMqttSecProf
ima create Endpoint \
Name=GoMqttEP4 \
Port=17004 \
MessageHub=GoMqttTestHub \
ConnectionPolicies=GoMqttCP1 \
MessagingPolicies=GoMqttMP1 \
SecurityProfile=GoMqttSecProf \
Protocol=MQTT

View File

@ -1,496 +0,0 @@
/*
* Copyright (c) 2013 IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Seth Hoenig
* Allan Stockdill-Mander
* Mike Robertson
*/
package mqtt
import (
"bytes"
"fmt"
"git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets"
"testing"
)
/*******************************
**** Some helper functions ****
*******************************/
func b2s(bs []byte) string {
s := ""
for _, b := range bs {
s += fmt.Sprintf("%x ", b)
}
return s
}
/**********************************************
**** A mock store implementation for test ****
**********************************************/
type TestStore struct {
mput []uint16
mget []uint16
mdel []uint16
}
func (ts *TestStore) Open() {
}
func (ts *TestStore) Close() {
}
func (ts *TestStore) Put(key string, m packets.ControlPacket) {
ts.mput = append(ts.mput, m.Details().MessageID)
}
func (ts *TestStore) Get(key string) packets.ControlPacket {
mid := mIDFromKey(key)
ts.mget = append(ts.mget, mid)
return nil
}
func (ts *TestStore) All() []string {
return nil
}
func (ts *TestStore) Del(key string) {
mid := mIDFromKey(key)
ts.mdel = append(ts.mdel, mid)
}
func (ts *TestStore) Reset() {
}
/*******************
**** FileStore ****
*******************/
func Test_NewFileStore(t *testing.T) {
storedir := "/tmp/TestStore/_new"
f := NewFileStore(storedir)
if f.opened {
t.Fatalf("filestore was opened without opening it")
}
if f.directory != storedir {
t.Fatalf("filestore directory is wrong")
}
// storedir might exist or might not, just like with a real client
// the point is, we don't care, we just want it to exist after it is
// opened
}
func Test_FileStore_Open(t *testing.T) {
storedir := "/tmp/TestStore/_open"
f := NewFileStore(storedir)
f.Open()
if !f.opened {
t.Fatalf("filestore was not set open")
}
if f.directory != storedir {
t.Fatalf("filestore directory is wrong")
}
if !exists(storedir) {
t.Fatalf("filestore directory does not exst after opening it")
}
}
func Test_FileStore_Close(t *testing.T) {
storedir := "/tmp/TestStore/_unopen"
f := NewFileStore(storedir)
f.Open()
if !f.opened {
t.Fatalf("filestore was not set open")
}
if f.directory != storedir {
t.Fatalf("filestore directory is wrong")
}
if !exists(storedir) {
t.Fatalf("filestore directory does not exst after opening it")
}
f.Close()
if f.opened {
t.Fatalf("filestore was still open after unopen")
}
if !exists(storedir) {
t.Fatalf("filestore was deleted after unopen")
}
}
func Test_FileStore_write(t *testing.T) {
storedir := "/tmp/TestStore/_write"
f := NewFileStore(storedir)
f.Open()
pm := packets.NewControlPacket(packets.Publish).(*packets.PublishPacket)
pm.Qos = 1
pm.TopicName = "a/b/c"
pm.Payload = []byte{0xBE, 0xEF, 0xED}
pm.MessageID = 91
key := inboundKeyFromMID(pm.MessageID)
f.Put(key, pm)
if !exists(storedir + "/i.91.msg") {
t.Fatalf("message not in store")
}
}
func Test_FileStore_Get(t *testing.T) {
storedir := "/tmp/TestStore/_get"
f := NewFileStore(storedir)
f.Open()
pm := packets.NewControlPacket(packets.Publish).(*packets.PublishPacket)
pm.Qos = 1
pm.TopicName = "/a/b/c"
pm.Payload = []byte{0xBE, 0xEF, 0xED}
pm.MessageID = 120
key := outboundKeyFromMID(pm.MessageID)
f.Put(key, pm)
if !exists(storedir + "/o.120.msg") {
t.Fatalf("message not in store")
}
exp := []byte{
/* msg type */
0x32, // qos 1
/* remlen */
0x0d,
/* topic, msg id in varheader */
0x00, // length of topic
0x06,
0x2F, // /
0x61, // a
0x2F, // /
0x62, // b
0x2F, // /
0x63, // c
/* msg id (is always 2 bytes) */
0x00,
0x78,
/*payload */
0xBE,
0xEF,
0xED,
}
m := f.Get(key)
if m == nil {
t.Fatalf("message not retreived from store")
}
var msg bytes.Buffer
m.Write(&msg)
if !bytes.Equal(exp, msg.Bytes()) {
t.Fatal("message from store not same as what went in", msg.Bytes())
}
}
func Test_FileStore_All(t *testing.T) {
storedir := "/tmp/TestStore/_all"
f := NewFileStore(storedir)
f.Open()
pm := packets.NewControlPacket(packets.Publish).(*packets.PublishPacket)
pm.Qos = 2
pm.TopicName = "/t/r/v"
pm.Payload = []byte{0x01, 0x02}
pm.MessageID = 121
key := outboundKeyFromMID(pm.MessageID)
f.Put(key, pm)
keys := f.All()
if len(keys) != 1 {
t.Fatalf("FileStore.All does not have the messages")
}
if keys[0] != "o.121" {
t.Fatalf("FileStore.All has wrong key")
}
}
func Test_FileStore_Del(t *testing.T) {
storedir := "/tmp/TestStore/_del"
f := NewFileStore(storedir)
f.Open()
pm := packets.NewControlPacket(packets.Publish).(*packets.PublishPacket)
pm.Qos = 1
pm.TopicName = "a/b/c"
pm.Payload = []byte{0xBE, 0xEF, 0xED}
pm.MessageID = 17
key := inboundKeyFromMID(pm.MessageID)
f.Put(key, pm)
if !exists(storedir + "/i.17.msg") {
t.Fatalf("message not in store")
}
f.Del(key)
if exists(storedir + "/i.17.msg") {
t.Fatalf("message still exists after deletion")
}
}
func Test_FileStore_Reset(t *testing.T) {
storedir := "/tmp/TestStore/_reset"
f := NewFileStore(storedir)
f.Open()
pm1 := packets.NewControlPacket(packets.Publish).(*packets.PublishPacket)
pm1.Qos = 1
pm1.TopicName = "/q/w/e"
pm1.Payload = []byte{0xBB}
pm1.MessageID = 71
key1 := inboundKeyFromMID(pm1.MessageID)
f.Put(key1, pm1)
pm2 := packets.NewControlPacket(packets.Publish).(*packets.PublishPacket)
pm2.Qos = 1
pm2.TopicName = "/q/w/e"
pm2.Payload = []byte{0xBB}
pm2.MessageID = 72
key2 := inboundKeyFromMID(pm2.MessageID)
f.Put(key2, pm2)
pm3 := packets.NewControlPacket(packets.Publish).(*packets.PublishPacket)
pm3.Qos = 1
pm3.TopicName = "/q/w/e"
pm3.Payload = []byte{0xBB}
pm3.MessageID = 73
key3 := inboundKeyFromMID(pm3.MessageID)
f.Put(key3, pm3)
pm4 := packets.NewControlPacket(packets.Publish).(*packets.PublishPacket)
pm4.Qos = 1
pm4.TopicName = "/q/w/e"
pm4.Payload = []byte{0xBB}
pm4.MessageID = 74
key4 := inboundKeyFromMID(pm4.MessageID)
f.Put(key4, pm4)
pm5 := packets.NewControlPacket(packets.Publish).(*packets.PublishPacket)
pm5.Qos = 1
pm5.TopicName = "/q/w/e"
pm5.Payload = []byte{0xBB}
pm5.MessageID = 75
key5 := inboundKeyFromMID(pm5.MessageID)
f.Put(key5, pm5)
if !exists(storedir + "/i.71.msg") {
t.Fatalf("message not in store")
}
if !exists(storedir + "/i.72.msg") {
t.Fatalf("message not in store")
}
if !exists(storedir + "/i.73.msg") {
t.Fatalf("message not in store")
}
if !exists(storedir + "/i.74.msg") {
t.Fatalf("message not in store")
}
if !exists(storedir + "/i.75.msg") {
t.Fatalf("message not in store")
}
f.Reset()
if exists(storedir + "/i.71.msg") {
t.Fatalf("message still exists after reset")
}
if exists(storedir + "/i.72.msg") {
t.Fatalf("message still exists after reset")
}
if exists(storedir + "/i.73.msg") {
t.Fatalf("message still exists after reset")
}
if exists(storedir + "/i.74.msg") {
t.Fatalf("message still exists after reset")
}
if exists(storedir + "/i.75.msg") {
t.Fatalf("message still exists after reset")
}
}
/*******************
*** MemoryStore ***
*******************/
func Test_NewMemoryStore(t *testing.T) {
m := NewMemoryStore()
if m == nil {
t.Fatalf("MemoryStore could not be created")
}
}
func Test_MemoryStore_Open(t *testing.T) {
m := NewMemoryStore()
m.Open()
if !m.opened {
t.Fatalf("MemoryStore was not set open")
}
}
func Test_MemoryStore_Close(t *testing.T) {
m := NewMemoryStore()
m.Open()
if !m.opened {
t.Fatalf("MemoryStore was not set open")
}
m.Close()
if m.opened {
t.Fatalf("MemoryStore was still open after unopen")
}
}
func Test_MemoryStore_Reset(t *testing.T) {
m := NewMemoryStore()
m.Open()
pm := packets.NewControlPacket(packets.Publish).(*packets.PublishPacket)
pm.Qos = 2
pm.TopicName = "/f/r/s"
pm.Payload = []byte{0xAB}
pm.MessageID = 81
key := outboundKeyFromMID(pm.MessageID)
m.Put(key, pm)
if len(m.messages) != 1 {
t.Fatalf("message not in memstore")
}
m.Reset()
if len(m.messages) != 0 {
t.Fatalf("reset did not clear memstore")
}
}
func Test_MemoryStore_write(t *testing.T) {
m := NewMemoryStore()
m.Open()
pm := packets.NewControlPacket(packets.Publish).(*packets.PublishPacket)
pm.Qos = 1
pm.TopicName = "/a/b/c"
pm.Payload = []byte{0xBE, 0xEF, 0xED}
pm.MessageID = 91
key := inboundKeyFromMID(pm.MessageID)
m.Put(key, pm)
if len(m.messages) != 1 {
t.Fatalf("message not in store")
}
}
func Test_MemoryStore_Get(t *testing.T) {
m := NewMemoryStore()
m.Open()
pm := packets.NewControlPacket(packets.Publish).(*packets.PublishPacket)
pm.Qos = 1
pm.TopicName = "/a/b/c"
pm.Payload = []byte{0xBE, 0xEF, 0xED}
pm.MessageID = 120
key := outboundKeyFromMID(pm.MessageID)
m.Put(key, pm)
if len(m.messages) != 1 {
t.Fatalf("message not in store")
}
exp := []byte{
/* msg type */
0x32, // qos 1
/* remlen */
0x0d,
/* topic, msg id in varheader */
0x00, // length of topic
0x06,
0x2F, // /
0x61, // a
0x2F, // /
0x62, // b
0x2F, // /
0x63, // c
/* msg id (is always 2 bytes) */
0x00,
0x78,
/*payload */
0xBE,
0xEF,
0xED,
}
msg := m.Get(key)
if msg == nil {
t.Fatalf("message not retreived from store")
}
var buf bytes.Buffer
msg.Write(&buf)
if !bytes.Equal(exp, buf.Bytes()) {
t.Fatalf("message from store not same as what went in")
}
}
func Test_MemoryStore_Del(t *testing.T) {
m := NewMemoryStore()
m.Open()
pm := packets.NewControlPacket(packets.Publish).(*packets.PublishPacket)
pm.Qos = 1
pm.TopicName = "/a/b/c"
pm.Payload = []byte{0xBE, 0xEF, 0xED}
pm.MessageID = 17
key := outboundKeyFromMID(pm.MessageID)
m.Put(key, pm)
if len(m.messages) != 1 {
t.Fatalf("message not in store")
}
m.Del(key)
if len(m.messages) != 1 {
t.Fatalf("message still exists after deletion")
}
}

View File

@ -1,26 +0,0 @@
/*
* Copyright (c) 2013 IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Seth Hoenig
* Allan Stockdill-Mander
* Mike Robertson
*/
package mqtt
// Use setup_IMA.sh for IBM's MessageSight
// Use fvt/rsmb.cfg for IBM's Really Small Message Broker
// Use fvt/mosquitto.cfg for the open source Mosquitto project
// Set these values to the URI of your MQTT Broker before running go-test
const (
FVTAddr = "iot.eclipse.org"
FVTTCP = "tcp://" + FVTAddr + ":1883"
FVTSSL = "ssl://" + FVTAddr + ":8883"
)

View File

@ -1,119 +0,0 @@
/*
* Copyright (c) 2013 IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Seth Hoenig
* Allan Stockdill-Mander
* Mike Robertson
*/
package mqtt
import (
"git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets"
"sync"
)
// MemoryStore implements the store interface to provide a "persistence"
// mechanism wholly stored in memory. This is only useful for
// as long as the client instance exists.
type MemoryStore struct {
sync.RWMutex
messages map[string]packets.ControlPacket
opened bool
}
// NewMemoryStore returns a pointer to a new instance of
// MemoryStore, the instance is not initialized and ready to
// use until Open() has been called on it.
func NewMemoryStore() *MemoryStore {
store := &MemoryStore{
messages: make(map[string]packets.ControlPacket),
opened: false,
}
return store
}
// Open initializes a MemoryStore instance.
func (store *MemoryStore) Open() {
store.Lock()
defer store.Unlock()
store.opened = true
DEBUG.Println(STR, "memorystore initialized")
}
// Put takes a key and a pointer to a Message and stores the
// message.
func (store *MemoryStore) Put(key string, message packets.ControlPacket) {
store.Lock()
defer store.Unlock()
chkcond(store.opened)
store.messages[key] = message
}
// Get takes a key and looks in the store for a matching Message
// returning either the Message pointer or nil.
func (store *MemoryStore) Get(key string) packets.ControlPacket {
store.RLock()
defer store.RUnlock()
chkcond(store.opened)
mid := mIDFromKey(key)
m := store.messages[key]
if m == nil {
CRITICAL.Println(STR, "memorystore get: message", mid, "not found")
} else {
DEBUG.Println(STR, "memorystore get: message", mid, "found")
}
return m
}
// All returns a slice of strings containing all the keys currently
// in the MemoryStore.
func (store *MemoryStore) All() []string {
store.RLock()
defer store.RUnlock()
chkcond(store.opened)
keys := []string{}
for k := range store.messages {
keys = append(keys, k)
}
return keys
}
// Del takes a key, searches the MemoryStore and if the key is found
// deletes the Message pointer associated with it.
func (store *MemoryStore) Del(key string) {
store.Lock()
defer store.Unlock()
mid := mIDFromKey(key)
m := store.messages[key]
if m == nil {
WARN.Println(STR, "memorystore del: message", mid, "not found")
} else {
store.messages[key] = nil
DEBUG.Println(STR, "memorystore del: message", mid, "was deleted")
}
}
// Close will disallow modifications to the state of the store.
func (store *MemoryStore) Close() {
store.Lock()
defer store.Unlock()
chkcond(store.opened)
store.opened = false
DEBUG.Println(STR, "memorystore closed")
}
// Reset eliminates all persisted message data in the store.
func (store *MemoryStore) Reset() {
store.Lock()
defer store.Unlock()
chkcond(store.opened)
store.messages = make(map[string]packets.ControlPacket)
WARN.Println(STR, "memorystore wiped")
}

View File

@ -1,104 +0,0 @@
/*
* Copyright (c) 2013 IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Seth Hoenig
* Allan Stockdill-Mander
* Mike Robertson
*/
package mqtt
import (
"git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets"
)
// Message defines the externals that a message implementation must support
// these are received messages that are passed to the callbacks, not internal
// messages
type Message interface {
Duplicate() bool
Qos() byte
Retained() bool
Topic() string
MessageID() uint16
Payload() []byte
}
type message struct {
duplicate bool
qos byte
retained bool
topic string
messageID uint16
payload []byte
}
func (m *message) Duplicate() bool {
return m.duplicate
}
func (m *message) Qos() byte {
return m.qos
}
func (m *message) Retained() bool {
return m.retained
}
func (m *message) Topic() string {
return m.topic
}
func (m *message) MessageID() uint16 {
return m.messageID
}
func (m *message) Payload() []byte {
return m.payload
}
func messageFromPublish(p *packets.PublishPacket) Message {
return &message{
duplicate: p.Dup,
qos: p.Qos,
retained: p.Retain,
topic: p.TopicName,
messageID: p.MessageID,
payload: p.Payload,
}
}
func newConnectMsgFromOptions(options *ClientOptions) *packets.ConnectPacket {
m := packets.NewControlPacket(packets.Connect).(*packets.ConnectPacket)
m.CleanSession = options.CleanSession
m.WillFlag = options.WillEnabled
m.WillRetain = options.WillRetained
m.ClientIdentifier = options.ClientID
if options.WillEnabled {
m.WillQos = options.WillQos
m.WillTopic = options.WillTopic
m.WillMessage = options.WillPayload
}
if options.Username != "" {
m.UsernameFlag = true
m.Username = options.Username
//mustn't have password without user as well
if options.Password != "" {
m.PasswordFlag = true
m.Password = []byte(options.Password)
}
}
m.KeepaliveTimer = uint16(options.KeepAlive)
return m
}

View File

@ -1,61 +0,0 @@
/*
* Copyright (c) 2013 IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Seth Hoenig
* Allan Stockdill-Mander
* Mike Robertson
*/
package mqtt
import (
"sync"
)
// MId is 16 bit message id as specified by the MQTT spec.
// In general, these values should not be depended upon by
// the client application.
type MId uint16
type messageIds struct {
sync.RWMutex
index map[uint16]Token
}
const (
midMin uint16 = 1
midMax uint16 = 65535
)
func (mids *messageIds) freeID(id uint16) {
mids.Lock()
defer mids.Unlock()
delete(mids.index, id)
}
func (mids *messageIds) getID(t Token) uint16 {
mids.Lock()
defer mids.Unlock()
for i := midMin; i < midMax; i++ {
if _, ok := mids.index[i]; !ok {
mids.index[i] = t
return i
}
}
return 0
}
func (mids *messageIds) getToken(id uint16) Token {
mids.RLock()
defer mids.RUnlock()
if token, ok := mids.index[id]; ok {
return token
}
return nil
}

View File

@ -1,275 +0,0 @@
/*
* Copyright (c) 2013 IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Seth Hoenig
* Allan Stockdill-Mander
* Mike Robertson
*/
package mqtt
import (
"crypto/tls"
"errors"
"git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets"
"golang.org/x/net/websocket"
"net"
"net/url"
"reflect"
"time"
)
func openConnection(uri *url.URL, tlsc *tls.Config, timeout time.Duration) (net.Conn, error) {
switch uri.Scheme {
case "ws":
conn, err := websocket.Dial(uri.String(), "mqtt", "ws://localhost")
if err != nil {
return nil, err
}
conn.PayloadType = websocket.BinaryFrame
return conn, err
case "wss":
config, _ := websocket.NewConfig(uri.String(), "ws://localhost")
config.Protocol = []string{"mqtt"}
config.TlsConfig = tlsc
conn, err := websocket.DialConfig(config)
if err != nil {
return nil, err
}
conn.PayloadType = websocket.BinaryFrame
return conn, err
case "tcp":
conn, err := net.DialTimeout("tcp", uri.Host, timeout)
if err != nil {
return nil, err
}
return conn, nil
case "ssl":
fallthrough
case "tls":
fallthrough
case "tcps":
conn, err := tls.DialWithDialer(&net.Dialer{Timeout: timeout}, "tcp", uri.Host, tlsc)
if err != nil {
return nil, err
}
return conn, nil
}
return nil, errors.New("Unknown protocol")
}
// actually read incoming messages off the wire
// send Message object into ibound channel
func incoming(c *Client) {
defer c.workers.Done()
var err error
var cp packets.ControlPacket
DEBUG.Println(NET, "incoming started")
for {
if cp, err = packets.ReadPacket(c.conn); err != nil {
break
}
DEBUG.Println(NET, "Received Message")
c.ibound <- cp
}
// We received an error on read.
// If disconnect is in progress, swallow error and return
select {
case <-c.stop:
DEBUG.Println(NET, "incoming stopped")
return
// Not trying to disconnect, send the error to the errors channel
default:
ERROR.Println(NET, "incoming stopped with error")
c.errors <- err
return
}
}
// receive a Message object on obound, and then
// actually send outgoing message to the wire
func outgoing(c *Client) {
defer c.workers.Done()
DEBUG.Println(NET, "outgoing started")
for {
DEBUG.Println(NET, "outgoing waiting for an outbound message")
select {
case <-c.stop:
DEBUG.Println(NET, "outgoing stopped")
return
case pub := <-c.obound:
msg := pub.p.(*packets.PublishPacket)
if msg.Qos != 0 && msg.MessageID == 0 {
msg.MessageID = c.getID(pub.t)
pub.t.(*PublishToken).messageID = msg.MessageID
}
//persist_obound(c.persist, msg)
if c.options.WriteTimeout > 0 {
c.conn.SetWriteDeadline(time.Now().Add(c.options.WriteTimeout))
}
if err := msg.Write(c.conn); err != nil {
ERROR.Println(NET, "outgoing stopped with error")
c.errors <- err
return
}
if c.options.WriteTimeout > 0 {
// If we successfully wrote, we don't want the timeout to happen during an idle period
// so we reset it to infinite.
c.conn.SetWriteDeadline(time.Time{})
}
if msg.Qos == 0 {
pub.t.flowComplete()
}
c.lastContact.update()
DEBUG.Println(NET, "obound wrote msg, id:", msg.MessageID)
case msg := <-c.oboundP:
switch msg.p.(type) {
case *packets.SubscribePacket:
msg.p.(*packets.SubscribePacket).MessageID = c.getID(msg.t)
case *packets.UnsubscribePacket:
msg.p.(*packets.UnsubscribePacket).MessageID = c.getID(msg.t)
}
DEBUG.Println(NET, "obound priority msg to write, type", reflect.TypeOf(msg.p))
if err := msg.p.Write(c.conn); err != nil {
ERROR.Println(NET, "outgoing stopped with error")
c.errors <- err
return
}
c.lastContact.update()
switch msg.p.(type) {
case *packets.DisconnectPacket:
msg.t.(*DisconnectToken).flowComplete()
DEBUG.Println(NET, "outbound wrote disconnect, stopping")
return
}
}
}
}
// receive Message objects on ibound
// store messages if necessary
// send replies on obound
// delete messages from store if necessary
func alllogic(c *Client) {
DEBUG.Println(NET, "logic started")
for {
DEBUG.Println(NET, "logic waiting for msg on ibound")
select {
case msg := <-c.ibound:
DEBUG.Println(NET, "logic got msg on ibound")
//persist_ibound(c.persist, msg)
switch msg.(type) {
case *packets.PingrespPacket:
DEBUG.Println(NET, "received pingresp")
c.pingOutstanding = false
case *packets.SubackPacket:
sa := msg.(*packets.SubackPacket)
DEBUG.Println(NET, "received suback, id:", sa.MessageID)
token := c.getToken(sa.MessageID).(*SubscribeToken)
DEBUG.Println(NET, "granted qoss", sa.GrantedQoss)
for i, qos := range sa.GrantedQoss {
token.subResult[token.subs[i]] = qos
}
token.flowComplete()
go c.freeID(sa.MessageID)
case *packets.UnsubackPacket:
ua := msg.(*packets.UnsubackPacket)
DEBUG.Println(NET, "received unsuback, id:", ua.MessageID)
token := c.getToken(ua.MessageID).(*UnsubscribeToken)
token.flowComplete()
go c.freeID(ua.MessageID)
case *packets.PublishPacket:
pp := msg.(*packets.PublishPacket)
DEBUG.Println(NET, "received publish, msgId:", pp.MessageID)
DEBUG.Println(NET, "putting msg on onPubChan")
switch pp.Qos {
case 2:
c.incomingPubChan <- pp
DEBUG.Println(NET, "done putting msg on incomingPubChan")
pr := packets.NewControlPacket(packets.Pubrec).(*packets.PubrecPacket)
pr.MessageID = pp.MessageID
DEBUG.Println(NET, "putting pubrec msg on obound")
c.oboundP <- &PacketAndToken{p: pr, t: nil}
DEBUG.Println(NET, "done putting pubrec msg on obound")
case 1:
c.incomingPubChan <- pp
DEBUG.Println(NET, "done putting msg on incomingPubChan")
pa := packets.NewControlPacket(packets.Puback).(*packets.PubackPacket)
pa.MessageID = pp.MessageID
DEBUG.Println(NET, "putting puback msg on obound")
c.oboundP <- &PacketAndToken{p: pa, t: nil}
DEBUG.Println(NET, "done putting puback msg on obound")
case 0:
select {
case c.incomingPubChan <- pp:
DEBUG.Println(NET, "done putting msg on incomingPubChan")
case err, ok := <-c.errors:
DEBUG.Println(NET, "error while putting msg on pubChanZero")
// We are unblocked, but need to put the error back on so the outer
// select can handle it appropriately.
if ok {
go func(errVal error, errChan chan error) {
errChan <- errVal
}(err, c.errors)
}
}
}
case *packets.PubackPacket:
pa := msg.(*packets.PubackPacket)
DEBUG.Println(NET, "received puback, id:", pa.MessageID)
// c.receipts.get(msg.MsgId()) <- Receipt{}
// c.receipts.end(msg.MsgId())
c.getToken(pa.MessageID).flowComplete()
c.freeID(pa.MessageID)
case *packets.PubrecPacket:
prec := msg.(*packets.PubrecPacket)
DEBUG.Println(NET, "received pubrec, id:", prec.MessageID)
prel := packets.NewControlPacket(packets.Pubrel).(*packets.PubrelPacket)
prel.MessageID = prec.MessageID
select {
case c.oboundP <- &PacketAndToken{p: prel, t: nil}:
case <-time.After(time.Second):
}
case *packets.PubrelPacket:
pr := msg.(*packets.PubrelPacket)
DEBUG.Println(NET, "received pubrel, id:", pr.MessageID)
pc := packets.NewControlPacket(packets.Pubcomp).(*packets.PubcompPacket)
pc.MessageID = pr.MessageID
select {
case c.oboundP <- &PacketAndToken{p: pc, t: nil}:
case <-time.After(time.Second):
}
case *packets.PubcompPacket:
pc := msg.(*packets.PubcompPacket)
DEBUG.Println(NET, "received pubcomp, id:", pc.MessageID)
c.getToken(pc.MessageID).flowComplete()
c.freeID(pc.MessageID)
}
case <-c.stop:
WARN.Println(NET, "logic stopped")
return
case err := <-c.errors:
ERROR.Println(NET, "logic got error")
c.internalConnLost(err)
return
}
c.lastContact.update()
}
}

View File

@ -1,17 +0,0 @@
package mqtt
import (
"errors"
"fmt"
"strconv"
"testing"
)
func Test_openConnection(t *testing.T) {
_, err := strconv.Atoi("")
e := fmt.Errorf(" : %s", err)
t.Errorf("%#v", e)
e1 := errors.New("hogehoge %s")
t.Errorf("%#v", e1)
}

View File

@ -1,108 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Eclipse Foundation Software User Agreement</title>
</head>
<body lang="EN-US">
<h2>Eclipse Foundation Software User Agreement</h2>
<p>February 1, 2011</p>
<h3>Usage Of Content</h3>
<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
(COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
<h3>Applicable Licenses</h3>
<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
(&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
repository (&quot;Repository&quot;) in software modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
<ul>
<li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
<li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
<li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
and/or Fragments associated with that Feature.</li>
<li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
</ul>
<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
including, but not limited to the following locations:</p>
<ul>
<li>The top-level (root) directory</li>
<li>Plug-in and Fragment directories</li>
<li>Inside Plug-ins and Fragments packaged as JARs</li>
<li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
<li>Feature directories</li>
</ul>
<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license (&quot;Feature Update License&quot;) during the
installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
that directory.</p>
<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
<ul>
<li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
<li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
<li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
<li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
<li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
<li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
</ul>
<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
<h3>Use of Provisioning Technology</h3>
<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
Update Manager (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or
other materials (collectively &quot;Installable Software&quot;). This capability is provided with the intent of allowing such users to
install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
(&quot;Specification&quot;).</p>
<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
<ol>
<li>A series of actions may occur (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology
on a machine (&quot;Target Machine&quot;) with the intent of installing, extending or updating the functionality of an Eclipse-based
product.</li>
<li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
accessed and copied to the Target Machine.</li>
<li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
Software (&quot;Installable Software Agreement&quot;) and such Installable Software Agreement shall be accessed from the Target
Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
</ol>
<h3>Cryptography</h3>
<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
possession, or use, and re-export of encryption software, to see if this is permitted.</p>
<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
</body>
</html>

View File

@ -1,27 +0,0 @@
/*
* Copyright (c) 2013 IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Seth Hoenig
* Allan Stockdill-Mander
* Mike Robertson
*/
package mqtt
func chkerr(e error) {
if e != nil {
panic(e)
}
}
func chkcond(b bool) {
if !b {
panic("oops")
}
}

View File

@ -1,270 +0,0 @@
/*
* Copyright (c) 2013 IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Seth Hoenig
* Allan Stockdill-Mander
* Mike Robertson
*/
package mqtt
import (
"crypto/tls"
"net/url"
"time"
)
// MessageHandler is a callback type which can be set to be
// executed upon the arrival of messages published to topics
// to which the client is subscribed.
type MessageHandler func(*Client, Message)
// ConnectionLostHandler is a callback type which can be set to be
// executed upon an unintended disconnection from the MQTT broker.
// Disconnects caused by calling Disconnect or ForceDisconnect will
// not cause an OnConnectionLost callback to execute.
type ConnectionLostHandler func(*Client, error)
// OnConnectHandler is a callback that is called when the client
// state changes from unconnected/disconnected to connected. Both
// at initial connection and on reconnection
type OnConnectHandler func(*Client)
// ClientOptions contains configurable options for an Client.
type ClientOptions struct {
Servers []*url.URL
ClientID string
Username string
Password string
CleanSession bool
Order bool
WillEnabled bool
WillTopic string
WillPayload []byte
WillQos byte
WillRetained bool
ProtocolVersion uint
protocolVersionExplicit bool
TLSConfig tls.Config
KeepAlive time.Duration
ConnectTimeout time.Duration
MaxReconnectInterval time.Duration
AutoReconnect bool
Store Store
DefaultPublishHander MessageHandler
OnConnect OnConnectHandler
OnConnectionLost ConnectionLostHandler
WriteTimeout time.Duration
}
// NewClientOptions will create a new ClientClientOptions type with some
// default values.
// Port: 1883
// CleanSession: True
// Order: True
// KeepAlive: 30 (seconds)
// ConnectTimeout: 30 (seconds)
// MaxReconnectInterval 10 (minutes)
// AutoReconnect: True
func NewClientOptions() *ClientOptions {
o := &ClientOptions{
Servers: nil,
ClientID: "",
Username: "",
Password: "",
CleanSession: true,
Order: true,
WillEnabled: false,
WillTopic: "",
WillPayload: nil,
WillQos: 0,
WillRetained: false,
ProtocolVersion: 0,
protocolVersionExplicit: false,
TLSConfig: tls.Config{},
KeepAlive: 30 * time.Second,
ConnectTimeout: 30 * time.Second,
MaxReconnectInterval: 10 * time.Minute,
AutoReconnect: true,
Store: nil,
OnConnect: nil,
OnConnectionLost: DefaultConnectionLostHandler,
WriteTimeout: 0, // 0 represents timeout disabled
}
return o
}
// AddBroker adds a broker URI to the list of brokers to be used. The format should be
// scheme://host:port
// Where "scheme" is one of "tcp", "ssl", or "ws", "host" is the ip-address (or hostname)
// and "port" is the port on which the broker is accepting connections.
func (o *ClientOptions) AddBroker(server string) *ClientOptions {
brokerURI, _ := url.Parse(server)
o.Servers = append(o.Servers, brokerURI)
return o
}
// SetClientID will set the client id to be used by this client when
// connecting to the MQTT broker. According to the MQTT v3.1 specification,
// a client id mus be no longer than 23 characters.
func (o *ClientOptions) SetClientID(id string) *ClientOptions {
o.ClientID = id
return o
}
// SetUsername will set the username to be used by this client when connecting
// to the MQTT broker. Note: without the use of SSL/TLS, this information will
// be sent in plaintext accross the wire.
func (o *ClientOptions) SetUsername(u string) *ClientOptions {
o.Username = u
return o
}
// SetPassword will set the password to be used by this client when connecting
// to the MQTT broker. Note: without the use of SSL/TLS, this information will
// be sent in plaintext accross the wire.
func (o *ClientOptions) SetPassword(p string) *ClientOptions {
o.Password = p
return o
}
// SetCleanSession will set the "clean session" flag in the connect message
// when this client connects to an MQTT broker. By setting this flag, you are
// indicating that no messages saved by the broker for this client should be
// delivered. Any messages that were going to be sent by this client before
// diconnecting previously but didn't will not be sent upon connecting to the
// broker.
func (o *ClientOptions) SetCleanSession(clean bool) *ClientOptions {
o.CleanSession = clean
return o
}
// SetOrderMatters will set the message routing to guarantee order within
// each QoS level. By default, this value is true. If set to false,
// this flag indicates that messages can be delivered asynchronously
// from the client to the application and possibly arrive out of order.
func (o *ClientOptions) SetOrderMatters(order bool) *ClientOptions {
o.Order = order
return o
}
// SetTLSConfig will set an SSL/TLS configuration to be used when connecting
// to an MQTT broker. Please read the official Go documentation for more
// information.
func (o *ClientOptions) SetTLSConfig(t *tls.Config) *ClientOptions {
o.TLSConfig = *t
return o
}
// SetStore will set the implementation of the Store interface
// used to provide message persistence in cases where QoS levels
// QoS_ONE or QoS_TWO are used. If no store is provided, then the
// client will use MemoryStore by default.
func (o *ClientOptions) SetStore(s Store) *ClientOptions {
o.Store = s
return o
}
// SetKeepAlive will set the amount of time (in seconds) that the client
// should wait before sending a PING request to the broker. This will
// allow the client to know that a connection has not been lost with the
// server.
func (o *ClientOptions) SetKeepAlive(k time.Duration) *ClientOptions {
o.KeepAlive = k
return o
}
// SetProtocolVersion sets the MQTT version to be used to connect to the
// broker. Legitimate values are currently 3 - MQTT 3.1 or 4 - MQTT 3.1.1
func (o *ClientOptions) SetProtocolVersion(pv uint) *ClientOptions {
if pv >= 3 && pv <= 4 {
o.ProtocolVersion = pv
o.protocolVersionExplicit = true
}
return o
}
// UnsetWill will cause any set will message to be disregarded.
func (o *ClientOptions) UnsetWill() *ClientOptions {
o.WillEnabled = false
return o
}
// SetWill accepts a string will message to be set. When the client connects,
// it will give this will message to the broker, which will then publish the
// provided payload (the will) to any clients that are subscribed to the provided
// topic.
func (o *ClientOptions) SetWill(topic string, payload string, qos byte, retained bool) *ClientOptions {
o.SetBinaryWill(topic, []byte(payload), qos, retained)
return o
}
// SetBinaryWill accepts a []byte will message to be set. When the client connects,
// it will give this will message to the broker, which will then publish the
// provided payload (the will) to any clients that are subscribed to the provided
// topic.
func (o *ClientOptions) SetBinaryWill(topic string, payload []byte, qos byte, retained bool) *ClientOptions {
o.WillEnabled = true
o.WillTopic = topic
o.WillPayload = payload
o.WillQos = qos
o.WillRetained = retained
return o
}
// SetDefaultPublishHandler sets the MessageHandler that will be called when a message
// is received that does not match any known subscriptions.
func (o *ClientOptions) SetDefaultPublishHandler(defaultHandler MessageHandler) *ClientOptions {
o.DefaultPublishHander = defaultHandler
return o
}
// SetOnConnectHandler sets the function to be called when the client is connected. Both
// at initial connection time and upon automatic reconnect.
func (o *ClientOptions) SetOnConnectHandler(onConn OnConnectHandler) *ClientOptions {
o.OnConnect = onConn
return o
}
// SetConnectionLostHandler will set the OnConnectionLost callback to be executed
// in the case where the client unexpectedly loses connection with the MQTT broker.
func (o *ClientOptions) SetConnectionLostHandler(onLost ConnectionLostHandler) *ClientOptions {
o.OnConnectionLost = onLost
return o
}
// SetWriteTimeout puts a limit on how long a mqtt publish should block until it unblocks with a
// timeout error. A duration of 0 never times out. Default 30 seconds
func (o *ClientOptions) SetWriteTimeout(t time.Duration) *ClientOptions {
o.WriteTimeout = t
return o
}
// SetConnectTimeout limits how long the client will wait when trying to open a connection
// to an MQTT server before timeing out and erroring the attempt. A duration of 0 never times out.
// Default 30 seconds. Currently only operational on TCP/TLS connections.
func (o *ClientOptions) SetConnectTimeout(t time.Duration) *ClientOptions {
o.ConnectTimeout = t
return o
}
// SetMaxReconnectInterval sets the maximum time that will be waited between reconnection attempts
// when connection is lost
func (o *ClientOptions) SetMaxReconnectInterval(t time.Duration) *ClientOptions {
o.MaxReconnectInterval = t
return o
}
// SetAutoReconnect sets whether the automatic reconnection logic should be used
// when the connection is lost, even if disabled the ConnectionLostHandler is still
// called
func (o *ClientOptions) SetAutoReconnect(a bool) *ClientOptions {
o.AutoReconnect = a
return o
}

View File

@ -1,57 +0,0 @@
package packets
import (
"bytes"
"fmt"
"github.com/pborman/uuid"
"io"
)
//ConnackPacket is an internal representation of the fields of the
//Connack MQTT packet
type ConnackPacket struct {
FixedHeader
TopicNameCompression byte
ReturnCode byte
uuid uuid.UUID
}
func (ca *ConnackPacket) String() string {
str := fmt.Sprintf("%s\n", ca.FixedHeader)
str += fmt.Sprintf("returncode: %d", ca.ReturnCode)
return str
}
func (ca *ConnackPacket) Write(w io.Writer) error {
var body bytes.Buffer
var err error
body.WriteByte(ca.TopicNameCompression)
body.WriteByte(ca.ReturnCode)
ca.FixedHeader.RemainingLength = 2
packet := ca.FixedHeader.pack()
packet.Write(body.Bytes())
_, err = packet.WriteTo(w)
return err
}
//Unpack decodes the details of a ControlPacket after the fixed
//header has been read
func (ca *ConnackPacket) Unpack(b io.Reader) {
ca.TopicNameCompression = decodeByte(b)
ca.ReturnCode = decodeByte(b)
}
//Details returns a Details struct containing the Qos and
//MessageID of this ControlPacket
func (ca *ConnackPacket) Details() Details {
return Details{Qos: 0, MessageID: 0}
}
//UUID returns the unique ID assigned to the ControlPacket when
//it was originally received. Note: this is not related to the
//MessageID field for MQTT packets
func (ca *ConnackPacket) UUID() uuid.UUID {
return ca.uuid
}

View File

@ -1,128 +0,0 @@
package packets
import (
"bytes"
"fmt"
"github.com/pborman/uuid"
"io"
)
//ConnectPacket is an internal representation of the fields of the
//Connect MQTT packet
type ConnectPacket struct {
FixedHeader
ProtocolName string
ProtocolVersion byte
CleanSession bool
WillFlag bool
WillQos byte
WillRetain bool
UsernameFlag bool
PasswordFlag bool
ReservedBit byte
KeepaliveTimer uint16
ClientIdentifier string
WillTopic string
WillMessage []byte
Username string
Password []byte
uuid uuid.UUID
}
func (c *ConnectPacket) String() string {
str := fmt.Sprintf("%s\n", c.FixedHeader)
str += fmt.Sprintf("protocolversion: %d protocolname: %s cleansession: %t willflag: %t WillQos: %d WillRetain: %t Usernameflag: %t Passwordflag: %t keepalivetimer: %d\nclientId: %s\nwilltopic: %s\nwillmessage: %s\nUsername: %s\nPassword: %s\n", c.ProtocolVersion, c.ProtocolName, c.CleanSession, c.WillFlag, c.WillQos, c.WillRetain, c.UsernameFlag, c.PasswordFlag, c.KeepaliveTimer, c.ClientIdentifier, c.WillTopic, c.WillMessage, c.Username, c.Password)
return str
}
func (c *ConnectPacket) Write(w io.Writer) error {
var body bytes.Buffer
var err error
body.Write(encodeString(c.ProtocolName))
body.WriteByte(c.ProtocolVersion)
body.WriteByte(boolToByte(c.CleanSession)<<1 | boolToByte(c.WillFlag)<<2 | c.WillQos<<3 | boolToByte(c.WillRetain)<<5 | boolToByte(c.PasswordFlag)<<6 | boolToByte(c.UsernameFlag)<<7)
body.Write(encodeUint16(c.KeepaliveTimer))
body.Write(encodeString(c.ClientIdentifier))
if c.WillFlag {
body.Write(encodeString(c.WillTopic))
body.Write(encodeBytes(c.WillMessage))
}
if c.UsernameFlag {
body.Write(encodeString(c.Username))
}
if c.PasswordFlag {
body.Write(encodeBytes(c.Password))
}
c.FixedHeader.RemainingLength = body.Len()
packet := c.FixedHeader.pack()
packet.Write(body.Bytes())
_, err = packet.WriteTo(w)
return err
}
//Unpack decodes the details of a ControlPacket after the fixed
//header has been read
func (c *ConnectPacket) Unpack(b io.Reader) {
c.ProtocolName = decodeString(b)
c.ProtocolVersion = decodeByte(b)
options := decodeByte(b)
c.ReservedBit = 1 & options
c.CleanSession = 1&(options>>1) > 0
c.WillFlag = 1&(options>>2) > 0
c.WillQos = 3 & (options >> 3)
c.WillRetain = 1&(options>>5) > 0
c.PasswordFlag = 1&(options>>6) > 0
c.UsernameFlag = 1&(options>>7) > 0
c.KeepaliveTimer = decodeUint16(b)
c.ClientIdentifier = decodeString(b)
if c.WillFlag {
c.WillTopic = decodeString(b)
c.WillMessage = decodeBytes(b)
}
if c.UsernameFlag {
c.Username = decodeString(b)
}
if c.PasswordFlag {
c.Password = decodeBytes(b)
}
}
//Validate performs validation of the fields of a Connect packet
func (c *ConnectPacket) Validate() byte {
if c.PasswordFlag && !c.UsernameFlag {
return ErrRefusedBadUsernameOrPassword
}
if c.ReservedBit != 0 {
//Bad reserved bit
return ErrProtocolViolation
}
if (c.ProtocolName == "MQIsdp" && c.ProtocolVersion != 3) || (c.ProtocolName == "MQTT" && c.ProtocolVersion != 4) {
//Mismatched or unsupported protocol version
return ErrRefusedBadProtocolVersion
}
if c.ProtocolName != "MQIsdp" && c.ProtocolName != "MQTT" {
//Bad protocol name
return ErrProtocolViolation
}
if len(c.ClientIdentifier) > 65535 || len(c.Username) > 65535 || len(c.Password) > 65535 {
//Bad size field
return ErrProtocolViolation
}
return Accepted
}
//Details returns a Details struct containing the Qos and
//MessageID of this ControlPacket
func (c *ConnectPacket) Details() Details {
return Details{Qos: 0, MessageID: 0}
}
//UUID returns the unique ID assigned to the ControlPacket when
//it was originally received. Note: this is not related to the
//MessageID field for MQTT packets
func (c *ConnectPacket) UUID() uuid.UUID {
return c.uuid
}

View File

@ -1,44 +0,0 @@
package packets
import (
"fmt"
"github.com/pborman/uuid"
"io"
)
//DisconnectPacket is an internal representation of the fields of the
//Disconnect MQTT packet
type DisconnectPacket struct {
FixedHeader
uuid uuid.UUID
}
func (d *DisconnectPacket) String() string {
str := fmt.Sprintf("%s\n", d.FixedHeader)
return str
}
func (d *DisconnectPacket) Write(w io.Writer) error {
packet := d.FixedHeader.pack()
_, err := packet.WriteTo(w)
return err
}
//Unpack decodes the details of a ControlPacket after the fixed
//header has been read
func (d *DisconnectPacket) Unpack(b io.Reader) {
}
//Details returns a Details struct containing the Qos and
//MessageID of this ControlPacket
func (d *DisconnectPacket) Details() Details {
return Details{Qos: 0, MessageID: 0}
}
//UUID returns the unique ID assigned to the ControlPacket when
//it was originally received. Note: this is not related to the
//MessageID field for MQTT packets
func (d *DisconnectPacket) UUID() uuid.UUID {
return d.uuid
}

View File

@ -1,324 +0,0 @@
package packets
import (
"bytes"
"encoding/binary"
"errors"
"fmt"
"github.com/pborman/uuid"
"io"
)
//ControlPacket defines the interface for structs intended to hold
//decoded MQTT packets, either from being read or before being
//written
type ControlPacket interface {
Write(io.Writer) error
Unpack(io.Reader)
String() string
Details() Details
UUID() uuid.UUID
}
//PacketNames maps the constants for each of the MQTT packet types
//to a string representation of their name.
var PacketNames = map[uint8]string{
1: "CONNECT",
2: "CONNACK",
3: "PUBLISH",
4: "PUBACK",
5: "PUBREC",
6: "PUBREL",
7: "PUBCOMP",
8: "SUBSCRIBE",
9: "SUBACK",
10: "UNSUBSCRIBE",
11: "UNSUBACK",
12: "PINGREQ",
13: "PINGRESP",
14: "DISCONNECT",
}
//Below are the constants assigned to each of the MQTT packet types
const (
Connect = 1
Connack = 2
Publish = 3
Puback = 4
Pubrec = 5
Pubrel = 6
Pubcomp = 7
Subscribe = 8
Suback = 9
Unsubscribe = 10
Unsuback = 11
Pingreq = 12
Pingresp = 13
Disconnect = 14
)
//Below are the const definitions for error codes returned by
//Connect()
const (
Accepted = 0x00
ErrRefusedBadProtocolVersion = 0x01
ErrRefusedIDRejected = 0x02
ErrRefusedServerUnavailable = 0x03
ErrRefusedBadUsernameOrPassword = 0x04
ErrRefusedNotAuthorised = 0x05
ErrNetworkError = 0xFE
ErrProtocolViolation = 0xFF
)
//ConnackReturnCodes is a map of the error codes constants for Connect()
//to a string representation of the error
var ConnackReturnCodes = map[uint8]string{
0: "Connection Accepted",
1: "Connection Refused: Bad Protocol Version",
2: "Connection Refused: Client Identifier Rejected",
3: "Connection Refused: Server Unavailable",
4: "Connection Refused: Username or Password in unknown format",
5: "Connection Refused: Not Authorised",
254: "Connection Error",
255: "Connection Refused: Protocol Violation",
}
//ConnErrors is a map of the errors codes constants for Connect()
//to a Go error
var ConnErrors = map[byte]error{
Accepted: nil,
ErrRefusedBadProtocolVersion: errors.New("Unnacceptable protocol version"),
ErrRefusedIDRejected: errors.New("Identifier rejected"),
ErrRefusedServerUnavailable: errors.New("Server Unavailable"),
ErrRefusedBadUsernameOrPassword: errors.New("Bad user name or password"),
ErrRefusedNotAuthorised: errors.New("Not Authorized"),
ErrNetworkError: errors.New("Network Error"),
ErrProtocolViolation: errors.New("Protocol Violation"),
}
//ReadPacket takes an instance of an io.Reader (such as net.Conn) and attempts
//to read an MQTT packet from the stream. It returns a ControlPacket
//representing the decoded MQTT packet and an error. One of these returns will
//always be nil, a nil ControlPacket indicating an error occurred.
func ReadPacket(r io.Reader) (cp ControlPacket, err error) {
var fh FixedHeader
b := make([]byte, 1)
_, err = io.ReadFull(r, b)
if err != nil {
return nil, err
}
fh.unpack(b[0], r)
cp = NewControlPacketWithHeader(fh)
if cp == nil {
return nil, errors.New("Bad data from client")
}
packetBytes := make([]byte, fh.RemainingLength)
_, err = io.ReadFull(r, packetBytes)
if err != nil {
return nil, err
}
cp.Unpack(bytes.NewBuffer(packetBytes))
return cp, nil
}
//NewControlPacket is used to create a new ControlPacket of the type specified
//by packetType, this is usually done by reference to the packet type constants
//defined in packets.go. The newly created ControlPacket is empty and a pointer
//is returned.
func NewControlPacket(packetType byte) (cp ControlPacket) {
switch packetType {
case Connect:
cp = &ConnectPacket{FixedHeader: FixedHeader{MessageType: Connect}, uuid: uuid.NewUUID()}
case Connack:
cp = &ConnackPacket{FixedHeader: FixedHeader{MessageType: Connack}, uuid: uuid.NewUUID()}
case Disconnect:
cp = &DisconnectPacket{FixedHeader: FixedHeader{MessageType: Disconnect}, uuid: uuid.NewUUID()}
case Publish:
cp = &PublishPacket{FixedHeader: FixedHeader{MessageType: Publish}, uuid: uuid.NewUUID()}
case Puback:
cp = &PubackPacket{FixedHeader: FixedHeader{MessageType: Puback}, uuid: uuid.NewUUID()}
case Pubrec:
cp = &PubrecPacket{FixedHeader: FixedHeader{MessageType: Pubrec}, uuid: uuid.NewUUID()}
case Pubrel:
cp = &PubrelPacket{FixedHeader: FixedHeader{MessageType: Pubrel, Qos: 1}, uuid: uuid.NewUUID()}
case Pubcomp:
cp = &PubcompPacket{FixedHeader: FixedHeader{MessageType: Pubcomp}, uuid: uuid.NewUUID()}
case Subscribe:
cp = &SubscribePacket{FixedHeader: FixedHeader{MessageType: Subscribe, Qos: 1}, uuid: uuid.NewUUID()}
case Suback:
cp = &SubackPacket{FixedHeader: FixedHeader{MessageType: Suback}, uuid: uuid.NewUUID()}
case Unsubscribe:
cp = &UnsubscribePacket{FixedHeader: FixedHeader{MessageType: Unsubscribe, Qos: 1}, uuid: uuid.NewUUID()}
case Unsuback:
cp = &UnsubackPacket{FixedHeader: FixedHeader{MessageType: Unsuback}, uuid: uuid.NewUUID()}
case Pingreq:
cp = &PingreqPacket{FixedHeader: FixedHeader{MessageType: Pingreq}, uuid: uuid.NewUUID()}
case Pingresp:
cp = &PingrespPacket{FixedHeader: FixedHeader{MessageType: Pingresp}, uuid: uuid.NewUUID()}
default:
return nil
}
return cp
}
//NewControlPacketWithHeader is used to create a new ControlPacket of the type
//specified within the FixedHeader that is passed to the function.
//The newly created ControlPacket is empty and a pointer is returned.
func NewControlPacketWithHeader(fh FixedHeader) (cp ControlPacket) {
switch fh.MessageType {
case Connect:
cp = &ConnectPacket{FixedHeader: fh, uuid: uuid.NewUUID()}
case Connack:
cp = &ConnackPacket{FixedHeader: fh, uuid: uuid.NewUUID()}
case Disconnect:
cp = &DisconnectPacket{FixedHeader: fh, uuid: uuid.NewUUID()}
case Publish:
cp = &PublishPacket{FixedHeader: fh, uuid: uuid.NewUUID()}
case Puback:
cp = &PubackPacket{FixedHeader: fh, uuid: uuid.NewUUID()}
case Pubrec:
cp = &PubrecPacket{FixedHeader: fh, uuid: uuid.NewUUID()}
case Pubrel:
cp = &PubrelPacket{FixedHeader: fh, uuid: uuid.NewUUID()}
case Pubcomp:
cp = &PubcompPacket{FixedHeader: fh, uuid: uuid.NewUUID()}
case Subscribe:
cp = &SubscribePacket{FixedHeader: fh, uuid: uuid.NewUUID()}
case Suback:
cp = &SubackPacket{FixedHeader: fh, uuid: uuid.NewUUID()}
case Unsubscribe:
cp = &UnsubscribePacket{FixedHeader: fh, uuid: uuid.NewUUID()}
case Unsuback:
cp = &UnsubackPacket{FixedHeader: fh, uuid: uuid.NewUUID()}
case Pingreq:
cp = &PingreqPacket{FixedHeader: fh, uuid: uuid.NewUUID()}
case Pingresp:
cp = &PingrespPacket{FixedHeader: fh, uuid: uuid.NewUUID()}
default:
return nil
}
return cp
}
//Details struct returned by the Details() function called on
//ControlPackets to present details of the Qos and MessageID
//of the ControlPacket
type Details struct {
Qos byte
MessageID uint16
}
//FixedHeader is a struct to hold the decoded information from
//the fixed header of an MQTT ControlPacket
type FixedHeader struct {
MessageType byte
Dup bool
Qos byte
Retain bool
RemainingLength int
}
func (fh FixedHeader) String() string {
return fmt.Sprintf("%s: dup: %t qos: %d retain: %t rLength: %d", PacketNames[fh.MessageType], fh.Dup, fh.Qos, fh.Retain, fh.RemainingLength)
}
func boolToByte(b bool) byte {
switch b {
case true:
return 1
default:
return 0
}
}
func (fh *FixedHeader) pack() bytes.Buffer {
var header bytes.Buffer
header.WriteByte(fh.MessageType<<4 | boolToByte(fh.Dup)<<3 | fh.Qos<<1 | boolToByte(fh.Retain))
header.Write(encodeLength(fh.RemainingLength))
return header
}
func (fh *FixedHeader) unpack(typeAndFlags byte, r io.Reader) {
fh.MessageType = typeAndFlags >> 4
fh.Dup = (typeAndFlags>>3)&0x01 > 0
fh.Qos = (typeAndFlags >> 1) & 0x03
fh.Retain = typeAndFlags&0x01 > 0
fh.RemainingLength = decodeLength(r)
}
func decodeByte(b io.Reader) byte {
num := make([]byte, 1)
b.Read(num)
return num[0]
}
func decodeUint16(b io.Reader) uint16 {
num := make([]byte, 2)
b.Read(num)
return binary.BigEndian.Uint16(num)
}
func encodeUint16(num uint16) []byte {
bytes := make([]byte, 2)
binary.BigEndian.PutUint16(bytes, num)
return bytes
}
func encodeString(field string) []byte {
fieldLength := make([]byte, 2)
binary.BigEndian.PutUint16(fieldLength, uint16(len(field)))
return append(fieldLength, []byte(field)...)
}
func decodeString(b io.Reader) string {
fieldLength := decodeUint16(b)
field := make([]byte, fieldLength)
b.Read(field)
return string(field)
}
func decodeBytes(b io.Reader) []byte {
fieldLength := decodeUint16(b)
field := make([]byte, fieldLength)
b.Read(field)
return field
}
func encodeBytes(field []byte) []byte {
fieldLength := make([]byte, 2)
binary.BigEndian.PutUint16(fieldLength, uint16(len(field)))
return append(fieldLength, field...)
}
func encodeLength(length int) []byte {
var encLength []byte
for {
digit := byte(length % 128)
length /= 128
if length > 0 {
digit |= 0x80
}
encLength = append(encLength, digit)
if length == 0 {
break
}
}
return encLength
}
func decodeLength(r io.Reader) int {
var rLength uint32
var multiplier uint32
b := make([]byte, 1)
for {
io.ReadFull(r, b)
digit := b[0]
rLength |= uint32(digit&127) << multiplier
if (digit & 128) == 0 {
break
}
multiplier += 7
}
return int(rLength)
}

View File

@ -1,159 +0,0 @@
package packets
import (
"bytes"
"testing"
)
func TestPacketNames(t *testing.T) {
if PacketNames[1] != "CONNECT" {
t.Errorf("PacketNames[1] is %s, should be %s", PacketNames[1], "CONNECT")
}
if PacketNames[2] != "CONNACK" {
t.Errorf("PacketNames[2] is %s, should be %s", PacketNames[2], "CONNACK")
}
if PacketNames[3] != "PUBLISH" {
t.Errorf("PacketNames[3] is %s, should be %s", PacketNames[3], "PUBLISH")
}
if PacketNames[4] != "PUBACK" {
t.Errorf("PacketNames[4] is %s, should be %s", PacketNames[4], "PUBACK")
}
if PacketNames[5] != "PUBREC" {
t.Errorf("PacketNames[5] is %s, should be %s", PacketNames[5], "PUBREC")
}
if PacketNames[6] != "PUBREL" {
t.Errorf("PacketNames[6] is %s, should be %s", PacketNames[6], "PUBREL")
}
if PacketNames[7] != "PUBCOMP" {
t.Errorf("PacketNames[7] is %s, should be %s", PacketNames[7], "PUBCOMP")
}
if PacketNames[8] != "SUBSCRIBE" {
t.Errorf("PacketNames[8] is %s, should be %s", PacketNames[8], "SUBSCRIBE")
}
if PacketNames[9] != "SUBACK" {
t.Errorf("PacketNames[9] is %s, should be %s", PacketNames[9], "SUBACK")
}
if PacketNames[10] != "UNSUBSCRIBE" {
t.Errorf("PacketNames[10] is %s, should be %s", PacketNames[10], "UNSUBSCRIBE")
}
if PacketNames[11] != "UNSUBACK" {
t.Errorf("PacketNames[11] is %s, should be %s", PacketNames[11], "UNSUBACK")
}
if PacketNames[12] != "PINGREQ" {
t.Errorf("PacketNames[12] is %s, should be %s", PacketNames[12], "PINGREQ")
}
if PacketNames[13] != "PINGRESP" {
t.Errorf("PacketNames[13] is %s, should be %s", PacketNames[13], "PINGRESP")
}
if PacketNames[14] != "DISCONNECT" {
t.Errorf("PacketNames[14] is %s, should be %s", PacketNames[14], "DISCONNECT")
}
}
func TestPacketConsts(t *testing.T) {
if Connect != 1 {
t.Errorf("Const for Connect is %d, should be %d", Connect, 1)
}
if Connack != 2 {
t.Errorf("Const for Connack is %d, should be %d", Connack, 2)
}
if Publish != 3 {
t.Errorf("Const for Publish is %d, should be %d", Publish, 3)
}
if Puback != 4 {
t.Errorf("Const for Puback is %d, should be %d", Puback, 4)
}
if Pubrec != 5 {
t.Errorf("Const for Pubrec is %d, should be %d", Pubrec, 5)
}
if Pubrel != 6 {
t.Errorf("Const for Pubrel is %d, should be %d", Pubrel, 6)
}
if Pubcomp != 7 {
t.Errorf("Const for Pubcomp is %d, should be %d", Pubcomp, 7)
}
if Subscribe != 8 {
t.Errorf("Const for Subscribe is %d, should be %d", Subscribe, 8)
}
if Suback != 9 {
t.Errorf("Const for Suback is %d, should be %d", Suback, 9)
}
if Unsubscribe != 10 {
t.Errorf("Const for Unsubscribe is %d, should be %d", Unsubscribe, 10)
}
if Unsuback != 11 {
t.Errorf("Const for Unsuback is %d, should be %d", Unsuback, 11)
}
if Pingreq != 12 {
t.Errorf("Const for Pingreq is %d, should be %d", Pingreq, 12)
}
if Pingresp != 13 {
t.Errorf("Const for Pingresp is %d, should be %d", Pingresp, 13)
}
if Disconnect != 14 {
t.Errorf("Const for Disconnect is %d, should be %d", Disconnect, 14)
}
}
func TestConnackConsts(t *testing.T) {
if Accepted != 0x00 {
t.Errorf("Const for Accepted is %d, should be %d", Accepted, 0)
}
if ErrRefusedBadProtocolVersion != 0x01 {
t.Errorf("Const for RefusedBadProtocolVersion is %d, should be %d", ErrRefusedBadProtocolVersion, 1)
}
if ErrRefusedIDRejected != 0x02 {
t.Errorf("Const for RefusedIDRejected is %d, should be %d", ErrRefusedIDRejected, 2)
}
if ErrRefusedServerUnavailable != 0x03 {
t.Errorf("Const for RefusedServerUnavailable is %d, should be %d", ErrRefusedServerUnavailable, 3)
}
if ErrRefusedBadUsernameOrPassword != 0x04 {
t.Errorf("Const for RefusedBadUsernameOrPassword is %d, should be %d", ErrRefusedBadUsernameOrPassword, 4)
}
if ErrRefusedNotAuthorised != 0x05 {
t.Errorf("Const for RefusedNotAuthorised is %d, should be %d", ErrRefusedNotAuthorised, 5)
}
}
func TestConnectPacket(t *testing.T) {
connectPacketBytes := bytes.NewBuffer([]byte{16, 52, 0, 4, 77, 81, 84, 84, 4, 204, 0, 0, 0, 0, 0, 4, 116, 101, 115, 116, 0, 12, 84, 101, 115, 116, 32, 80, 97, 121, 108, 111, 97, 100, 0, 8, 116, 101, 115, 116, 117, 115, 101, 114, 0, 8, 116, 101, 115, 116, 112, 97, 115, 115})
packet, err := ReadPacket(connectPacketBytes)
if err != nil {
t.Fatalf("Error reading packet: %s", err.Error())
}
cp := packet.(*ConnectPacket)
if cp.ProtocolName != "MQTT" {
t.Errorf("Connect Packet ProtocolName is %s, should be %s", cp.ProtocolName, "MQTT")
}
if cp.ProtocolVersion != 4 {
t.Errorf("Connect Packet ProtocolVersion is %d, should be %d", cp.ProtocolVersion, 4)
}
if cp.UsernameFlag != true {
t.Errorf("Connect Packet UsernameFlag is %t, should be %t", cp.UsernameFlag, true)
}
if cp.Username != "testuser" {
t.Errorf("Connect Packet Username is %s, should be %s", cp.Username, "testuser")
}
if cp.PasswordFlag != true {
t.Errorf("Connect Packet PasswordFlag is %t, should be %t", cp.PasswordFlag, true)
}
if string(cp.Password) != "testpass" {
t.Errorf("Connect Packet Password is %s, should be %s", string(cp.Password), "testpass")
}
if cp.WillFlag != true {
t.Errorf("Connect Packet WillFlag is %t, should be %t", cp.WillFlag, true)
}
if cp.WillTopic != "test" {
t.Errorf("Connect Packet WillTopic is %s, should be %s", cp.WillTopic, "test")
}
if cp.WillQos != 1 {
t.Errorf("Connect Packet WillQos is %d, should be %d", cp.WillQos, 1)
}
if cp.WillRetain != false {
t.Errorf("Connect Packet WillRetain is %t, should be %t", cp.WillRetain, false)
}
if string(cp.WillMessage) != "Test Payload" {
t.Errorf("Connect Packet WillMessage is %s, should be %s", string(cp.WillMessage), "Test Payload")
}
}

View File

@ -1,44 +0,0 @@
package packets
import (
"fmt"
"github.com/pborman/uuid"
"io"
)
//PingreqPacket is an internal representation of the fields of the
//Pingreq MQTT packet
type PingreqPacket struct {
FixedHeader
uuid uuid.UUID
}
func (pr *PingreqPacket) String() string {
str := fmt.Sprintf("%s", pr.FixedHeader)
return str
}
func (pr *PingreqPacket) Write(w io.Writer) error {
packet := pr.FixedHeader.pack()
_, err := packet.WriteTo(w)
return err
}
//Unpack decodes the details of a ControlPacket after the fixed
//header has been read
func (pr *PingreqPacket) Unpack(b io.Reader) {
}
//Details returns a Details struct containing the Qos and
//MessageID of this ControlPacket
func (pr *PingreqPacket) Details() Details {
return Details{Qos: 0, MessageID: 0}
}
//UUID returns the unique ID assigned to the ControlPacket when
//it was originally received. Note: this is not related to the
//MessageID field for MQTT packets
func (pr *PingreqPacket) UUID() uuid.UUID {
return pr.uuid
}

View File

@ -1,44 +0,0 @@
package packets
import (
"fmt"
"github.com/pborman/uuid"
"io"
)
//PingrespPacket is an internal representation of the fields of the
//Pingresp MQTT packet
type PingrespPacket struct {
FixedHeader
uuid uuid.UUID
}
func (pr *PingrespPacket) String() string {
str := fmt.Sprintf("%s", pr.FixedHeader)
return str
}
func (pr *PingrespPacket) Write(w io.Writer) error {
packet := pr.FixedHeader.pack()
_, err := packet.WriteTo(w)
return err
}
//Unpack decodes the details of a ControlPacket after the fixed
//header has been read
func (pr *PingrespPacket) Unpack(b io.Reader) {
}
//Details returns a Details struct containing the Qos and
//MessageID of this ControlPacket
func (pr *PingrespPacket) Details() Details {
return Details{Qos: 0, MessageID: 0}
}
//UUID returns the unique ID assigned to the ControlPacket when
//it was originally received. Note: this is not related to the
//MessageID field for MQTT packets
func (pr *PingrespPacket) UUID() uuid.UUID {
return pr.uuid
}

View File

@ -1,50 +0,0 @@
package packets
import (
"fmt"
"github.com/pborman/uuid"
"io"
)
//PubackPacket is an internal representation of the fields of the
//Puback MQTT packet
type PubackPacket struct {
FixedHeader
MessageID uint16
uuid uuid.UUID
}
func (pa *PubackPacket) String() string {
str := fmt.Sprintf("%s\n", pa.FixedHeader)
str += fmt.Sprintf("messageID: %d", pa.MessageID)
return str
}
func (pa *PubackPacket) Write(w io.Writer) error {
var err error
pa.FixedHeader.RemainingLength = 2
packet := pa.FixedHeader.pack()
packet.Write(encodeUint16(pa.MessageID))
_, err = packet.WriteTo(w)
return err
}
//Unpack decodes the details of a ControlPacket after the fixed
//header has been read
func (pa *PubackPacket) Unpack(b io.Reader) {
pa.MessageID = decodeUint16(b)
}
//Details returns a Details struct containing the Qos and
//MessageID of this ControlPacket
func (pa *PubackPacket) Details() Details {
return Details{Qos: pa.Qos, MessageID: pa.MessageID}
}
//UUID returns the unique ID assigned to the ControlPacket when
//it was originally received. Note: this is not related to the
//MessageID field for MQTT packets
func (pa *PubackPacket) UUID() uuid.UUID {
return pa.uuid
}

View File

@ -1,50 +0,0 @@
package packets
import (
"fmt"
"github.com/pborman/uuid"
"io"
)
//PubcompPacket is an internal representation of the fields of the
//Pubcomp MQTT packet
type PubcompPacket struct {
FixedHeader
MessageID uint16
uuid uuid.UUID
}
func (pc *PubcompPacket) String() string {
str := fmt.Sprintf("%s\n", pc.FixedHeader)
str += fmt.Sprintf("MessageID: %d", pc.MessageID)
return str
}
func (pc *PubcompPacket) Write(w io.Writer) error {
var err error
pc.FixedHeader.RemainingLength = 2
packet := pc.FixedHeader.pack()
packet.Write(encodeUint16(pc.MessageID))
_, err = packet.WriteTo(w)
return err
}
//Unpack decodes the details of a ControlPacket after the fixed
//header has been read
func (pc *PubcompPacket) Unpack(b io.Reader) {
pc.MessageID = decodeUint16(b)
}
//Details returns a Details struct containing the Qos and
//MessageID of this ControlPacket
func (pc *PubcompPacket) Details() Details {
return Details{Qos: pc.Qos, MessageID: pc.MessageID}
}
//UUID returns the unique ID assigned to the ControlPacket when
//it was originally received. Note: this is not related to the
//MessageID field for MQTT packets
func (pc *PubcompPacket) UUID() uuid.UUID {
return pc.uuid
}

View File

@ -1,82 +0,0 @@
package packets
import (
"bytes"
"fmt"
"github.com/pborman/uuid"
"io"
)
//PublishPacket is an internal representation of the fields of the
//Publish MQTT packet
type PublishPacket struct {
FixedHeader
TopicName string
MessageID uint16
Payload []byte
uuid uuid.UUID
}
func (p *PublishPacket) String() string {
str := fmt.Sprintf("%s\n", p.FixedHeader)
str += fmt.Sprintf("topicName: %s MessageID: %d\n", p.TopicName, p.MessageID)
str += fmt.Sprintf("payload: %s\n", string(p.Payload))
return str
}
func (p *PublishPacket) Write(w io.Writer) error {
var body bytes.Buffer
var err error
body.Write(encodeString(p.TopicName))
if p.Qos > 0 {
body.Write(encodeUint16(p.MessageID))
}
p.FixedHeader.RemainingLength = body.Len() + len(p.Payload)
packet := p.FixedHeader.pack()
packet.Write(body.Bytes())
packet.Write(p.Payload)
_, err = w.Write(packet.Bytes())
return err
}
//Unpack decodes the details of a ControlPacket after the fixed
//header has been read
func (p *PublishPacket) Unpack(b io.Reader) {
var payloadLength = p.FixedHeader.RemainingLength
p.TopicName = decodeString(b)
if p.Qos > 0 {
p.MessageID = decodeUint16(b)
payloadLength -= len(p.TopicName) + 4
} else {
payloadLength -= len(p.TopicName) + 2
}
p.Payload = make([]byte, payloadLength)
b.Read(p.Payload)
}
//Copy creates a new PublishPacket with the same topic and payload
//but an empty fixed header, useful for when you want to deliver
//a message with different properties such as Qos but the same
//content
func (p *PublishPacket) Copy() *PublishPacket {
newP := NewControlPacket(Publish).(*PublishPacket)
newP.TopicName = p.TopicName
newP.Payload = p.Payload
return newP
}
//Details returns a Details struct containing the Qos and
//MessageID of this ControlPacket
func (p *PublishPacket) Details() Details {
return Details{Qos: p.Qos, MessageID: p.MessageID}
}
//UUID returns the unique ID assigned to the ControlPacket when
//it was originally received. Note: this is not related to the
//MessageID field for MQTT packets
func (p *PublishPacket) UUID() uuid.UUID {
return p.uuid
}

View File

@ -1,50 +0,0 @@
package packets
import (
"fmt"
"github.com/pborman/uuid"
"io"
)
//PubrecPacket is an internal representation of the fields of the
//Pubrec MQTT packet
type PubrecPacket struct {
FixedHeader
MessageID uint16
uuid uuid.UUID
}
func (pr *PubrecPacket) String() string {
str := fmt.Sprintf("%s\n", pr.FixedHeader)
str += fmt.Sprintf("MessageID: %d", pr.MessageID)
return str
}
func (pr *PubrecPacket) Write(w io.Writer) error {
var err error
pr.FixedHeader.RemainingLength = 2
packet := pr.FixedHeader.pack()
packet.Write(encodeUint16(pr.MessageID))
_, err = packet.WriteTo(w)
return err
}
//Unpack decodes the details of a ControlPacket after the fixed
//header has been read
func (pr *PubrecPacket) Unpack(b io.Reader) {
pr.MessageID = decodeUint16(b)
}
//Details returns a Details struct containing the Qos and
//MessageID of this ControlPacket
func (pr *PubrecPacket) Details() Details {
return Details{Qos: pr.Qos, MessageID: pr.MessageID}
}
//UUID returns the unique ID assigned to the ControlPacket when
//it was originally received. Note: this is not related to the
//MessageID field for MQTT packets
func (pr *PubrecPacket) UUID() uuid.UUID {
return pr.uuid
}

View File

@ -1,50 +0,0 @@
package packets
import (
"fmt"
"github.com/pborman/uuid"
"io"
)
//PubrelPacket is an internal representation of the fields of the
//Pubrel MQTT packet
type PubrelPacket struct {
FixedHeader
MessageID uint16
uuid uuid.UUID
}
func (pr *PubrelPacket) String() string {
str := fmt.Sprintf("%s\n", pr.FixedHeader)
str += fmt.Sprintf("MessageID: %d", pr.MessageID)
return str
}
func (pr *PubrelPacket) Write(w io.Writer) error {
var err error
pr.FixedHeader.RemainingLength = 2
packet := pr.FixedHeader.pack()
packet.Write(encodeUint16(pr.MessageID))
_, err = packet.WriteTo(w)
return err
}
//Unpack decodes the details of a ControlPacket after the fixed
//header has been read
func (pr *PubrelPacket) Unpack(b io.Reader) {
pr.MessageID = decodeUint16(b)
}
//Details returns a Details struct containing the Qos and
//MessageID of this ControlPacket
func (pr *PubrelPacket) Details() Details {
return Details{Qos: pr.Qos, MessageID: pr.MessageID}
}
//UUID returns the unique ID assigned to the ControlPacket when
//it was originally received. Note: this is not related to the
//MessageID field for MQTT packets
func (pr *PubrelPacket) UUID() uuid.UUID {
return pr.uuid
}

View File

@ -1,58 +0,0 @@
package packets
import (
"bytes"
"fmt"
"github.com/pborman/uuid"
"io"
)
//SubackPacket is an internal representation of the fields of the
//Suback MQTT packet
type SubackPacket struct {
FixedHeader
MessageID uint16
GrantedQoss []byte
uuid uuid.UUID
}
func (sa *SubackPacket) String() string {
str := fmt.Sprintf("%s\n", sa.FixedHeader)
str += fmt.Sprintf("MessageID: %d", sa.MessageID)
return str
}
func (sa *SubackPacket) Write(w io.Writer) error {
var body bytes.Buffer
var err error
body.Write(encodeUint16(sa.MessageID))
body.Write(sa.GrantedQoss)
sa.FixedHeader.RemainingLength = body.Len()
packet := sa.FixedHeader.pack()
packet.Write(body.Bytes())
_, err = packet.WriteTo(w)
return err
}
//Unpack decodes the details of a ControlPacket after the fixed
//header has been read
func (sa *SubackPacket) Unpack(b io.Reader) {
var qosBuffer bytes.Buffer
sa.MessageID = decodeUint16(b)
qosBuffer.ReadFrom(b)
sa.GrantedQoss = qosBuffer.Bytes()
}
//Details returns a Details struct containing the Qos and
//MessageID of this ControlPacket
func (sa *SubackPacket) Details() Details {
return Details{Qos: 0, MessageID: sa.MessageID}
}
//UUID returns the unique ID assigned to the ControlPacket when
//it was originally received. Note: this is not related to the
//MessageID field for MQTT packets
func (sa *SubackPacket) UUID() uuid.UUID {
return sa.uuid
}

View File

@ -1,68 +0,0 @@
package packets
import (
"bytes"
"fmt"
"github.com/pborman/uuid"
"io"
)
//SubscribePacket is an internal representation of the fields of the
//Subscribe MQTT packet
type SubscribePacket struct {
FixedHeader
MessageID uint16
Topics []string
Qoss []byte
uuid uuid.UUID
}
func (s *SubscribePacket) String() string {
str := fmt.Sprintf("%s\n", s.FixedHeader)
str += fmt.Sprintf("MessageID: %d topics: %s", s.MessageID, s.Topics)
return str
}
func (s *SubscribePacket) Write(w io.Writer) error {
var body bytes.Buffer
var err error
body.Write(encodeUint16(s.MessageID))
for i, topic := range s.Topics {
body.Write(encodeString(topic))
body.WriteByte(s.Qoss[i])
}
s.FixedHeader.RemainingLength = body.Len()
packet := s.FixedHeader.pack()
packet.Write(body.Bytes())
_, err = packet.WriteTo(w)
return err
}
//Unpack decodes the details of a ControlPacket after the fixed
//header has been read
func (s *SubscribePacket) Unpack(b io.Reader) {
s.MessageID = decodeUint16(b)
payloadLength := s.FixedHeader.RemainingLength - 2
for payloadLength > 0 {
topic := decodeString(b)
s.Topics = append(s.Topics, topic)
qos := decodeByte(b)
s.Qoss = append(s.Qoss, qos)
payloadLength -= 2 + len(topic) + 1 //2 bytes of string length, plus string, plus 1 byte for Qos
}
}
//Details returns a Details struct containing the Qos and
//MessageID of this ControlPacket
func (s *SubscribePacket) Details() Details {
return Details{Qos: 1, MessageID: s.MessageID}
}
//UUID returns the unique ID assigned to the ControlPacket when
//it was originally received. Note: this is not related to the
//MessageID field for MQTT packets
func (s *SubscribePacket) UUID() uuid.UUID {
return s.uuid
}

View File

@ -1,50 +0,0 @@
package packets
import (
"fmt"
"github.com/pborman/uuid"
"io"
)
//UnsubackPacket is an internal representation of the fields of the
//Unsuback MQTT packet
type UnsubackPacket struct {
FixedHeader
MessageID uint16
uuid uuid.UUID
}
func (ua *UnsubackPacket) String() string {
str := fmt.Sprintf("%s\n", ua.FixedHeader)
str += fmt.Sprintf("MessageID: %d", ua.MessageID)
return str
}
func (ua *UnsubackPacket) Write(w io.Writer) error {
var err error
ua.FixedHeader.RemainingLength = 2
packet := ua.FixedHeader.pack()
packet.Write(encodeUint16(ua.MessageID))
_, err = packet.WriteTo(w)
return err
}
//Unpack decodes the details of a ControlPacket after the fixed
//header has been read
func (ua *UnsubackPacket) Unpack(b io.Reader) {
ua.MessageID = decodeUint16(b)
}
//Details returns a Details struct containing the Qos and
//MessageID of this ControlPacket
func (ua *UnsubackPacket) Details() Details {
return Details{Qos: 0, MessageID: ua.MessageID}
}
//UUID returns the unique ID assigned to the ControlPacket when
//it was originally received. Note: this is not related to the
//MessageID field for MQTT packets
func (ua *UnsubackPacket) UUID() uuid.UUID {
return ua.uuid
}

View File

@ -1,61 +0,0 @@
package packets
import (
"bytes"
"fmt"
"github.com/pborman/uuid"
"io"
)
//UnsubscribePacket is an internal representation of the fields of the
//Unsubscribe MQTT packet
type UnsubscribePacket struct {
FixedHeader
MessageID uint16
Topics []string
uuid uuid.UUID
}
func (u *UnsubscribePacket) String() string {
str := fmt.Sprintf("%s\n", u.FixedHeader)
str += fmt.Sprintf("MessageID: %d", u.MessageID)
return str
}
func (u *UnsubscribePacket) Write(w io.Writer) error {
var body bytes.Buffer
var err error
body.Write(encodeUint16(u.MessageID))
for _, topic := range u.Topics {
body.Write(encodeString(topic))
}
u.FixedHeader.RemainingLength = body.Len()
packet := u.FixedHeader.pack()
packet.Write(body.Bytes())
_, err = packet.WriteTo(w)
return err
}
//Unpack decodes the details of a ControlPacket after the fixed
//header has been read
func (u *UnsubscribePacket) Unpack(b io.Reader) {
u.MessageID = decodeUint16(b)
var topic string
for topic = decodeString(b); topic != ""; topic = decodeString(b) {
u.Topics = append(u.Topics, topic)
}
}
//Details returns a Details struct containing the Qos and
//MessageID of this ControlPacket
func (u *UnsubscribePacket) Details() Details {
return Details{Qos: 1, MessageID: u.MessageID}
}
//UUID returns the unique ID assigned to the ControlPacket when
//it was originally received. Note: this is not related to the
//MessageID field for MQTT packets
func (u *UnsubscribePacket) UUID() uuid.UUID {
return u.uuid
}

View File

@ -1,73 +0,0 @@
/*
* Copyright (c) 2013 IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Seth Hoenig
* Allan Stockdill-Mander
* Mike Robertson
*/
package mqtt
import (
"errors"
"git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets"
"sync"
"time"
)
type lastcontact struct {
sync.Mutex
lasttime time.Time
}
func (l *lastcontact) update() {
l.Lock()
defer l.Unlock()
l.lasttime = time.Now()
}
func (l *lastcontact) get() time.Time {
l.Lock()
defer l.Unlock()
return l.lasttime
}
func keepalive(c *Client) {
DEBUG.Println(PNG, "keepalive starting")
c.pingOutstanding = false
for {
select {
case <-c.stop:
DEBUG.Println(PNG, "keepalive stopped")
c.workers.Done()
return
default:
last := uint(time.Since(c.lastContact.get()).Seconds())
//DEBUG.Printf("%s last contact: %d (timeout: %d)", PNG, last, uint(c.options.KeepAlive.Seconds()))
if last > uint(c.options.KeepAlive.Seconds()) {
if !c.pingOutstanding {
DEBUG.Println(PNG, "keepalive sending ping")
ping := packets.NewControlPacket(packets.Pingreq).(*packets.PingreqPacket)
//We don't want to wait behind large messages being sent, the Write call
//will block until it it able to send the packet.
ping.Write(c.conn)
c.pingOutstanding = true
} else {
CRITICAL.Println(PNG, "pingresp not received, disconnecting")
c.workers.Done()
c.internalConnLost(errors.New("pingresp not received, disconnecting"))
return
}
}
time.Sleep(1 * time.Second)
}
}
}

View File

@ -1,162 +0,0 @@
/*
* Copyright (c) 2013 IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Seth Hoenig
* Allan Stockdill-Mander
* Mike Robertson
*/
package mqtt
import (
"container/list"
"git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets"
"strings"
"sync"
)
// route is a type which associates MQTT Topic strings with a
// callback to be executed upon the arrival of a message associated
// with a subscription to that topic.
type route struct {
topic string
callback MessageHandler
}
// match takes a slice of strings which represent the route being tested having been split on '/'
// separators, and a slice of strings representing the topic string in the published message, similarly
// split.
// The function determines if the topic string matches the route according to the MQTT topic rules
// and returns a boolean of the outcome
func match(route []string, topic []string) bool {
if len(route) == 0 {
if len(topic) == 0 {
return true
}
return false
}
if len(topic) == 0 {
if route[0] == "#" {
return true
}
return false
}
if route[0] == "#" {
return true
}
if (route[0] == "+") || (route[0] == topic[0]) {
return match(route[1:], topic[1:])
}
return false
}
func routeIncludesTopic(route, topic string) bool {
return match(strings.Split(route, "/"), strings.Split(topic, "/"))
}
// match takes the topic string of the published message and does a basic compare to the
// string of the current Route, if they match it returns true
func (r *route) match(topic string) bool {
return r.topic == topic || routeIncludesTopic(r.topic, topic)
}
type router struct {
sync.RWMutex
routes *list.List
defaultHandler MessageHandler
messages chan *packets.PublishPacket
stop chan bool
}
// newRouter returns a new instance of a Router and channel which can be used to tell the Router
// to stop
func newRouter() (*router, chan bool) {
router := &router{routes: list.New(), messages: make(chan *packets.PublishPacket), stop: make(chan bool)}
stop := router.stop
return router, stop
}
// addRoute takes a topic string and MessageHandler callback. It looks in the current list of
// routes to see if there is already a matching Route. If there is it replaces the current
// callback with the new one. If not it add a new entry to the list of Routes.
func (r *router) addRoute(topic string, callback MessageHandler) {
r.Lock()
defer r.Unlock()
for e := r.routes.Front(); e != nil; e = e.Next() {
if e.Value.(*route).match(topic) {
r := e.Value.(*route)
r.callback = callback
return
}
}
r.routes.PushBack(&route{topic: topic, callback: callback})
}
// deleteRoute takes a route string, looks for a matching Route in the list of Routes. If
// found it removes the Route from the list.
func (r *router) deleteRoute(topic string) {
r.Lock()
defer r.Unlock()
for e := r.routes.Front(); e != nil; e = e.Next() {
if e.Value.(*route).match(topic) {
r.routes.Remove(e)
return
}
}
}
// setDefaultHandler assigns a default callback that will be called if no matching Route
// is found for an incoming Publish.
func (r *router) setDefaultHandler(handler MessageHandler) {
r.defaultHandler = handler
}
// matchAndDispatch takes a channel of Message pointers as input and starts a go routine that
// takes messages off the channel, matches them against the internal route list and calls the
// associated callback (or the defaultHandler, if one exists and no other route matched). If
// anything is sent down the stop channel the function will end.
func (r *router) matchAndDispatch(messages <-chan *packets.PublishPacket, order bool, client *Client) {
go func() {
for {
select {
case message := <-messages:
sent := false
r.RLock()
for e := r.routes.Front(); e != nil; e = e.Next() {
if e.Value.(*route).match(message.TopicName) {
if order {
r.RUnlock()
e.Value.(*route).callback(client, messageFromPublish(message))
r.RLock()
} else {
go e.Value.(*route).callback(client, messageFromPublish(message))
}
sent = true
}
}
r.RUnlock()
if !sent && r.defaultHandler != nil {
if order {
r.RLock()
r.defaultHandler(client, messageFromPublish(message))
r.RUnlock()
} else {
go r.defaultHandler(client, messageFromPublish(message))
}
}
case <-r.stop:
return
}
}
}()
}

View File

@ -1,18 +0,0 @@
package main
import (
"time"
MQTT "git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git"
)
func main() {
opts := MQTT.NewClientOptions().AddBroker("tcp://localhost:1883")
c := MQTT.NewClient(opts)
if token := c.Connect(); token.Wait() && token.Error() != nil {
panic(token.Error())
}
for {
time.Sleep(1 * time.Second)
}
}

View File

@ -1,10 +0,0 @@
#!/bin/sh
go clean
for file in *.go
do
echo -n "Compiling $file ..."
go build "$file"
echo " done."
done

View File

@ -1,23 +0,0 @@
package main
import (
"fmt"
"time"
MQTT "git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git"
)
func main() {
opts := MQTT.NewClientOptions().AddBroker("tcp://localhost:1883")
opts.SetCleanSession(true)
c := MQTT.NewClient(opts)
if token := c.Connect(); token.Wait() && token.Error() != nil {
panic(token.Error())
}
fmt.Println("plz mosquitto goes down now")
time.Sleep(5 * time.Second)
c.Disconnect(200)
time.Sleep(5 * time.Second)
}

View File

@ -1,96 +0,0 @@
/*
* Copyright (c) 2013 IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Seth Hoenig
* Allan Stockdill-Mander
* Mike Robertson
*/
// This demonstrates how to implement your own Store interface and provide
// it to the go-mqtt client.
package main
import (
"fmt"
"time"
MQTT "git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git"
"git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets"
)
// This NoOpStore type implements the go-mqtt/Store interface, which
// allows it to be used by the go-mqtt client library. However, it is
// highly recommended that you do not use this NoOpStore in production,
// because it will NOT provide any sort of guaruntee of message delivery.
type NoOpStore struct {
// Contain nothing
}
func (store *NoOpStore) Open() {
// Do nothing
}
func (store *NoOpStore) Put(string, packets.ControlPacket) {
// Do nothing
}
func (store *NoOpStore) Get(string) packets.ControlPacket {
// Do nothing
return nil
}
func (store *NoOpStore) Del(string) {
// Do nothing
}
func (store *NoOpStore) All() []string {
return nil
}
func (store *NoOpStore) Close() {
// Do Nothing
}
func (store *NoOpStore) Reset() {
// Do Nothing
}
func main() {
myNoOpStore := &NoOpStore{}
opts := MQTT.NewClientOptions()
opts.AddBroker("tcp://iot.eclipse.org:1883")
opts.SetClientID("custom-store")
opts.SetStore(myNoOpStore)
var callback MQTT.MessageHandler = func(client *MQTT.Client, msg MQTT.Message) {
fmt.Printf("TOPIC: %s\n", msg.Topic())
fmt.Printf("MSG: %s\n", msg.Payload())
}
c := MQTT.NewClient(opts)
if token := c.Connect(); token.Wait() && token.Error() != nil {
panic(token.Error())
}
c.Subscribe("/go-mqtt/sample", 0, callback)
for i := 0; i < 5; i++ {
text := fmt.Sprintf("this is msg #%d!", i)
token := c.Publish("/go-mqtt/sample", 0, false, text)
token.Wait()
}
for i := 1; i < 5; i++ {
time.Sleep(1 * time.Second)
}
c.Disconnect(250)
}

View File

@ -1,745 +0,0 @@
# Config file for mosquitto
#
# See mosquitto.conf(5) for more information.
#
# Default values are shown, uncomment to change.
#
# Use the # character to indicate a comment, but only if it is the
# very first character on the line.
# =================================================================
# General configuration
# =================================================================
# Time in seconds to wait before resending an outgoing QoS=1 or
# QoS=2 message.
#retry_interval 20
# Time in seconds between updates of the $SYS tree.
# Set to 0 to disable the publishing of the $SYS tree.
#sys_interval 10
# Time in seconds between cleaning the internal message store of
# unreferenced messages. Lower values will result in lower memory
# usage but more processor time, higher values will have the
# opposite effect.
# Setting a value of 0 means the unreferenced messages will be
# disposed of as quickly as possible.
#store_clean_interval 10
# Write process id to a file. Default is a blank string which means
# a pid file shouldn't be written.
# This should be set to /var/run/mosquitto.pid if mosquitto is
# being run automatically on boot with an init script and
# start-stop-daemon or similar.
#pid_file
# When run as root, drop privileges to this user and its primary
# group.
# Leave blank to stay as root, but this is not recommended.
# If run as a non-root user, this setting has no effect.
# Note that on Windows this has no effect and so mosquitto should
# be started by the user you wish it to run as.
#user mosquitto
# The maximum number of QoS 1 and 2 messages currently inflight per
# client.
# This includes messages that are partway through handshakes and
# those that are being retried. Defaults to 20. Set to 0 for no
# maximum. Setting to 1 will guarantee in-order delivery of QoS 1
# and 2 messages.
#max_inflight_messages 20
# The maximum number of QoS 1 and 2 messages to hold in a queue
# above those that are currently in-flight. Defaults to 100. Set
# to 0 for no maximum (not recommended).
# See also queue_qos0_messages.
#max_queued_messages 100
# Set to true to queue messages with QoS 0 when a persistent client is
# disconnected. These messages are included in the limit imposed by
# max_queued_messages.
# Defaults to false.
# This is a non-standard option for the MQTT v3.1 spec but is allowed in
# v3.1.1.
#queue_qos0_messages false
# This option sets the maximum publish payload size that the broker will allow.
# Received messages that exceed this size will not be accepted by the broker.
# The default value is 0, which means that all valid MQTT messages are
# accepted. MQTT imposes a maximum payload size of 268435455 bytes.
#message_size_limit 0
# This option controls whether a client is allowed to connect with a zero
# length client id or not. This option only affects clients using MQTT v3.1.1
# and later. If set to false, clients connecting with a zero length client id
# are disconnected. If set to true, clients will be allocated a client id by
# the broker. This means it is only useful for clients with clean session set
# to true.
#allow_zero_length_clientid true
# If allow_zero_length_clientid is true, this option allows you to set a prefix
# to automatically generated client ids to aid visibility in logs.
#auto_id_prefix
# This option allows persistent clients (those with clean session set to false)
# to be removed if they do not reconnect within a certain time frame.
#
# This is a non-standard option in MQTT V3.1 but allowed in MQTT v3.1.1.
#
# Badly designed clients may set clean session to false whilst using a randomly
# generated client id. This leads to persistent clients that will never
# reconnect. This option allows these clients to be removed.
#
# The expiration period should be an integer followed by one of d w m y for
# day, week, month and year respectively. For example
#
# persistent_client_expiration 2m
# persistent_client_expiration 14d
# persistent_client_expiration 1y
#
# The default if not set is to never expire persistent clients.
#persistent_client_expiration
# If a client is subscribed to multiple subscriptions that overlap, e.g. foo/#
# and foo/+/baz , then MQTT expects that when the broker receives a message on
# a topic that matches both subscriptions, such as foo/bar/baz, then the client
# should only receive the message once.
# Mosquitto keeps track of which clients a message has been sent to in order to
# meet this requirement. The allow_duplicate_messages option allows this
# behaviour to be disabled, which may be useful if you have a large number of
# clients subscribed to the same set of topics and are very concerned about
# minimising memory usage.
# It can be safely set to true if you know in advance that your clients will
# never have overlapping subscriptions, otherwise your clients must be able to
# correctly deal with duplicate messages even when then have QoS=2.
#allow_duplicate_messages false
# The MQTT specification requires that the QoS of a message delivered to a
# subscriber is never upgraded to match the QoS of the subscription. Enabling
# this option changes this behaviour. If upgrade_outgoing_qos is set true,
# messages sent to a subscriber will always match the QoS of its subscription.
# This is a non-standard option explicitly disallowed by the spec.
#upgrade_outgoing_qos false
# =================================================================
# Default listener
# =================================================================
# IP address/hostname to bind the default listener to. If not
# given, the default listener will not be bound to a specific
# address and so will be accessible to all network interfaces.
# bind_address ip-address/host name
#bind_address
# Port to use for the default listener.
#port 1883
# The maximum number of client connections to allow. This is
# a per listener setting.
# Default is -1, which means unlimited connections.
# Note that other process limits mean that unlimited connections
# are not really possible. Typically the default maximum number of
# connections possible is around 1024.
#max_connections -1
# -----------------------------------------------------------------
# Certificate based SSL/TLS support
# -----------------------------------------------------------------
# The following options can be used to enable SSL/TLS support for
# this listener. Note that the recommended port for MQTT over TLS
# is 8883, but this must be set manually.
#
# See also the mosquitto-tls man page.
# At least one of cafile or capath must be defined. They both
# define methods of accessing the PEM encoded Certificate
# Authority certificates that have signed your server certificate
# and that you wish to trust.
# cafile defines the path to a file containing the CA certificates.
# capath defines a directory that will be searched for files
# containing the CA certificates. For capath to work correctly, the
# certificate files must have ".crt" as the file ending and you must run
# "c_rehash <path to capath>" each time you add/remove a certificate.
#cafile
#capath
# Path to the PEM encoded server certificate.
#certfile
# Path to the PEM encoded keyfile.
#keyfile
# This option defines the version of the TLS protocol to use for this listener.
# The default value will always be the highest version that is available for
# the version of openssl that the broker was compiled against. For openssl >=
# 1.0.1 the valid values are tlsv1.2 tlsv1.1 and tlsv1. For openssl < 1.0.1 the
# valid values are tlsv1.
#tls_version
# By default a TLS enabled listener will operate in a similar fashion to a
# https enabled web server, in that the server has a certificate signed by a CA
# and the client will verify that it is a trusted certificate. The overall aim
# is encryption of the network traffic. By setting require_certificate to true,
# the client must provide a valid certificate in order for the network
# connection to proceed. This allows access to the broker to be controlled
# outside of the mechanisms provided by MQTT.
#require_certificate false
# If require_certificate is true, you may set use_identity_as_username to true
# to use the CN value from the client certificate as a username. If this is
# true, the password_file option will not be used for this listener.
#use_identity_as_username false
# If you have require_certificate set to true, you can create a certificate
# revocation list file to revoke access to particular client certificates. If
# you have done this, use crlfile to point to the PEM encoded revocation file.
#crlfile
# If you wish to control which encryption ciphers are used, use the ciphers
# option. The list of available ciphers can be optained using the "openssl
# ciphers" command and should be provided in the same format as the output of
# that command.
# If unset defaults to DEFAULT:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2:@STRENGTH
#ciphers DEFAULT:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2:@STRENGTH
# -----------------------------------------------------------------
# Pre-shared-key based SSL/TLS support
# -----------------------------------------------------------------
# The following options can be used to enable PSK based SSL/TLS support for
# this listener. Note that the recommended port for MQTT over TLS is 8883, but
# this must be set manually.
#
# See also the mosquitto-tls man page and the "Certificate based SSL/TLS
# support" section. Only one of certificate or PSK encryption support can be
# enabled for any listener.
# The psk_hint option enables pre-shared-key support for this listener and also
# acts as an identifier for this listener. The hint is sent to clients and may
# be used locally to aid authentication. The hint is a free form string that
# doesn't have much meaning in itself, so feel free to be creative.
# If this option is provided, see psk_file to define the pre-shared keys to be
# used or create a security plugin to handle them.
#psk_hint
# Set use_identity_as_username to have the psk identity sent by the client used
# as its username. Authentication will be carried out using the PSK rather than
# the MQTT username/password and so password_file will not be used for this
# listener.
#use_identity_as_username false
# When using PSK, the encryption ciphers used will be chosen from the list of
# available PSK ciphers. If you want to control which ciphers are available,
# use the "ciphers" option. The list of available ciphers can be optained
# using the "openssl ciphers" command and should be provided in the same format
# as the output of that command.
#ciphers
# =================================================================
# Extra listeners
# =================================================================
# Listen on a port/ip address combination. By using this variable
# multiple times, mosquitto can listen on more than one port. If
# this variable is used and neither bind_address nor port given,
# then the default listener will not be started.
# The port number to listen on must be given. Optionally, an ip
# address or host name may be supplied as a second argument. In
# this case, mosquitto will attempt to bind the listener to that
# address and so restrict access to the associated network and
# interface. By default, mosquitto will listen on all interfaces.
# listener port-number [ip address/host name]
#listener
# The maximum number of client connections to allow. This is
# a per listener setting.
# Default is -1, which means unlimited connections.
# Note that other process limits mean that unlimited connections
# are not really possible. Typically the default maximum number of
# connections possible is around 1024.
#max_connections -1
# The listener can be restricted to operating within a topic hierarchy using
# the mount_point option. This is achieved be prefixing the mount_point string
# to all topics for any clients connected to this listener. This prefixing only
# happens internally to the broker; the client will not see the prefix.
#mount_point
# -----------------------------------------------------------------
# Certificate based SSL/TLS support
# -----------------------------------------------------------------
# The following options can be used to enable certificate based SSL/TLS support
# for this listener. Note that the recommended port for MQTT over TLS is 8883,
# but this must be set manually.
#
# See also the mosquitto-tls man page and the "Pre-shared-key based SSL/TLS
# support" section. Only one of certificate or PSK encryption support can be
# enabled for any listener.
# At least one of cafile or capath must be defined to enable certificate based
# TLS encryption. They both define methods of accessing the PEM encoded
# Certificate Authority certificates that have signed your server certificate
# and that you wish to trust.
# cafile defines the path to a file containing the CA certificates.
# capath defines a directory that will be searched for files
# containing the CA certificates. For capath to work correctly, the
# certificate files must have ".crt" as the file ending and you must run
# "c_rehash <path to capath>" each time you add/remove a certificate.
#cafile
#capath
# Path to the PEM encoded server certificate.
#certfile
# Path to the PEM encoded keyfile.
#keyfile
# By default an TLS enabled listener will operate in a similar fashion to a
# https enabled web server, in that the server has a certificate signed by a CA
# and the client will verify that it is a trusted certificate. The overall aim
# is encryption of the network traffic. By setting require_certificate to true,
# the client must provide a valid certificate in order for the network
# connection to proceed. This allows access to the broker to be controlled
# outside of the mechanisms provided by MQTT.
#require_certificate false
# If require_certificate is true, you may set use_identity_as_username to true
# to use the CN value from the client certificate as a username. If this is
# true, the password_file option will not be used for this listener.
#use_identity_as_username false
# If you have require_certificate set to true, you can create a certificate
# revocation list file to revoke access to particular client certificates. If
# you have done this, use crlfile to point to the PEM encoded revocation file.
#crlfile
# If you wish to control which encryption ciphers are used, use the ciphers
# option. The list of available ciphers can be optained using the "openssl
# ciphers" command and should be provided in the same format as the output of
# that command.
#ciphers
# -----------------------------------------------------------------
# Pre-shared-key based SSL/TLS support
# -----------------------------------------------------------------
# The following options can be used to enable PSK based SSL/TLS support for
# this listener. Note that the recommended port for MQTT over TLS is 8883, but
# this must be set manually.
#
# See also the mosquitto-tls man page and the "Certificate based SSL/TLS
# support" section. Only one of certificate or PSK encryption support can be
# enabled for any listener.
# The psk_hint option enables pre-shared-key support for this listener and also
# acts as an identifier for this listener. The hint is sent to clients and may
# be used locally to aid authentication. The hint is a free form string that
# doesn't have much meaning in itself, so feel free to be creative.
# If this option is provided, see psk_file to define the pre-shared keys to be
# used or create a security plugin to handle them.
#psk_hint
# Set use_identity_as_username to have the psk identity sent by the client used
# as its username. Authentication will be carried out using the PSK rather than
# the MQTT username/password and so password_file will not be used for this
# listener.
#use_identity_as_username false
# When using PSK, the encryption ciphers used will be chosen from the list of
# available PSK ciphers. If you want to control which ciphers are available,
# use the "ciphers" option. The list of available ciphers can be optained
# using the "openssl ciphers" command and should be provided in the same format
# as the output of that command.
#ciphers
# =================================================================
# Persistence
# =================================================================
# If persistence is enabled, save the in-memory database to disk
# every autosave_interval seconds. If set to 0, the persistence
# database will only be written when mosquitto exits. See also
# autosave_on_changes.
# Note that writing of the persistence database can be forced by
# sending mosquitto a SIGUSR1 signal.
#autosave_interval 1800
# If true, mosquitto will count the number of subscription changes, retained
# messages received and queued messages and if the total exceeds
# autosave_interval then the in-memory database will be saved to disk.
# If false, mosquitto will save the in-memory database to disk by treating
# autosave_interval as a time in seconds.
#autosave_on_changes false
# Save persistent message data to disk (true/false).
# This saves information about all messages, including
# subscriptions, currently in-flight messages and retained
# messages.
# retained_persistence is a synonym for this option.
#persistence false
# The filename to use for the persistent database, not including
# the path.
#persistence_file mosquitto.db
# Location for persistent database. Must include trailing /
# Default is an empty string (current directory).
# Set to e.g. /var/lib/mosquitto/ if running as a proper service on Linux or
# similar.
#persistence_location
# =================================================================
# Logging
# =================================================================
# Places to log to. Use multiple log_dest lines for multiple
# logging destinations.
# Possible destinations are: stdout stderr syslog topic file
#
# stdout and stderr log to the console on the named output.
#
# syslog uses the userspace syslog facility which usually ends up
# in /var/log/messages or similar.
#
# topic logs to the broker topic '$SYS/broker/log/<severity>',
# where severity is one of D, E, W, N, I, M which are debug, error,
# warning, notice, information and message. Message type severity is used by
# the subscribe/unsubscribe log_types and publishes log messages to
# $SYS/broker/log/M/susbcribe or $SYS/broker/log/M/unsubscribe.
#
# The file destination requires an additional parameter which is the file to be
# logged to, e.g. "log_dest file /var/log/mosquitto.log". The file will be
# closed and reopened when the broker receives a HUP signal. Only a single file
# destination may be configured.
#
# Note that if the broker is running as a Windows service it will default to
# "log_dest none" and neither stdout nor stderr logging is available.
# Use "log_dest none" if you wish to disable logging.
log_dest stdout
# Types of messages to log. Use multiple log_type lines for logging
# multiple types of messages.
# Possible types are: debug, error, warning, notice, information,
# none, subscribe, unsubscribe, all.
# Note that debug type messages are for decoding the incoming/outgoing
# network packets. They are not logged in "topics".
#log_type error
#log_type warning
#log_type notice
log_type information
# If set to true, client connection and disconnection messages will be included
# in the log.
#connection_messages true
# If set to true, add a timestamp value to each log message.
#log_timestamp true
# =================================================================
# Security
# =================================================================
# If set, only clients that have a matching prefix on their
# clientid will be allowed to connect to the broker. By default,
# all clients may connect.
# For example, setting "secure-" here would mean a client "secure-
# client" could connect but another with clientid "mqtt" couldn't.
#clientid_prefixes
# Boolean value that determines whether clients that connect
# without providing a username are allowed to connect. If set to
# false then a password file should be created (see the
# password_file option) to control authenticated client access.
# Defaults to true.
#allow_anonymous true
# In addition to the clientid_prefixes, allow_anonymous and TLS
# authentication options, username based authentication is also
# possible. The default support is described in "Default
# authentication and topic access control" below. The auth_plugin
# allows another authentication method to be used.
# Specify the path to the loadable plugin and see the
# "Authentication and topic access plugin options" section below.
#auth_plugin
# -----------------------------------------------------------------
# Default authentication and topic access control
# -----------------------------------------------------------------
# Control access to the broker using a password file. This file can be
# generated using the mosquitto_passwd utility. If TLS support is not compiled
# into mosquitto (it is recommended that TLS support should be included) then
# plain text passwords are used, in which case the file should be a text file
# with lines in the format:
# username:password
# The password (and colon) may be omitted if desired, although this
# offers very little in the way of security.
#
# See the TLS client require_certificate and use_identity_as_username options
# for alternative authentication options.
password_file pwfile.example
# Access may also be controlled using a pre-shared-key file. This requires
# TLS-PSK support and a listener configured to use it. The file should be text
# lines in the format:
# identity:key
# The key should be in hexadecimal format without a leading "0x".
#psk_file
# Control access to topics on the broker using an access control list
# file. If this parameter is defined then only the topics listed will
# have access.
# If the first character of a line of the ACL file is a # it is treated as a
# comment.
# Topic access is added with lines of the format:
#
# topic [read|write] <topic>
#
# The access type is controlled using "read" or "write". This parameter
# is optional - if not given then the access is read/write.
# <topic> can contain the + or # wildcards as in subscriptions.
#
# The first set of topics are applied to anonymous clients, assuming
# allow_anonymous is true. User specific topic ACLs are added after a
# user line as follows:
#
# user <username>
#
# The username referred to here is the same as in password_file. It is
# not the clientid.
#
#
# If is also possible to define ACLs based on pattern substitution within the
# topic. The patterns available for substition are:
#
# %c to match the client id of the client
# %u to match the username of the client
#
# The substitution pattern must be the only text for that level of hierarchy.
#
# The form is the same as for the topic keyword, but using pattern as the
# keyword.
# Pattern ACLs apply to all users even if the "user" keyword has previously
# been given.
#
# If using bridges with usernames and ACLs, connection messages can be allowed
# with the following pattern:
# pattern write $SYS/broker/connection/%c/state
#
# pattern [read|write] <topic>
#
# Example:
#
# pattern write sensor/%u/data
#
#acl_file
# -----------------------------------------------------------------
# Authentication and topic access plugin options
# -----------------------------------------------------------------
# If the auth_plugin option above is used, define options to pass to the
# plugin here as described by the plugin instructions. All options named
# using the format auth_opt_* will be passed to the plugin, for example:
#
# auth_opt_db_host
# auth_opt_db_port
# auth_opt_db_username
# auth_opt_db_password
# =================================================================
# Bridges
# =================================================================
# A bridge is a way of connecting multiple MQTT brokers together.
# Create a new bridge using the "connection" option as described below. Set
# options for the bridges using the remaining parameters. You must specify the
# address and at least one topic to subscribe to.
# Each connection must have a unique name.
# The address line may have multiple host address and ports specified. See
# below in the round_robin description for more details on bridge behaviour if
# multiple addresses are used.
# The direction that the topic will be shared can be chosen by
# specifying out, in or both, where the default value is out.
# The QoS level of the bridged communication can be specified with the next
# topic option. The default QoS level is 0, to change the QoS the topic
# direction must also be given.
# The local and remote prefix options allow a topic to be remapped when it is
# bridged to/from the remote broker. This provides the ability to place a topic
# tree in an appropriate location.
# For more details see the mosquitto.conf man page.
# Multiple topics can be specified per connection, but be careful
# not to create any loops.
# If you are using bridges with cleansession set to false (the default), then
# you may get unexpected behaviour from incoming topics if you change what
# topics you are subscribing to. This is because the remote broker keeps the
# subscription for the old topic. If you have this problem, connect your bridge
# with cleansession set to true, then reconnect with cleansession set to false
# as normal.
#connection <name>
#address <host>[:<port>] [<host>[:<port>]]
#topic <topic> [[[out | in | both] qos-level] local-prefix remote-prefix]
# If the bridge has more than one address given in the address/addresses
# configuration, the round_robin option defines the behaviour of the bridge on
# a failure of the bridge connection. If round_robin is false, the default
# value, then the first address is treated as the main bridge connection. If
# the connection fails, the other secondary addresses will be attempted in
# turn. Whilst connected to a secondary bridge, the bridge will periodically
# attempt to reconnect to the main bridge until successful.
# If round_robin is true, then all addresses are treated as equals. If a
# connection fails, the next address will be tried and if successful will
# remain connected until it fails
#round_robin false
# Set the client id for this bridge connection. If not defined,
# this defaults to 'name.hostname' where name is the connection
# name and hostname is the hostname of this computer.
#clientid
# Set the clean session variable for this bridge.
# When set to true, when the bridge disconnects for any reason, all
# messages and subscriptions will be cleaned up on the remote
# broker. Note that with cleansession set to true, there may be a
# significant amount of retained messages sent when the bridge
# reconnects after losing its connection.
# When set to false, the subscriptions and messages are kept on the
# remote broker, and delivered when the bridge reconnects.
#cleansession false
# If set to true, publish notification messages to the local and remote brokers
# giving information about the state of the bridge connection. Retained
# messages are published to the topic $SYS/broker/connection/<clientid>/state
# unless the notification_topic option is used.
# If the message is 1 then the connection is active, or 0 if the connection has
# failed.
#notifications true
# Choose the topic on which notification messages for this bridge are
# published. If not set, messages are published on the topic
# $SYS/broker/connection/<clientid>/state
#notification_topic
# Set the keepalive interval for this bridge connection, in
# seconds.
#keepalive_interval 60
# Set the start type of the bridge. This controls how the bridge starts and
# can be one of three types: automatic, lazy and once. Note that RSMB provides
# a fourth start type "manual" which isn't currently supported by mosquitto.
#
# "automatic" is the default start type and means that the bridge connection
# will be started automatically when the broker starts and also restarted
# after a short delay (30 seconds) if the connection fails.
#
# Bridges using the "lazy" start type will be started automatically when the
# number of queued messages exceeds the number set with the "threshold"
# parameter. It will be stopped automatically after the time set by the
# "idle_timeout" parameter. Use this start type if you wish the connection to
# only be active when it is needed.
#
# A bridge using the "once" start type will be started automatically when the
# broker starts but will not be restarted if the connection fails.
#start_type automatic
# Set the amount of time a bridge using the automatic start type will wait
# until attempting to reconnect. Defaults to 30 seconds.
#restart_timeout 30
# Set the amount of time a bridge using the lazy start type must be idle before
# it will be stopped. Defaults to 60 seconds.
#idle_timeout 60
# Set the number of messages that need to be queued for a bridge with lazy
# start type to be restarted. Defaults to 10 messages.
# Must be less than max_queued_messages.
#threshold 10
# If try_private is set to true, the bridge will attempt to indicate to the
# remote broker that it is a bridge not an ordinary client. If successful, this
# means that loop detection will be more effective and that retained messages
# will be propagated correctly. Not all brokers support this feature so it may
# be necessary to set try_private to false if your bridge does not connect
# properly.
#try_private true
# Set the username to use when connecting to an MQTT v3.1 broker
# that requires authentication.
#username
# Set the password to use when connecting to an MQTT v3.1 broker
# that requires authentication. This option is only used if
# username is also set.
#password
# -----------------------------------------------------------------
# Certificate based SSL/TLS support
# -----------------------------------------------------------------
# Either bridge_cafile or bridge_capath must be defined to enable TLS support
# for this bridge.
# bridge_cafile defines the path to a file containing the
# Certificate Authority certificates that have signed the remote broker
# certificate.
# bridge_capath defines a directory that will be searched for files containing
# the CA certificates. For bridge_capath to work correctly, the certificate
# files must have ".crt" as the file ending and you must run "c_rehash <path to
# capath>" each time you add/remove a certificate.
#bridge_cafile
#bridge_capath
# Path to the PEM encoded client certificate, if required by the remote broker.
#bridge_certfile
# Path to the PEM encoded client private key, if required by the remote broker.
#bridge_keyfile
# When using certificate based encryption, bridge_insecure disables
# verification of the server hostname in the server certificate. This can be
# useful when testing initial server configurations, but makes it possible for
# a malicious third party to impersonate your server through DNS spoofing, for
# example. Use this option in testing only. If you need to resort to using this
# option in a production environment, your setup is at fault and there is no
# point using encryption.
#bridge_insecure false
# -----------------------------------------------------------------
# PSK based SSL/TLS support
# -----------------------------------------------------------------
# Pre-shared-key encryption provides an alternative to certificate based
# encryption. A bridge can be configured to use PSK with the bridge_identity
# and bridge_psk options. These are the client PSK identity, and pre-shared-key
# in hexadecimal format with no "0x". Only one of certificate and PSK based
# encryption can be used on one
# bridge at once.
#bridge_identity
#bridge_psk
# =================================================================
# External config files
# =================================================================
# External configuration files may be included by using the
# include_dir option. This defines a directory that will be searched
# for config files. All files that end in '.conf' will be loaded as
# a configuration file. It is best to have this as the last option
# in the main file. This option will only be processed from the main
# configuration file. The directory specified must not contain the
# main configuration file.
#include_dir
# =================================================================
# Unsupported rsmb options - for the future
# =================================================================
#addresses
#round_robin
# =================================================================
# rsmb options - unlikely to ever be supported
# =================================================================
#ffdc_output
#max_log_entries
#trace_level
#trace_output

View File

@ -1,3 +0,0 @@
roger:$6$clQ4Ocu312S0qWgl$Cv2wUxgEN73c6C6jlBkswqR4AkHsvDLWvtEXZZ8NpsBLgP1WAo/qA+WXcmEN/mjDNgdUwcxRAveqNMs2xUVQYA==
sub_client:$6$U+qg0/32F0g2Fh+n$fBPSkq/rfNyEQ/TkEjRgwGTTVBpvNhKSyGShovH9KHewsvJ731tD5Zx26IHhR5RYCICt0L9qBW0/KK31UkCliw==
pub_client:$6$vxQ89y+7WrsnL2yn$fSPMmEZn9TSrC8s/jaPmxJ9NijWpkP2e7bMJLz78JXR1vW2x8+T3FZ23byJA6xs5Mt+LeOybAHwcUv0OCl40rA==

View File

@ -1,105 +0,0 @@
/*
* Copyright (c) 2013 IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Seth Hoenig
* Allan Stockdill-Mander
* Mike Robertson
*/
/*----------------------------------------------------------------------
This sample is designed to demonstrate the ability to set individual
callbacks on a per-subscription basis. There are three handlers in use:
brokerLoadHandler - $SYS/broker/load/#
brokerConnectionHandler - $SYS/broker/connection/#
brokerClientHandler - $SYS/broker/clients/#
The client will receive 100 messages total from those subscriptions,
and then print the total number of messages received from each.
It may take a few moments for the sample to complete running, as it
must wait for messages to be published.
-----------------------------------------------------------------------*/
package main
import (
"fmt"
"os"
MQTT "git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git"
)
var brokerLoad = make(chan bool)
var brokerConnection = make(chan bool)
var brokerClients = make(chan bool)
func brokerLoadHandler(client *MQTT.Client, msg MQTT.Message) {
brokerLoad <- true
fmt.Printf("BrokerLoadHandler ")
fmt.Printf("[%s] ", msg.Topic())
fmt.Printf("%s\n", msg.Payload())
}
func brokerConnectionHandler(client *MQTT.Client, msg MQTT.Message) {
brokerConnection <- true
fmt.Printf("BrokerConnectionHandler ")
fmt.Printf("[%s] ", msg.Topic())
fmt.Printf("%s\n", msg.Payload())
}
func brokerClientsHandler(client *MQTT.Client, msg MQTT.Message) {
brokerClients <- true
fmt.Printf("BrokerClientsHandler ")
fmt.Printf("[%s] ", msg.Topic())
fmt.Printf("%s\n", msg.Payload())
}
func main() {
opts := MQTT.NewClientOptions().AddBroker("tcp://iot.eclipse.org:1883").SetClientID("router-sample")
opts.SetCleanSession(true)
c := MQTT.NewClient(opts)
if token := c.Connect(); token.Wait() && token.Error() != nil {
panic(token.Error())
}
if token := c.Subscribe("$SYS/broker/load/#", 0, brokerLoadHandler); token.Wait() && token.Error() != nil {
fmt.Println(token.Error())
os.Exit(1)
}
if token := c.Subscribe("$SYS/broker/connection/#", 0, brokerConnectionHandler); token.Wait() && token.Error() != nil {
fmt.Println(token.Error())
os.Exit(1)
}
if token := c.Subscribe("$SYS/broker/clients/#", 0, brokerClientsHandler); token.Wait() && token.Error() != nil {
fmt.Println(token.Error())
os.Exit(1)
}
loadCount := 0
connectionCount := 0
clientsCount := 0
for i := 0; i < 100; i++ {
select {
case <-brokerLoad:
loadCount++
case <-brokerConnection:
connectionCount++
case <-brokerClients:
clientsCount++
}
}
fmt.Printf("Received %3d Broker Load messages\n", loadCount)
fmt.Printf("Received %3d Broker Connection messages\n", connectionCount)
fmt.Printf("Received %3d Broker Clients messages\n", clientsCount)
c.Disconnect(250)
}

View File

@ -1,130 +0,0 @@
/*
* Copyright (c) 2013 IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Seth Hoenig
* Allan Stockdill-Mander
* Mike Robertson
*/
package main
import (
"flag"
"fmt"
"os"
MQTT "git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git"
)
/*
Options:
[-help] Display help
[-a pub|sub] Action pub (publish) or sub (subscribe)
[-m <message>] Payload to send
[-n <number>] Number of messages to send or receive
[-q 0|1|2] Quality of Service
[-clean] CleanSession (true if -clean is present)
[-id <clientid>] CliendID
[-user <user>] User
[-password <password>] Password
[-broker <uri>] Broker URI
[-topic <topic>] Topic
[-store <path>] Store Directory
*/
func main() {
topic := flag.String("topic", "", "The topic name to/from which to publish/subscribe")
broker := flag.String("broker", "tcp://iot.eclipse.org:1883", "The broker URI. ex: tcp://10.10.1.1:1883")
password := flag.String("password", "", "The password (optional)")
user := flag.String("user", "", "The User (optional)")
id := flag.String("id", "testgoid", "The ClientID (optional)")
cleansess := flag.Bool("clean", false, "Set Clean Session (default false)")
qos := flag.Int("qos", 0, "The Quality of Service 0,1,2 (default 0)")
num := flag.Int("num", 1, "The number of messages to publish or subscribe (default 1)")
payload := flag.String("message", "", "The message text to publish (default empty)")
action := flag.String("action", "", "Action publish or subscribe (required)")
store := flag.String("store", ":memory:", "The Store Directory (default use memory store)")
flag.Parse()
if *action != "pub" && *action != "sub" {
fmt.Println("Invalid setting for -action, must be pub or sub")
return
}
if *topic == "" {
fmt.Println("Invalid setting for -topic, must not be empty")
return
}
fmt.Printf("Sample Info:\n")
fmt.Printf("\taction: %s\n", *action)
fmt.Printf("\tbroker: %s\n", *broker)
fmt.Printf("\tclientid: %s\n", *id)
fmt.Printf("\tuser: %s\n", *user)
fmt.Printf("\tpassword: %s\n", *password)
fmt.Printf("\ttopic: %s\n", *topic)
fmt.Printf("\tmessage: %s\n", *payload)
fmt.Printf("\tqos: %d\n", *qos)
fmt.Printf("\tcleansess: %v\n", *cleansess)
fmt.Printf("\tnum: %d\n", *num)
fmt.Printf("\tstore: %s\n", *store)
opts := MQTT.NewClientOptions()
opts.AddBroker(*broker)
opts.SetClientID(*id)
opts.SetUsername(*user)
opts.SetPassword(*password)
opts.SetCleanSession(*cleansess)
if *store != ":memory:" {
opts.SetStore(MQTT.NewFileStore(*store))
}
if *action == "pub" {
client := MQTT.NewClient(opts)
if token := client.Connect(); token.Wait() && token.Error() != nil {
panic(token.Error())
}
fmt.Println("Sample Publisher Started")
for i := 0; i < *num; i++ {
fmt.Println("---- doing publish ----")
token := client.Publish(*topic, byte(*qos), false, *payload)
token.Wait()
}
client.Disconnect(250)
fmt.Println("Sample Publisher Disconnected")
} else {
receiveCount := 0
choke := make(chan [2]string)
opts.SetDefaultPublishHandler(func(client *MQTT.Client, msg MQTT.Message) {
choke <- [2]string{msg.Topic(), string(msg.Payload())}
})
client := MQTT.NewClient(opts)
if token := client.Connect(); token.Wait() && token.Error() != nil {
panic(token.Error())
}
if token := client.Subscribe(*topic, byte(*qos), nil); token.Wait() && token.Error() != nil {
fmt.Println(token.Error())
os.Exit(1)
}
for receiveCount < *num {
incoming := <-choke
fmt.Printf("RECEIVED TOPIC: %s MESSAGE: %s\n", incoming[0], incoming[1])
receiveCount++
}
client.Disconnect(250)
fmt.Println("Sample Subscriber Disconnected")
}
}

View File

@ -1,150 +0,0 @@
Certificate:
Data:
Version: 3 (0x2)
Serial Number: 1 (0x1)
Signature Algorithm: sha1WithRSAEncryption
Issuer: C=US, ST=Dummy, L=Dummy, O=Dummy, OU=Dummy, CN=Dummy CA
Validity
Not Before: Oct 21 19:24:23 2013 GMT
Not After : Sep 25 19:24:23 2018 GMT
Subject: C=US, ST=Dummy, L=Dummy, O=Dummy, OU=Dummy, CN=Dummy CA
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (2048 bit)
Modulus:
00:c2:d1:d0:31:dc:93:c3:ad:88:0d:f8:93:fe:cc:
aa:04:1d:85:aa:c3:bb:bd:87:04:f0:42:67:14:34:
4a:56:94:2b:bf:d0:6b:72:30:38:39:35:20:8c:e3:
7e:65:82:b0:7e:3e:1d:f1:18:82:b7:d6:19:59:43:
ed:81:be:eb:51:44:fc:77:9e:37:ad:e1:a0:18:b9:
4b:59:79:90:81:a4:e4:52:2f:fc:e2:ff:98:10:5e:
d5:13:9a:16:62:1a:e0:cb:ab:1d:ae:da:d1:40:d4:
97:b1:e6:e3:f1:97:2c:2a:52:73:ab:d0:a2:15:f3:
1e:9a:b0:67:d0:62:67:4b:74:b0:bb:8f:ef:9e:32:
6a:4c:27:4e:82:7c:16:66:ce:06:e9:a3:d9:36:4f:
f4:3e:bc:80:00:93:c1:ca:31:cf:03:68:d4:e5:8b:
38:45:b6:1b:35:b0:c0:e9:4a:62:75:83:01:aa:b9:
c1:0b:c0:ee:97:c0:73:23:cd:34:ec:bb:3c:95:35:
c8:2d:69:ff:86:d8:1f:c8:04:7e:18:de:62:c2:4b:
37:c6:aa:8e:03:bf:2b:0d:97:20:2a:75:47:ec:98:
29:3c:64:52:ef:91:8b:63:0f:6a:f8:c2:9d:08:6a:
61:68:6f:64:9a:56:b2:0a:bc:7b:59:3d:7f:fd:ba:
12:4b
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Subject Key Identifier:
5B:BB:3E:8E:2D:90:AD:AE:58:07:FF:53:00:18:98:FF:44:84:4C:BA
X509v3 Authority Key Identifier:
keyid:5B:BB:3E:8E:2D:90:AD:AE:58:07:FF:53:00:18:98:FF:44:84:4C:BA
X509v3 Basic Constraints:
CA:TRUE
Signature Algorithm: sha1WithRSAEncryption
3c:89:0b:bd:49:10:a6:1a:f6:2a:4b:5f:02:3d:ee:f3:19:4f:
c9:10:79:9c:01:ef:88:22:3d:03:5b:1a:14:46:b6:7f:9b:af:
a5:99:1a:d4:d4:9b:d6:6f:c1:fe:96:8f:9a:9e:47:42:b4:ee:
21:56:6a:c4:92:38:6c:81:cd:8e:31:43:86:7c:97:15:90:80:
d8:21:f0:46:be:2a:2f:f2:96:07:85:74:a8:fa:1b:78:8f:80:
c1:5e:bc:d9:06:c2:33:9e:8e:f9:08:dd:43:7b:6f:5a:22:67:
46:78:5d:fb:4a:4e:c2:c6:29:94:17:53:a6:c5:a9:d6:67:06:
4f:07:ef:da:5b:45:21:83:cb:31:b2:dc:dc:ac:13:19:98:3f:
98:5f:2c:b4:b4:da:d4:43:d7:a9:1a:6e:b6:cf:be:85:a8:80:
1f:8a:c1:95:8a:83:a4:af:d2:23:4a:b6:18:87:4e:28:31:36:
03:2c:bf:e4:9e:b6:75:fd:c4:68:ed:4d:d5:a8:fa:a5:81:13:
17:1c:43:67:02:1c:d0:e6:00:6e:8b:13:e6:60:1f:ba:40:78:
93:25:ca:59:5a:71:cc:58:d4:52:63:1d:b3:3c:ce:37:f1:89:
78:fc:13:fa:b3:ea:22:af:17:68:8a:a1:59:57:f5:1a:49:6e:
b9:f6:5f:b3
-----BEGIN CERTIFICATE-----
MIIDizCCAnOgAwIBAgIBATANBgkqhkiG9w0BAQUFADBgMQswCQYDVQQGEwJVUzEO
MAwGA1UECAwFRHVtbXkxDjAMBgNVBAcMBUR1bW15MQ4wDAYDVQQKDAVEdW1teTEO
MAwGA1UECwwFRHVtbXkxETAPBgNVBAMMCER1bW15IENBMB4XDTEzMTAyMTE5MjQy
M1oXDTE4MDkyNTE5MjQyM1owYDELMAkGA1UEBhMCVVMxDjAMBgNVBAgMBUR1bW15
MQ4wDAYDVQQHDAVEdW1teTEOMAwGA1UECgwFRHVtbXkxDjAMBgNVBAsMBUR1bW15
MREwDwYDVQQDDAhEdW1teSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
ggEBAMLR0DHck8OtiA34k/7MqgQdharDu72HBPBCZxQ0SlaUK7/Qa3IwODk1IIzj
fmWCsH4+HfEYgrfWGVlD7YG+61FE/HeeN63hoBi5S1l5kIGk5FIv/OL/mBBe1ROa
FmIa4MurHa7a0UDUl7Hm4/GXLCpSc6vQohXzHpqwZ9BiZ0t0sLuP754yakwnToJ8
FmbOBumj2TZP9D68gACTwcoxzwNo1OWLOEW2GzWwwOlKYnWDAaq5wQvA7pfAcyPN
NOy7PJU1yC1p/4bYH8gEfhjeYsJLN8aqjgO/Kw2XICp1R+yYKTxkUu+Ri2MPavjC
nQhqYWhvZJpWsgq8e1k9f/26EksCAwEAAaNQME4wHQYDVR0OBBYEFFu7Po4tkK2u
WAf/UwAYmP9EhEy6MB8GA1UdIwQYMBaAFFu7Po4tkK2uWAf/UwAYmP9EhEy6MAwG
A1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBADyJC71JEKYa9ipLXwI97vMZ
T8kQeZwB74giPQNbGhRGtn+br6WZGtTUm9Zvwf6Wj5qeR0K07iFWasSSOGyBzY4x
Q4Z8lxWQgNgh8Ea+Ki/ylgeFdKj6G3iPgMFevNkGwjOejvkI3UN7b1oiZ0Z4XftK
TsLGKZQXU6bFqdZnBk8H79pbRSGDyzGy3NysExmYP5hfLLS02tRD16kabrbPvoWo
gB+KwZWKg6Sv0iNKthiHTigxNgMsv+SetnX9xGjtTdWo+qWBExccQ2cCHNDmAG6L
E+ZgH7pAeJMlyllaccxY1FJjHbM8zjfxiXj8E/qz6iKvF2iKoVlX9RpJbrn2X7M=
-----END CERTIFICATE-----
Certificate:
Data:
Version: 3 (0x2)
Serial Number: 1 (0x1)
Signature Algorithm: sha1WithRSAEncryption
Issuer: C=US, ST=Dummy, L=Dummy, O=Dummy, OU=Dummy, CN=Dummy CA
Validity
Not Before: Oct 21 19:24:23 2013 GMT
Not After : Sep 25 19:24:23 2018 GMT
Subject: C=US, ST=Dummy, L=Dummy, O=Dummy, OU=Dummy, CN=Dummy Intermediate CA
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (2048 bit)
Modulus:
00:cf:7d:92:07:a5:56:1b:6f:4c:f3:34:c2:12:c2:
34:62:3b:69:aa:a6:0c:c6:70:5b:93:bc:dc:41:98:
61:87:61:36:be:8c:08:dd:31:a9:33:76:d3:66:3e:
77:60:1e:ed:9e:e1:e5:ef:bf:17:91:ac:0c:63:07:
01:ab:30:67:bc:16:a6:2f:79:f0:61:8c:79:2d:3c:
98:60:74:61:c4:5f:60:44:85:71:92:9d:cc:7b:14:
39:74:aa:44:f9:9f:ae:f6:c7:8d:c3:01:47:53:24:
ac:7b:a2:f6:c5:7d:65:37:40:0b:20:c8:d4:14:cd:
f8:f4:57:ea:23:70:f4:e3:99:2b:1c:9a:67:37:ed:
93:c7:a7:7c:86:90:f7:ae:fc:6f:4b:18:dc:d5:eb:
f3:68:33:d6:78:14:d1:ca:a7:06:7d:75:34:f6:c0:
d4:15:1b:21:2b:78:d9:76:24:a5:f0:c6:13:c8:1e:
4a:c8:ca:77:34:4e:f8:fa:49:5f:6c:e1:66:a8:65:
f0:8c:bc:44:20:03:ac:af:4a:61:a5:39:48:51:1b:
cb:d8:22:29:60:27:47:42:fc:bf:6a:77:65:58:09:
20:82:1c:d1:16:5e:5a:18:ea:99:61:8e:93:94:27:
30:20:dd:44:03:50:43:b4:ec:a3:0f:ee:91:69:d7:
b1:5b
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Basic Constraints:
CA:TRUE
Signature Algorithm: sha1WithRSAEncryption
39:a0:8d:2f:68:22:1d:4f:3e:db:f1:9b:29:20:77:23:f8:21:
34:17:84:00:88:a8:3e:a1:4d:84:94:90:96:02:e6:6a:b4:20:
51:a0:66:20:38:05:18:aa:2a:3e:9a:50:60:af:eb:4a:70:ac:
9b:59:30:d5:17:14:9c:b4:91:6a:1b:c3:45:8a:dd:cd:2f:c6:
c5:8c:fe:d0:76:20:63:a4:97:db:e3:2a:8e:c1:3d:c8:b6:06:
2d:49:7a:d9:8a:de:16:ea:5d:5f:fb:41:79:0d:8f:d2:23:00:
d9:b9:6f:93:45:bb:74:17:ea:6b:72:13:01:86:fe:8d:7e:8f:
27:71:76:a9:37:6d:6c:90:5a:3f:d9:6d:4d:6c:a4:64:7a:ea:
82:c9:87:ee:6a:d0:6e:30:05:7f:19:1d:19:31:a9:9a:ce:21:
84:da:47:c7:a0:66:12:e8:7e:57:69:5d:9c:24:e5:46:3c:bf:
37:f6:88:c3:b1:42:de:3b:81:ed:f5:ae:e2:23:9e:c2:89:a1:
e7:5c:1d:49:0f:ed:ae:55:60:0e:4e:4c:e9:8a:64:e6:ae:c5:
d1:99:a7:70:4c:7e:5d:53:ac:88:2c:0f:0b:21:94:1a:32:f9:
a1:cc:1e:67:98:6b:b6:e9:b1:b9:4b:46:02:b1:65:c9:49:83:
80:bd:b9:70
-----BEGIN CERTIFICATE-----
MIIDWDCCAkCgAwIBAgIBATANBgkqhkiG9w0BAQUFADBgMQswCQYDVQQGEwJVUzEO
MAwGA1UECAwFRHVtbXkxDjAMBgNVBAcMBUR1bW15MQ4wDAYDVQQKDAVEdW1teTEO
MAwGA1UECwwFRHVtbXkxETAPBgNVBAMMCER1bW15IENBMB4XDTEzMTAyMTE5MjQy
M1oXDTE4MDkyNTE5MjQyM1owbTELMAkGA1UEBhMCVVMxDjAMBgNVBAgMBUR1bW15
MQ4wDAYDVQQHDAVEdW1teTEOMAwGA1UECgwFRHVtbXkxDjAMBgNVBAsMBUR1bW15
MR4wHAYDVQQDDBVEdW1teSBJbnRlcm1lZGlhdGUgQ0EwggEiMA0GCSqGSIb3DQEB
AQUAA4IBDwAwggEKAoIBAQDPfZIHpVYbb0zzNMISwjRiO2mqpgzGcFuTvNxBmGGH
YTa+jAjdMakzdtNmPndgHu2e4eXvvxeRrAxjBwGrMGe8FqYvefBhjHktPJhgdGHE
X2BEhXGSncx7FDl0qkT5n672x43DAUdTJKx7ovbFfWU3QAsgyNQUzfj0V+ojcPTj
mSscmmc37ZPHp3yGkPeu/G9LGNzV6/NoM9Z4FNHKpwZ9dTT2wNQVGyEreNl2JKXw
xhPIHkrIync0Tvj6SV9s4WaoZfCMvEQgA6yvSmGlOUhRG8vYIilgJ0dC/L9qd2VY
CSCCHNEWXloY6plhjpOUJzAg3UQDUEO07KMP7pFp17FbAgMBAAGjEDAOMAwGA1Ud
EwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBADmgjS9oIh1PPtvxmykgdyP4ITQX
hACIqD6hTYSUkJYC5mq0IFGgZiA4BRiqKj6aUGCv60pwrJtZMNUXFJy0kWobw0WK
3c0vxsWM/tB2IGOkl9vjKo7BPci2Bi1JetmK3hbqXV/7QXkNj9IjANm5b5NFu3QX
6mtyEwGG/o1+jydxdqk3bWyQWj/ZbU1spGR66oLJh+5q0G4wBX8ZHRkxqZrOIYTa
R8egZhLofldpXZwk5UY8vzf2iMOxQt47ge31ruIjnsKJoedcHUkP7a5VYA5OTOmK
ZOauxdGZp3BMfl1TrIgsDwshlBoy+aHMHmeYa7bpsblLRgKxZclJg4C9uXA=
-----END CERTIFICATE-----

View File

@ -1,9 +0,0 @@
Certificate structure:
Root CA
|
|-> Intermediate CA
|
|-> Server
|
|-> Client

View File

@ -1,20 +0,0 @@
-----BEGIN CERTIFICATE-----
MIIDRzCCAi8CAQIwDQYJKoZIhvcNAQEFBQAwbTELMAkGA1UEBhMCVVMxDjAMBgNV
BAgMBUR1bW15MQ4wDAYDVQQHDAVEdW1teTEOMAwGA1UECgwFRHVtbXkxDjAMBgNV
BAsMBUR1bW15MR4wHAYDVQQDDBVEdW1teSBJbnRlcm1lZGlhdGUgQ0EwHhcNMTMx
MDIxMTkyNDIzWhcNMTgwOTI1MTkyNDIzWjBmMQswCQYDVQQGEwJVUzEOMAwGA1UE
CAwFRHVtbXkxDjAMBgNVBAcMBUR1bW15MQ4wDAYDVQQKDAVEdW1teTEOMAwGA1UE
CwwFRHVtbXkxFzAVBgNVBAMMDkR1bW15IChjbGllbnQpMIIBIjANBgkqhkiG9w0B
AQEFAAOCAQ8AMIIBCgKCAQEA4J/+eKqsjK0QS+cSDa5Fh4XM4THy812JkWMySA5r
bFxHZ5ye36/IuwyRQ0Yn2DvhhsDR5K7yz8K+Yfp9A6WRBkyHK/sy/8vurQHeDH3y
lLtHCLi5nfyt2fDxWOYwFrS1giGn2IxJIHBAWu4cBODCkqwqAp92+Lqp3Sn+D+Fb
maHEU3LHua8OIJiSeAIHo/jPqfHFqZxK1bXhGCSQKvUZCaTftsqDtn+LZSElqj1y
5/cnc7XGsTf8ml/+FDMX1aSAHf+pu+UAp9JqOXOM60A5JIpYu3Lsejp1RppyPJYP
zC4nSN8R2LOdDChP2MB7f1/sXRGlLM/X3Vi4X+c6xQ85TQIDAQABMA0GCSqGSIb3
DQEBBQUAA4IBAQAMWt9qMUOY5z1uyYcjUnconPHLM9MADCZI2sRbfdBOBHEnTVKv
Y63SWnCt8TRJb01LKLIEys6pW1NUlxr6b+FwicNmycR0L8b63cmNXg2NmSZsnK9C
fGT6BbbDdVPYjvmghpSd3soBGBLPsJvaFc6UL5tunm+hT7PxWjDxHZEiE18PTs05
Vpp/ytILzhoXvJeFOWQHIdf4DLR5izGMNTKdQzgg1eBq2vKgjJIlEZ3j/AyHkJLE
qFip1tyc0PRzgKYFLWttaZzakCLJOGuxtvYB+GrixVM7U23p5LQbLE0KX7fe2Gql
xKMfSID5NUDNf1SuSrrGLD3gfnJEKVB8TVBk
-----END CERTIFICATE-----

View File

@ -1,27 +0,0 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEA4J/+eKqsjK0QS+cSDa5Fh4XM4THy812JkWMySA5rbFxHZ5ye
36/IuwyRQ0Yn2DvhhsDR5K7yz8K+Yfp9A6WRBkyHK/sy/8vurQHeDH3ylLtHCLi5
nfyt2fDxWOYwFrS1giGn2IxJIHBAWu4cBODCkqwqAp92+Lqp3Sn+D+FbmaHEU3LH
ua8OIJiSeAIHo/jPqfHFqZxK1bXhGCSQKvUZCaTftsqDtn+LZSElqj1y5/cnc7XG
sTf8ml/+FDMX1aSAHf+pu+UAp9JqOXOM60A5JIpYu3Lsejp1RppyPJYPzC4nSN8R
2LOdDChP2MB7f1/sXRGlLM/X3Vi4X+c6xQ85TQIDAQABAoIBABosCiZdHIW3lHKD
leLqL0e/G0QR4dDhUSoTeMRUiceyaM91vD0r6iOBL1u7TOEw+PIOfWY7zCbQ9gXM
fcxy+hbVy9ogBq0vQbv+v7SM6DrUJ06o11fFHSyLmlNVXr0GiS+EZF4i2lJhQd5W
aAVZetJEJRDxK5eHiEswnV2UUGvx6VCpFILL0JVGxWY7oOPxiiBLl+cmfRZdTfGx
46VzQvBu7N8hGpCIsljuVFP/DxR7c+2oyrtFaFSMZBMNI8fICgkb2QeLk/XUBXtn
0bDttgmOP/BvnNAor7nIRoeer/7kbXc9jOsgXwnvDKPapltQddL+exycXzbIjLuY
Z2SFsDECgYEA+2A4QGV0biqdICAoKCHCHCU/CrdDUQiQDHqRU6/nhka7MFPSl4Wy
9oISRrYZhKIbSbaXwTW5ZcYq8Hpn/yGYIWlINP9sjprnOWPE7L74lac+PFWXNMUI
jNJOJkLK1IeppByXAt5ekGBrG556bhzRCJsTjYsyUR/r/bMEF1FD8WMCgYEA5MHM
hqmkDK5CbklVaPonNc251Lx+HSzzQ40WExC/PrCczRaZMKlhmyKZfWJCInQsUDln
w6Lqa5UnwZV2HYAF30VZYQsq84ulNnx1/36BEZyIimfAL1WHvKeGWjGsZqniXxxb
Os5wEMAvxk0SWVrR5v6YpBDv3t9+lLg/bzBOAY8CgYEAuZ0q7CH9/vroWrhj7n4+
3pmCG1+HDWbNNumqNalFxBimT+EVN1058FvLMvtzjERG8f8pvzj0VPom6rr336Pm
uYUMFFYmyoYHBpFs74Nz+s0rX1Gz/PsgfRstKYNYUeZ6lPunZi7clK8dZ591t6j/
kOMxZOrLlKuFjieJdc5D5RECgYAVTzxXOwxOJhmIHoq3Sb5HU8/A0oJJA3vxyf3J
buDx3Q/uRvGkR9MQ2YtE09dnUD0kiARzhASkWvOmI98p5lglsVcfJCQvJc4RIkz3
rPgnBNbvVbTgc+4+E7j/Q+tUcPTmeUTCWKK13MFWjq1r53rwMr1TY0SFFXq8LeGy
4OQTXwKBgQDCuPN3Q+EJusYy7TXt0WicY/xyu15s1216N7PmRKFr/WAn2JdAfjbD
JKDwVqo0AQiEDAobJk0JMPs+ENK2d58GsybCK4QGAh6z5FGunb5T432YfnoXtL3J
ZKVvkf7eowvokTIeiDf3XrCPajLDBpo88Xax+RH03US7XRdu/fVzMA==
-----END RSA PRIVATE KEY-----

View File

@ -1,20 +0,0 @@
-----BEGIN CERTIFICATE-----
MIIDWDCCAkCgAwIBAgIBATANBgkqhkiG9w0BAQUFADBgMQswCQYDVQQGEwJVUzEO
MAwGA1UECAwFRHVtbXkxDjAMBgNVBAcMBUR1bW15MQ4wDAYDVQQKDAVEdW1teTEO
MAwGA1UECwwFRHVtbXkxETAPBgNVBAMMCER1bW15IENBMB4XDTEzMTAyMTE5MjQy
M1oXDTE4MDkyNTE5MjQyM1owbTELMAkGA1UEBhMCVVMxDjAMBgNVBAgMBUR1bW15
MQ4wDAYDVQQHDAVEdW1teTEOMAwGA1UECgwFRHVtbXkxDjAMBgNVBAsMBUR1bW15
MR4wHAYDVQQDDBVEdW1teSBJbnRlcm1lZGlhdGUgQ0EwggEiMA0GCSqGSIb3DQEB
AQUAA4IBDwAwggEKAoIBAQDPfZIHpVYbb0zzNMISwjRiO2mqpgzGcFuTvNxBmGGH
YTa+jAjdMakzdtNmPndgHu2e4eXvvxeRrAxjBwGrMGe8FqYvefBhjHktPJhgdGHE
X2BEhXGSncx7FDl0qkT5n672x43DAUdTJKx7ovbFfWU3QAsgyNQUzfj0V+ojcPTj
mSscmmc37ZPHp3yGkPeu/G9LGNzV6/NoM9Z4FNHKpwZ9dTT2wNQVGyEreNl2JKXw
xhPIHkrIync0Tvj6SV9s4WaoZfCMvEQgA6yvSmGlOUhRG8vYIilgJ0dC/L9qd2VY
CSCCHNEWXloY6plhjpOUJzAg3UQDUEO07KMP7pFp17FbAgMBAAGjEDAOMAwGA1Ud
EwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBADmgjS9oIh1PPtvxmykgdyP4ITQX
hACIqD6hTYSUkJYC5mq0IFGgZiA4BRiqKj6aUGCv60pwrJtZMNUXFJy0kWobw0WK
3c0vxsWM/tB2IGOkl9vjKo7BPci2Bi1JetmK3hbqXV/7QXkNj9IjANm5b5NFu3QX
6mtyEwGG/o1+jydxdqk3bWyQWj/ZbU1spGR66oLJh+5q0G4wBX8ZHRkxqZrOIYTa
R8egZhLofldpXZwk5UY8vzf2iMOxQt47ge31ruIjnsKJoedcHUkP7a5VYA5OTOmK
ZOauxdGZp3BMfl1TrIgsDwshlBoy+aHMHmeYa7bpsblLRgKxZclJg4C9uXA=
-----END CERTIFICATE-----

View File

@ -1,27 +0,0 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEAz32SB6VWG29M8zTCEsI0YjtpqqYMxnBbk7zcQZhhh2E2vowI
3TGpM3bTZj53YB7tnuHl778XkawMYwcBqzBnvBamL3nwYYx5LTyYYHRhxF9gRIVx
kp3MexQ5dKpE+Z+u9seNwwFHUySse6L2xX1lN0ALIMjUFM349FfqI3D045krHJpn
N+2Tx6d8hpD3rvxvSxjc1evzaDPWeBTRyqcGfXU09sDUFRshK3jZdiSl8MYTyB5K
yMp3NE74+klfbOFmqGXwjLxEIAOsr0phpTlIURvL2CIpYCdHQvy/andlWAkgghzR
Fl5aGOqZYY6TlCcwIN1EA1BDtOyjD+6RadexWwIDAQABAoIBAEs6OsS85DBENUEE
QszsTnPDGLd/Rqh3uiwhUDYUGmAsFd4WBWy1AaSgE1tBkKRv8jUlr+kxfkkZeNA6
jRdVEHc4Ov6Blm63sIN/Mbve1keNUOjm/NtsjOOe3In45dMfWx8sELC/+O0jIcod
tpy5rwXOGXrEdWgpmXZ1nXVGEfOmQH3eGEPkqbY1I4YlAoXD0mc5fNQQrn7qrogH
M5USCnC44yIIF0Yube2Fg0Cem41vzIvENAlZC273gyW+pQwez0uma2LaCWmkEz1N
sESrNSQ4yeQnDQYlgX2w3RRpqql4GDzAdISL2WJcNhW6KJ72B0SQ1ny/TmQgZePG
Ojv1T0ECgYEA9CXqKyXBSPF+Wdc/fNagrIi6tcNkLAN2/p5J3Z6TtbZGjItoMlDX
c+hwHobcI3GZLMlxlBx7ePc7cKgaMDXrl8BZZjFoyEV9OHOLicfNkLFmBIZ14gtX
bGZYDuCcal46r7IKRjT8lcYWCoLJnI9vLEII7Q7P/eBgcntw3+h/ziECgYEA2ZAa
bp9d0xBaOXq/E341guxNG49R09/DeZ/2CEM+V1pMD8OVH9cvxrBdDLUmAnrqeGTh
Djoi1UEbOVAV6/dXbTQHrla+HF4Uq+t9tV+mt68TEa54PQ/ERt5ih3nZGBiqZ6rX
SGeyZmIXMLIZEs2dIbJ2DmLcZj6Tjxkd/PxPt/sCgYBGczZaEv/uK3k5NWplfI1K
m/28e1BJfwp0OHq6D4sx8RH0djmv4zH4iUbpGCMnuxznFo3Gnl1mr3igbnF4HecI
mAF0AqfoulyC0JygOl5v9TCp957Ghl1Is1OPn3KjIuOuVSKv1ZRZJ5qul8TTf3Qm
AjwPI6oS6Q8LmeEdSzqt4QKBgB5MglHboe5t/ZK5tHibgApOrGJlMEkohYmfrFz0
OG9j5OnhHBiGGGI8V4kYhUWdJqBDtFAN6qH2Yjs2Gwd0t9k+gL9X1zwOIiTbM/OZ
cZdtK2Ov/5DJbFVOTTx+zKwda0Xqtfagcmjtyjr+4p0Kw5JYzzYrsHQQzO4F2nZM
ETIXAoGADskTzhgpPrC5/qfuLY4gBUtCfYIb8kaKN90AT8A/14lBrT4lSnmsEvKP
tRDmFjnc/ogDlHa5SRDijtT6UoyQPuauAt6DYrJ8G6qKJqiMwJcuLV1XFks7z1J8
VzB8kso1pPAtcvVXBPklsjvZ10NdQOCqm4N3EVp69agbB1oco4I=
-----END RSA PRIVATE KEY-----

View File

@ -1,18 +0,0 @@
-----BEGIN CERTIFICATE-----
MIIC8DCCAlmgAwIBAgIJAOD63PlXjJi8MA0GCSqGSIb3DQEBBQUAMIGQMQswCQYD
VQQGEwJHQjEXMBUGA1UECAwOVW5pdGVkIEtpbmdkb20xDjAMBgNVBAcMBURlcmJ5
MRIwEAYDVQQKDAlNb3NxdWl0dG8xCzAJBgNVBAsMAkNBMRYwFAYDVQQDDA1tb3Nx
dWl0dG8ub3JnMR8wHQYJKoZIhvcNAQkBFhByb2dlckBhdGNob28ub3JnMB4XDTEy
MDYyOTIyMTE1OVoXDTIyMDYyNzIyMTE1OVowgZAxCzAJBgNVBAYTAkdCMRcwFQYD
VQQIDA5Vbml0ZWQgS2luZ2RvbTEOMAwGA1UEBwwFRGVyYnkxEjAQBgNVBAoMCU1v
c3F1aXR0bzELMAkGA1UECwwCQ0ExFjAUBgNVBAMMDW1vc3F1aXR0by5vcmcxHzAd
BgkqhkiG9w0BCQEWEHJvZ2VyQGF0Y2hvby5vcmcwgZ8wDQYJKoZIhvcNAQEBBQAD
gY0AMIGJAoGBAMYkLmX7SqOT/jJCZoQ1NWdCrr/pq47m3xxyXcI+FLEmwbE3R9vM
rE6sRbP2S89pfrCt7iuITXPKycpUcIU0mtcT1OqxGBV2lb6RaOT2gC5pxyGaFJ+h
A+GIbdYKO3JprPxSBoRponZJvDGEZuM3N7p3S/lRoi7G5wG5mvUmaE5RAgMBAAGj
UDBOMB0GA1UdDgQWBBTad2QneVztIPQzRRGj6ZHKqJTv5jAfBgNVHSMEGDAWgBTa
d2QneVztIPQzRRGj6ZHKqJTv5jAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUA
A4GBAAqw1rK4NlRUCUBLhEFUQasjP7xfFqlVbE2cRy0Rs4o3KS0JwzQVBwG85xge
REyPOFdGdhBY2P1FNRy0MDr6xr+D2ZOwxs63dG1nnAnWZg7qwoLgpZ4fESPD3PkA
1ZgKJc2zbSQ9fCPxt2W3mdVav66c6fsb7els2W2Iz7gERJSX
-----END CERTIFICATE-----

View File

@ -1,21 +0,0 @@
-----BEGIN CERTIFICATE-----
MIIDizCCAnOgAwIBAgIBATANBgkqhkiG9w0BAQUFADBgMQswCQYDVQQGEwJVUzEO
MAwGA1UECAwFRHVtbXkxDjAMBgNVBAcMBUR1bW15MQ4wDAYDVQQKDAVEdW1teTEO
MAwGA1UECwwFRHVtbXkxETAPBgNVBAMMCER1bW15IENBMB4XDTEzMTAyMTE5MjQy
M1oXDTE4MDkyNTE5MjQyM1owYDELMAkGA1UEBhMCVVMxDjAMBgNVBAgMBUR1bW15
MQ4wDAYDVQQHDAVEdW1teTEOMAwGA1UECgwFRHVtbXkxDjAMBgNVBAsMBUR1bW15
MREwDwYDVQQDDAhEdW1teSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
ggEBAMLR0DHck8OtiA34k/7MqgQdharDu72HBPBCZxQ0SlaUK7/Qa3IwODk1IIzj
fmWCsH4+HfEYgrfWGVlD7YG+61FE/HeeN63hoBi5S1l5kIGk5FIv/OL/mBBe1ROa
FmIa4MurHa7a0UDUl7Hm4/GXLCpSc6vQohXzHpqwZ9BiZ0t0sLuP754yakwnToJ8
FmbOBumj2TZP9D68gACTwcoxzwNo1OWLOEW2GzWwwOlKYnWDAaq5wQvA7pfAcyPN
NOy7PJU1yC1p/4bYH8gEfhjeYsJLN8aqjgO/Kw2XICp1R+yYKTxkUu+Ri2MPavjC
nQhqYWhvZJpWsgq8e1k9f/26EksCAwEAAaNQME4wHQYDVR0OBBYEFFu7Po4tkK2u
WAf/UwAYmP9EhEy6MB8GA1UdIwQYMBaAFFu7Po4tkK2uWAf/UwAYmP9EhEy6MAwG
A1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBADyJC71JEKYa9ipLXwI97vMZ
T8kQeZwB74giPQNbGhRGtn+br6WZGtTUm9Zvwf6Wj5qeR0K07iFWasSSOGyBzY4x
Q4Z8lxWQgNgh8Ea+Ki/ylgeFdKj6G3iPgMFevNkGwjOejvkI3UN7b1oiZ0Z4XftK
TsLGKZQXU6bFqdZnBk8H79pbRSGDyzGy3NysExmYP5hfLLS02tRD16kabrbPvoWo
gB+KwZWKg6Sv0iNKthiHTigxNgMsv+SetnX9xGjtTdWo+qWBExccQ2cCHNDmAG6L
E+ZgH7pAeJMlyllaccxY1FJjHbM8zjfxiXj8E/qz6iKvF2iKoVlX9RpJbrn2X7M=
-----END CERTIFICATE-----

View File

@ -1,27 +0,0 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAwtHQMdyTw62IDfiT/syqBB2FqsO7vYcE8EJnFDRKVpQrv9Br
cjA4OTUgjON+ZYKwfj4d8RiCt9YZWUPtgb7rUUT8d543reGgGLlLWXmQgaTkUi/8
4v+YEF7VE5oWYhrgy6sdrtrRQNSXsebj8ZcsKlJzq9CiFfMemrBn0GJnS3Swu4/v
njJqTCdOgnwWZs4G6aPZNk/0PryAAJPByjHPA2jU5Ys4RbYbNbDA6UpidYMBqrnB
C8Dul8BzI8007Ls8lTXILWn/htgfyAR+GN5iwks3xqqOA78rDZcgKnVH7JgpPGRS
75GLYw9q+MKdCGphaG9kmlayCrx7WT1//boSSwIDAQABAoIBAGphOzge5Cjzdtl6
JQX7J9M7c6O9YaSqN44iFDs6GmWQXxtMaX9eyTSjx/RmvLwdUtZ8gMkHw0kzBYBy
0RwJ7mDgNKP0px6xl0Qo2fYvpTLFoU8nmQUy4AwAXIVpnFNRrfJIq9qw7ZZi/7pL
A6kGDT3G7Bajw/4MVWfOb8GgGhte1ZhZgXFEZNjGkhwi3Na1/6slOQIfnkkhco0X
ru1Cw82nXNPHqu6K+pbHP9ucYdUNZWRh+yQS3p92lr5tB3/IL/lD0Cl3+xP8JFl+
5NMSISOKGb3ld0rzrJd1ncgLgv/XlHu8DqvcFs9QwXbaUlG0U/0GrorGYqFaZYaH
R1rkZjECgYEA9mAarVAeL7IOeEIg28f/qyp//5+pMzRpVhnI+xscHB5QUO9WH+uE
nOXwcGvcRME134H4o/0j75aMhVs7sGfMOQ+enAwOxRC5h4MCClDSWysWftU8Ihhf
Sm6eZ0kYLZNqXt/TxTs124NiF1Bb5pekzEr9fTj//vP4meuAQ/D0JoUCgYEAym4f
BCm5tLwYYxZM4tko0g9BHxy4aAPfyshuLed1JjkK4JCFp368GBoknj5rUNewTun2
1zkQF9b5Mi3k5qWkboP5rpp7DuG3PJdWypV6b/btUeqcyG1gteQwTAwebfqeM0vH
QvpuAoRMtEcSBQBl2s9zgmObXUpDlLwuIlL+to8CgYEAyJBtxx8Mo9k4jE+Q/jnu
+QFtF8R68jM9eRkeksR7+qv2yBw+KVgKKcvKE0rLErGS0LO2nJELexQ8qqcdjTrC
dsUvYmsybtxxnE5bD9jBlfQaqP+fp0Xd9PLeQsivRRLXqgpeFBZifqOS69XAKpTS
VHjLqPAI/hzQCUU8spJpvx0CgYAePgt2NMGgxcUi8I72CRl3IH5LJqBKMeH6Sq1j
QEQZPMZqPE0rc9yoASfdWFfyEPcvIvcUulq0JRK/s2mSJ8cEF8Vyl3OxCnm0nKuD
woczOQHFjjZ0HxsmsXuhsOHO7nU6FqUjVYSf7aIEAOYpRyDwarPIFBd+/XxROTfv
OtUA8wKBgAOiGXRxycb4rAtJBDqPAgdAAwNgvQHyVgn32ArWtgu8ermuZW5h1y45
hULFvCbLSCpo+I7QhRhw4y2DoB1DgIw04BeFUIcE+az7HH3euAyCLQ0caaA8Xk/6
bpPfUMe1SNi51f345QlOPvvwGllTC6DeBhZ730k7VNB32dOCV3kE
-----END RSA PRIVATE KEY-----

View File

@ -1,21 +0,0 @@
-----BEGIN CERTIFICATE-----
MIIDYTCCAkmgAwIBAgIBATANBgkqhkiG9w0BAQUFADBtMQswCQYDVQQGEwJVUzEO
MAwGA1UECAwFRHVtbXkxDjAMBgNVBAcMBUR1bW15MQ4wDAYDVQQKDAVEdW1teTEO
MAwGA1UECwwFRHVtbXkxHjAcBgNVBAMMFUR1bW15IEludGVybWVkaWF0ZSBDQTAe
Fw0xMzEwMjExOTI0MjNaFw0xODA5MjUxOTI0MjNaMGYxCzAJBgNVBAYTAlVTMQ4w
DAYDVQQIDAVEdW1teTEOMAwGA1UEBwwFRHVtbXkxDjAMBgNVBAoMBUR1bW15MQ4w
DAYDVQQLDAVEdW1teTEXMBUGA1UEAwwORHVtbXkgKHNlcnZlcikwggEiMA0GCSqG
SIb3DQEBAQUAA4IBDwAwggEKAoIBAQC0fQCRUWXt+i7JMR55Zuo6wBRxG7RnPutN
2L7J/18io52vxjm8AZDiC0JFkCHh72ZzvbgVA+e+WxAIYfioRis4JWw4jK8v5m8q
cZzS0GJNTMROPiZQi7A81tAbrV00XN7d5PsmIJ2Bf4XbJWMy31CsmoFloeRMd7bR
LxwDIb0qqRawhKsWdfZB/c9wGKmHlei50B7PXk+koKnVdsLwXxtCZDvc/3fNRHEK
lZs4m0N05G38FdrnczPm/0pie87nK9rnklL7u1sYOukOznnOtW5h7+A4M+DxzME0
HRU6k4d+6QvukxBlsE93gHhwRsejIuDGlqD+DRxk2PdmmgsmPH59AgMBAAGjEzAR
MA8GA1UdEQQIMAaHBAoKBOQwDQYJKoZIhvcNAQEFBQADggEBAJ3bKs2b4cAJWTZj
69dMEfYZKcQIXs7euwtKlP7H8m5c+X5KmZPi1Puq4Z0gtvLu/z7J9UjZjG0CoylV
q15Zp5svryJ7XzcsZs7rwyo1JtngW1z54wr9MezqIOF2w12dTwEAINFsW7TxAsH7
bfqkzZjuCbbsww5q4eHuZp0yaMHc3hOGaUot27OTlxlIMhv7VBBqWAj0jmvAfTKf
la0SiL/Mc8rD8D5C0SXGcCL6li/kqtinAxzhokuyyPf+hQX35kcZxEPu6WxtYVLv
hMzrokOZP2FrGbCnhaNT8gw4Aa0RXV1JgonRWYSbkeaCzvr2bJ0OuJiDdwdRKvOo
raKLlfY=
-----END CERTIFICATE-----

View File

@ -1,27 +0,0 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAtH0AkVFl7fouyTEeeWbqOsAUcRu0Zz7rTdi+yf9fIqOdr8Y5
vAGQ4gtCRZAh4e9mc724FQPnvlsQCGH4qEYrOCVsOIyvL+ZvKnGc0tBiTUzETj4m
UIuwPNbQG61dNFze3eT7JiCdgX+F2yVjMt9QrJqBZaHkTHe20S8cAyG9KqkWsISr
FnX2Qf3PcBiph5XoudAez15PpKCp1XbC8F8bQmQ73P93zURxCpWbOJtDdORt/BXa
53Mz5v9KYnvO5yva55JS+7tbGDrpDs55zrVuYe/gODPg8czBNB0VOpOHfukL7pMQ
ZbBPd4B4cEbHoyLgxpag/g0cZNj3ZpoLJjx+fQIDAQABAoIBAG0UfxtUTn4dDdma
TgihIj6Ph8s0Kzua0yshK215YU3WBJ8O9iWh7KYwl8Ti7xdVUF3y8yYATjbFYlMu
otFQVx5/v4ANxnL0mYrVTyo5tq9xDdMbzJwxUDn0uaGAjSvwVOFWWlMYsxhoscVY
OzOrs14dosaBqTBtyZdzGULrSSBWPCBlucRcvTV/eZwgYrYJ3bG66ZTfdc930KPj
nfkWrsAWmPz8irHoWQ2OX+ZJTprVYRYIZXqpFn3zuwmhpJkZUVULMMk6LFBKDmBT
F2+b4h49P+oNJ+6CRoOERHYq2k1MmYBcu1z8lMjdfRGUDdK4vS9pcqhBXJJg1vU9
APRtfiECgYEA6Y3LqQJLkUI0w6g/9T+XyzUoi0aUfH6PT81XnGYqJxTBHinZvgML
mF3qtZ0bHGwEoAsyhSgDkeCawE/E7Phd+B6aku2QMVm8GHygZg0Pbao4cxXv+CF3
i1Lo7n3zY0kTVrjsvDRsDDESmRK4Ea48fJwOfUEtfG6VDtwmZAe8chcCgYEAxdWd
sWcc45ARi2vY6yb5Ysgt/g0z26KyQydF+GMWIz1FDfUxXJ/axdCovd3VIHDvItJE
n9LjFiobkyOKX99ou1foWwsmhn11duVrF7hsVrE0nsbd4RX3sTbqXa9x3GN/ujFr
0xHUTmiXt3Qyn/076jBiLGnbtzSxJ/IZIEI9VIsCgYEAketHnTaT5BOLR9ss6ptq
yUlTJYFZcFbaTy+qV0r1dyleZuwa4L6iVfYHmKSptZ4/XYbhb5RKdq/vv8uW679Z
ZpYoWTgX6N15yYrD5D6wrwG09yJzpYGzYNbSNX93u0aC0KIFNqlCAHQAfKbXXiSQ
IgKWgudf9ehZNMmTKtgygs0CgYAoTV9Fr7Lj7QqV84+KQDNX2137PmdNHDTil1Ka
ylzNKwMxV70JmIsx91MY8uMjK76bwmg2gvi+IC/j5r6ez11/pOXx/jCH/3D5mr0Z
ZPm1I36LxgmXfCkskfpmwYIZmq9/l+fWZPByVL5roiFaFHWrPNYTJDGdff+FGr3h
o3zpBwKBgDY1sih/nY+6rwOP+DcabGK9KFFKLXsoJrXobEniLxp7oFaGN2GkmKvN
NajCs5pr3wfb4LrVrsNvERnUsUXWg6ReLqfWbT4bmjzE2iJ3IbtVQ5M4kl6YrbdZ
PMgWoLCqnoo8NoGBtmVMWhaXNJvVZPgZHk33T5F0Cg6PKNdHDchH
-----END RSA PRIVATE KEY-----

View File

@ -1,51 +0,0 @@
package main
import (
"fmt"
"os"
"time"
MQTT "git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git"
)
var f MQTT.MessageHandler = func(client *MQTT.Client, msg MQTT.Message) {
fmt.Printf("TOPIC: %s\n", msg.Topic())
fmt.Printf("MSG: %s\n", msg.Payload())
}
var onConnect MQTT.OnConnectHandler = func(client *MQTT.Client) {
fmt.Println("onConnect")
if token := client.Subscribe("shirou@github/#", 0, nil); token.Wait() && token.Error() != nil {
fmt.Println(token.Error())
os.Exit(1)
}
}
var subscribed = "#"
func main() {
opts := MQTT.NewClientOptions().AddBroker("tcp://lite.mqtt.shiguredo.jp:1883")
opts.SetDefaultPublishHandler(f)
opts.SetOnConnectHandler(onConnect)
opts.SetCleanSession(true)
opts.SetUsername("shirou@github")
opts.SetPassword("8Ub6F68kfYlr7RoV")
c := MQTT.NewClient(opts)
if token := c.Connect(); token.Wait() && token.Error() != nil {
panic(token.Error())
}
qos := 0
retain := false
payload := "sanple"
topic := "shirou@github/log"
token := c.Publish(topic, byte(qos), retain, payload)
// token.Wait()
fmt.Println("%v", token.Error())
for {
time.Sleep(1 * time.Second)
}
}

View File

@ -1,35 +0,0 @@
package main
import (
"fmt"
"os"
"time"
MQTT "git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git"
)
var f MQTT.MessageHandler = func(client *MQTT.Client, msg MQTT.Message) {
fmt.Printf("TOPIC: %s\n", msg.Topic())
fmt.Printf("MSG: %s\n", msg.Payload())
}
var subscribed = "#"
func main() {
opts := MQTT.NewClientOptions().AddBroker("tcp://localhost:1883")
opts.SetDefaultPublishHandler(f)
opts.SetCleanSession(true)
c := MQTT.NewClient(opts)
if token := c.Connect(); token.Wait() && token.Error() != nil {
panic(token.Error())
}
if token := c.Subscribe("#", 0, nil); token.Wait() && token.Error() != nil {
fmt.Println(token.Error())
os.Exit(1)
}
for {
time.Sleep(1 * time.Second)
}
}

View File

@ -1,42 +0,0 @@
package main
import (
"fmt"
"os"
"time"
MQTT "git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git"
)
var f MQTT.MessageHandler = func(client *MQTT.Client, msg MQTT.Message) {
fmt.Printf("TOPIC: %s\n", msg.Topic())
fmt.Printf("MSG: %s\n", msg.Payload())
}
var onConnect MQTT.OnConnectHandler = func(client *MQTT.Client) {
fmt.Println("onConnect")
if token := client.Subscribe("#", 0, nil); token.Wait() && token.Error() != nil {
fmt.Println(token.Error())
os.Exit(1)
}
}
var subscribed = "#"
func main() {
// opts := MQTT.NewClientOptions().AddBroker("tcp://localhost:1883")
opts := MQTT.NewClientOptions().AddBroker("tcp://lite.mqtt.shiguredo.jp:1883")
opts.SetDefaultPublishHandler(f)
opts.SetOnConnectHandler(onConnect)
opts.SetCleanSession(true)
opts.SetUsername("shirou@github.com")
c := MQTT.NewClient(opts)
if token := c.Connect(); token.Wait() && token.Error() != nil {
panic(token.Error())
}
for {
time.Sleep(1 * time.Second)
}
}

View File

@ -1,130 +0,0 @@
/*
* Copyright (c) 2013 IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Seth Hoenig
* Allan Stockdill-Mander
* Mike Robertson
*/
package main
import (
"flag"
"fmt"
"os"
MQTT "git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git"
)
/*
Options:
[-help] Display help
[-a pub|sub] Action pub (publish) or sub (subscribe)
[-m <message>] Payload to send
[-n <number>] Number of messages to send or receive
[-q 0|1|2] Quality of Service
[-clean] CleanSession (true if -clean is present)
[-id <clientid>] CliendID
[-user <user>] User
[-password <password>] Password
[-broker <uri>] Broker URI
[-topic <topic>] Topic
[-store <path>] Store Directory
*/
func main() {
topic := flag.String("topic", "", "The topic name to/from which to publish/subscribe")
broker := flag.String("broker", "tcp://iot.eclipse.org:1883", "The broker URI. ex: tcp://10.10.1.1:1883")
password := flag.String("password", "", "The password (optional)")
user := flag.String("user", "", "The User (optional)")
id := flag.String("id", "testgoid", "The ClientID (optional)")
cleansess := flag.Bool("clean", false, "Set Clean Session (default false)")
qos := flag.Int("qos", 0, "The Quality of Service 0,1,2 (default 0)")
num := flag.Int("num", 1, "The number of messages to publish or subscribe (default 1)")
payload := flag.String("message", "", "The message text to publish (default empty)")
action := flag.String("action", "", "Action publish or subscribe (required)")
store := flag.String("store", ":memory:", "The Store Directory (default use memory store)")
flag.Parse()
if *action != "pub" && *action != "sub" {
fmt.Println("Invalid setting for -action, must be pub or sub")
return
}
if *topic == "" {
fmt.Println("Invalid setting for -topic, must not be empty")
return
}
fmt.Printf("Sample Info:\n")
fmt.Printf("\taction: %s\n", *action)
fmt.Printf("\tbroker: %s\n", *broker)
fmt.Printf("\tclientid: %s\n", *id)
fmt.Printf("\tuser: %s\n", *user)
fmt.Printf("\tpassword: %s\n", *password)
fmt.Printf("\ttopic: %s\n", *topic)
fmt.Printf("\tmessage: %s\n", *payload)
fmt.Printf("\tqos: %d\n", *qos)
fmt.Printf("\tcleansess: %v\n", *cleansess)
fmt.Printf("\tnum: %d\n", *num)
fmt.Printf("\tstore: %s\n", *store)
opts := MQTT.NewClientOptions()
opts.AddBroker(*broker)
opts.SetClientID(*id)
opts.SetUsername(*user)
opts.SetPassword(*password)
opts.SetCleanSession(*cleansess)
if *store != ":memory:" {
opts.SetStore(MQTT.NewFileStore(*store))
}
if *action == "pub" {
client := MQTT.NewClient(opts)
if token := client.Connect(); token.Wait() && token.Error() != nil {
panic(token.Error())
}
fmt.Println("Sample Publisher Started")
for i := 0; i < *num; i++ {
fmt.Println("---- doing publish ----")
token := client.Publish(*topic, byte(*qos), false, *payload)
token.Wait()
}
client.Disconnect(250)
fmt.Println("Sample Publisher Disconnected")
} else {
receiveCount := 0
choke := make(chan [2]string)
opts.SetDefaultPublishHandler(func(client *MQTT.Client, msg MQTT.Message) {
choke <- [2]string{msg.Topic(), string(msg.Payload())}
})
client := MQTT.NewClient(opts)
if token := client.Connect(); token.Wait() && token.Error() != nil {
panic(token.Error())
}
if token := client.Subscribe(*topic, byte(*qos), nil); token.Wait() && token.Error() != nil {
fmt.Println(token.Error())
os.Exit(1)
}
for receiveCount < *num {
incoming := <-choke
fmt.Printf("RECEIVED TOPIC: %s MESSAGE: %s\n", incoming[0], incoming[1])
receiveCount++
}
client.Disconnect(250)
fmt.Println("Sample Subscriber Disconnected")
}
}

View File

@ -1,58 +0,0 @@
/*
* Copyright (c) 2013 IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Seth Hoenig
* Allan Stockdill-Mander
* Mike Robertson
*/
package main
import (
"fmt"
"os"
"time"
MQTT "git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git"
)
var f MQTT.MessageHandler = func(client *MQTT.Client, msg MQTT.Message) {
fmt.Printf("TOPIC: %s\n", msg.Topic())
fmt.Printf("MSG: %s\n", msg.Payload())
}
func main() {
opts := MQTT.NewClientOptions().AddBroker("tcp://iot.eclipse.org:1883").SetClientID("gotrivial")
opts.SetDefaultPublishHandler(f)
c := MQTT.NewClient(opts)
if token := c.Connect(); token.Wait() && token.Error() != nil {
panic(token.Error())
}
if token := c.Subscribe("/go-mqtt/sample", 0, nil); token.Wait() && token.Error() != nil {
fmt.Println(token.Error())
os.Exit(1)
}
for i := 0; i < 5; i++ {
text := fmt.Sprintf("this is msg #%d!", i)
token := c.Publish("/go-mqtt/sample", 0, false, text)
token.Wait()
}
time.Sleep(3 * time.Second)
if token := c.Unsubscribe("/go-mqtt/sample"); token.Wait() && token.Error() != nil {
fmt.Println(token.Error())
os.Exit(1)
}
c.Disconnect(250)
}

View File

@ -1,123 +0,0 @@
/*
* Copyright (c) 2013 IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Seth Hoenig
* Allan Stockdill-Mander
* Mike Robertson
*/
/*
To run this sample, The following certificates
must be created:
rootCA-crt.pem - root certificate authority that is used
to sign and verify the client and server
certificates.
rootCA-key.pem - keyfile for the rootCA.
server-crt.pem - server certificate signed by the CA.
server-key.pem - keyfile for the server certificate.
client-crt.pem - client certificate signed by the CA.
client-key.pem - keyfile for the client certificate.
CAfile.pem - file containing concatenated CA certificates
if there is more than 1 in the chain.
(e.g. root CA -> intermediate CA -> server cert)
Instead of creating CAfile.pem, rootCA-crt.pem can be added
to the default openssl CA certificate bundle. To find the
default CA bundle used, check:
$GO_ROOT/src/pks/crypto/x509/root_unix.go
To use this CA bundle, just set tls.Config.RootCAs = nil.
*/
package main
import "io/ioutil"
import "fmt"
import "time"
import "crypto/tls"
import "crypto/x509"
import MQTT "git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git"
func NewTLSConfig() *tls.Config {
// Import trusted certificates from CAfile.pem.
// Alternatively, manually add CA certificates to
// default openssl CA bundle.
certpool := x509.NewCertPool()
pemCerts, err := ioutil.ReadFile("samplecerts/CAfile.pem")
if err == nil {
certpool.AppendCertsFromPEM(pemCerts)
}
// Import client certificate/key pair
cert, err := tls.LoadX509KeyPair("samplecerts/client-crt.pem", "samplecerts/client-key.pem")
if err != nil {
panic(err)
}
// Just to print out the client certificate..
cert.Leaf, err = x509.ParseCertificate(cert.Certificate[0])
if err != nil {
panic(err)
}
fmt.Println(cert.Leaf)
// Create tls.Config with desired tls properties
return &tls.Config{
// RootCAs = certs used to verify server cert.
RootCAs: certpool,
// ClientAuth = whether to request cert from server.
// Since the server is set up for SSL, this happens
// anyways.
ClientAuth: tls.NoClientCert,
// ClientCAs = certs used to validate client cert.
ClientCAs: nil,
// InsecureSkipVerify = verify that cert contents
// match server. IP matches what is in cert etc.
InsecureSkipVerify: true,
// Certificates = list of certs client sends to server.
Certificates: []tls.Certificate{cert},
}
}
var f MQTT.MessageHandler = func(client *MQTT.Client, msg MQTT.Message) {
fmt.Printf("TOPIC: %s\n", msg.Topic())
fmt.Printf("MSG: %s\n", msg.Payload())
}
func main() {
tlsconfig := NewTLSConfig()
opts := MQTT.NewClientOptions()
opts.AddBroker("ssl://iot.eclipse.org:8883")
opts.SetClientID("ssl-sample").SetTLSConfig(tlsconfig)
opts.SetDefaultPublishHandler(f)
// Start the connection
c := MQTT.NewClient(opts)
if token := c.Connect(); token.Wait() && token.Error() != nil {
panic(token.Error())
}
c.Subscribe("/go-mqtt/sample", 0, nil)
i := 0
for _ = range time.Tick(time.Duration(1) * time.Second) {
if i == 5 {
break
}
text := fmt.Sprintf("this is msg #%d!", i)
c.Publish("/go-mqtt/sample", 0, false, text)
i++
}
c.Disconnect(250)
}

View File

@ -1,70 +0,0 @@
/*
* Copyright (c) 2013 IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Seth Hoenig
* Allan Stockdill-Mander
* Mike Robertson
*/
package main
import (
"bufio"
"crypto/tls"
"flag"
"fmt"
"io"
//"log"
"os"
"strconv"
"time"
)
import MQTT "git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git"
func main() {
//MQTT.DEBUG = log.New(os.Stdout, "", 0)
//MQTT.ERROR = log.New(os.Stdout, "", 0)
stdin := bufio.NewReader(os.Stdin)
hostname, _ := os.Hostname()
server := flag.String("server", "tcp://127.0.0.1:1883", "The full URL of the MQTT server to connect to")
topic := flag.String("topic", hostname, "Topic to publish the messages on")
qos := flag.Int("qos", 0, "The QoS to send the messages at")
retained := flag.Bool("retained", false, "Are the messages sent with the retained flag")
clientid := flag.String("clientid", hostname+strconv.Itoa(time.Now().Second()), "A clientid for the connection")
username := flag.String("username", "", "A username to authenticate to the MQTT server")
password := flag.String("password", "", "Password to match username")
flag.Parse()
connOpts := MQTT.NewClientOptions().AddBroker(*server).SetClientID(*clientid).SetCleanSession(true)
if *username != "" {
connOpts.SetUsername(*username)
if *password != "" {
connOpts.SetPassword(*password)
}
}
tlsConfig := &tls.Config{InsecureSkipVerify: true, ClientAuth: tls.NoClientCert}
connOpts.SetTLSConfig(tlsConfig)
client := MQTT.NewClient(connOpts)
if token := client.Connect(); token.Wait() && token.Error() != nil {
fmt.Println(token.Error())
return
}
fmt.Printf("Connected to %s\n", *server)
for {
message, err := stdin.ReadString('\n')
if err == io.EOF {
os.Exit(0)
}
client.Publish(*topic, byte(*qos), *retained, message)
}
}

View File

@ -1,85 +0,0 @@
/*
* Copyright (c) 2013 IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Seth Hoenig
* Allan Stockdill-Mander
* Mike Robertson
*/
package main
import (
"crypto/tls"
"flag"
"fmt"
//"log"
"os"
"os/signal"
"strconv"
"syscall"
"time"
MQTT "git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git"
)
func onMessageReceived(client *MQTT.Client, message MQTT.Message) {
fmt.Printf("Received message on topic: %s\nMessage: %s\n", message.Topic(), message.Payload())
}
var i int64
func main() {
//MQTT.DEBUG = log.New(os.Stdout, "", 0)
//MQTT.ERROR = log.New(os.Stdout, "", 0)
c := make(chan os.Signal, 1)
i = 0
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
go func() {
<-c
fmt.Println("signal received, exiting")
os.Exit(0)
}()
hostname, _ := os.Hostname()
server := flag.String("server", "tcp://127.0.0.1:1883", "The full url of the MQTT server to connect to ex: tcp://127.0.0.1:1883")
topic := flag.String("topic", "#", "Topic to subscribe to")
qos := flag.Int("qos", 0, "The QoS to subscribe to messages at")
clientid := flag.String("clientid", hostname+strconv.Itoa(time.Now().Second()), "A clientid for the connection")
username := flag.String("username", "", "A username to authenticate to the MQTT server")
password := flag.String("password", "", "Password to match username")
flag.Parse()
connOpts := &MQTT.ClientOptions{
ClientID: *clientid,
CleanSession: true,
Username: *username,
Password: *password,
MaxReconnectInterval: 1 * time.Second,
KeepAlive: 30 * time.Second,
TLSConfig: tls.Config{InsecureSkipVerify: true, ClientAuth: tls.NoClientCert},
}
connOpts.AddBroker(*server)
connOpts.OnConnect = func(c *MQTT.Client) {
if token := c.Subscribe(*topic, byte(*qos), onMessageReceived); token.Wait() && token.Error() != nil {
panic(token.Error())
}
}
client := MQTT.NewClient(connOpts)
if token := client.Connect(); token.Wait() && token.Error() != nil {
panic(token.Error())
} else {
fmt.Printf("Connected to %s\n", *server)
}
for {
time.Sleep(1 * time.Second)
}
}

View File

@ -1,125 +0,0 @@
/*
* Copyright (c) 2013 IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Seth Hoenig
* Allan Stockdill-Mander
* Mike Robertson
*/
package mqtt
import (
"fmt"
"git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets"
"strconv"
)
const (
inboundPrefix = "i."
outboundPrefix = "o."
)
// Store is an interface which can be used to provide implementations
// for message persistence.
// Because we may have to store distinct messages with the same
// message ID, we need a unique key for each message. This is
// possible by prepending "i." or "o." to each message id
type Store interface {
Open()
Put(string, packets.ControlPacket)
Get(string) packets.ControlPacket
All() []string
Del(string)
Close()
Reset()
}
// A key MUST have the form "X.[messageid]"
// where X is 'i' or 'o'
func mIDFromKey(key string) uint16 {
s := key[2:]
i, err := strconv.Atoi(s)
chkerr(err)
return uint16(i)
}
// Return a string of the form "i.[id]"
func inboundKeyFromMID(id uint16) string {
return fmt.Sprintf("%s%d", inboundPrefix, id)
}
// Return a string of the form "o.[id]"
func outboundKeyFromMID(id uint16) string {
return fmt.Sprintf("%s%d", outboundPrefix, id)
}
// govern which outgoing messages are persisted
func persistOutbound(s Store, m packets.ControlPacket) {
switch m.Details().Qos {
case 0:
switch m.(type) {
case *packets.PubackPacket, *packets.PubcompPacket:
// Sending puback. delete matching publish
// from ibound
s.Del(inboundKeyFromMID(m.Details().MessageID))
}
case 1:
switch m.(type) {
case *packets.PublishPacket, *packets.PubrelPacket, *packets.SubscribePacket, *packets.UnsubscribePacket:
// Sending publish. store in obound
// until puback received
s.Put(outboundKeyFromMID(m.Details().MessageID), m)
default:
chkcond(false)
}
case 2:
switch m.(type) {
case *packets.PublishPacket:
// Sending publish. store in obound
// until pubrel received
s.Put(outboundKeyFromMID(m.Details().MessageID), m)
default:
chkcond(false)
}
}
}
// govern which incoming messages are persisted
func persistInbound(s Store, m packets.ControlPacket) {
switch m.Details().Qos {
case 0:
switch m.(type) {
case *packets.PubackPacket, *packets.SubackPacket, *packets.UnsubackPacket, *packets.PubcompPacket:
// Received a puback. delete matching publish
// from obound
s.Del(outboundKeyFromMID(m.Details().MessageID))
case *packets.PublishPacket, *packets.PubrecPacket, *packets.PingrespPacket, *packets.ConnackPacket:
default:
chkcond(false)
}
case 1:
switch m.(type) {
case *packets.PublishPacket, *packets.PubrelPacket:
// Received a publish. store it in ibound
// until puback sent
s.Put(inboundKeyFromMID(m.Details().MessageID), m)
default:
chkcond(false)
}
case 2:
switch m.(type) {
case *packets.PublishPacket:
// Received a publish. store it in ibound
// until pubrel received
s.Put(inboundKeyFromMID(m.Details().MessageID), m)
default:
chkcond(false)
}
}
}

View File

@ -1,156 +0,0 @@
/*
* Copyright (c) 2014 IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Allan Stockdill-Mander
*/
package mqtt
import (
"git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets"
"sync"
"time"
)
//PacketAndToken is a struct that contains both a ControlPacket and a
//Token. This struct is passed via channels between the client interface
//code and the underlying code responsible for sending and receiving
//MQTT messages.
type PacketAndToken struct {
p packets.ControlPacket
t Token
}
//Token defines the interface for the tokens used to indicate when
//actions have completed.
type Token interface {
Wait() bool
WaitTimeout(time.Duration) bool
flowComplete()
Error() error
}
type baseToken struct {
m sync.RWMutex
complete chan struct{}
ready bool
err error
}
// Wait will wait indefinitely for the Token to complete, ie the Publish
// to be sent and confirmed receipt from the broker
func (b *baseToken) Wait() bool {
b.m.Lock()
defer b.m.Unlock()
if !b.ready {
<-b.complete
b.ready = true
}
return b.ready
}
// WaitTimeout takes a time in ms to wait for the flow associated with the
// Token to complete, returns true if it returned before the timeout or
// returns false if the timeout occurred. In the case of a timeout the Token
// does not have an error set in case the caller wishes to wait again
func (b *baseToken) WaitTimeout(d time.Duration) bool {
b.m.Lock()
defer b.m.Unlock()
if !b.ready {
select {
case <-b.complete:
b.ready = true
case <-time.After(d):
}
}
return b.ready
}
func (b *baseToken) flowComplete() {
close(b.complete)
}
func (b *baseToken) Error() error {
b.m.RLock()
defer b.m.RUnlock()
return b.err
}
func newToken(tType byte) Token {
switch tType {
case packets.Connect:
return &ConnectToken{baseToken: baseToken{complete: make(chan struct{})}}
case packets.Subscribe:
return &SubscribeToken{baseToken: baseToken{complete: make(chan struct{})}, subResult: make(map[string]byte)}
case packets.Publish:
return &PublishToken{baseToken: baseToken{complete: make(chan struct{})}}
case packets.Unsubscribe:
return &UnsubscribeToken{baseToken: baseToken{complete: make(chan struct{})}}
case packets.Disconnect:
return &DisconnectToken{baseToken: baseToken{complete: make(chan struct{})}}
}
return nil
}
//ConnectToken is an extension of Token containing the extra fields
//required to provide information about calls to Connect()
type ConnectToken struct {
baseToken
returnCode byte
}
//ReturnCode returns the acknowlegement code in the connack sent
//in response to a Connect()
func (c *ConnectToken) ReturnCode() byte {
c.m.RLock()
defer c.m.RUnlock()
return c.returnCode
}
//PublishToken is an extension of Token containing the extra fields
//required to provide information about calls to Publish()
type PublishToken struct {
baseToken
messageID uint16
}
//MessageID returns the MQTT message ID that was assigned to the
//Publish packet when it was sent to the broker
func (p *PublishToken) MessageID() uint16 {
return p.messageID
}
//SubscribeToken is an extension of Token containing the extra fields
//required to provide information about calls to Subscribe()
type SubscribeToken struct {
baseToken
subs []string
subResult map[string]byte
}
//Result returns a map of topics that were subscribed to along with
//the matching return code from the broker. This is either the Qos
//value of the subscription or an error code.
func (s *SubscribeToken) Result() map[string]byte {
s.m.RLock()
defer s.m.RUnlock()
return s.subResult
}
//UnsubscribeToken is an extension of Token containing the extra fields
//required to provide information about calls to Unsubscribe()
type UnsubscribeToken struct {
baseToken
}
//DisconnectToken is an extension of Token containing the extra fields
//required to provide information about calls to Disconnect()
type DisconnectToken struct {
baseToken
}

View File

@ -1,82 +0,0 @@
/*
* Copyright (c) 2014 IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Seth Hoenig
* Allan Stockdill-Mander
* Mike Robertson
*/
package mqtt
import (
"errors"
"strings"
)
//InvalidQos is the error returned when an packet is to be sent
//with an invalid Qos value
var ErrInvalidQos = errors.New("Invalid QoS")
//InvalidTopicEmptyString is the error returned when a topic string
//is passed in that is 0 length
var ErrInvalidTopicEmptyString = errors.New("Invalid Topic; empty string")
//InvalidTopicMultilevel is the error returned when a topic string
//is passed in that has the multi level wildcard in any position but
//the last
var ErrInvalidTopicMultilevel = errors.New("Invalid Topic; multi-level wildcard must be last level")
// Topic Names and Topic Filters
// The MQTT v3.1.1 spec clarifies a number of ambiguities with regard
// to the validity of Topic strings.
// - A Topic must be between 1 and 65535 bytes.
// - A Topic is case sensitive.
// - A Topic may contain whitespace.
// - A Topic containing a leading forward slash is different than a Topic without.
// - A Topic may be "/" (two levels, both empty string).
// - A Topic must be UTF-8 encoded.
// - A Topic may contain any number of levels.
// - A Topic may contain an empty level (two forward slashes in a row).
// - A TopicName may not contain a wildcard.
// - A TopicFilter may only have a # (multi-level) wildcard as the last level.
// - A TopicFilter may contain any number of + (single-level) wildcards.
// - A TopicFilter with a # will match the absense of a level
// Example: a subscription to "foo/#" will match messages published to "foo".
func validateSubscribeMap(subs map[string]byte) ([]string, []byte, error) {
var topics []string
var qoss []byte
for topic, qos := range subs {
if err := validateTopicAndQos(topic, qos); err != nil {
return nil, nil, err
}
topics = append(topics, topic)
qoss = append(qoss, qos)
}
return topics, qoss, nil
}
func validateTopicAndQos(topic string, qos byte) error {
if len(topic) == 0 {
return ErrInvalidTopicEmptyString
}
levels := strings.Split(topic, "/")
for i, level := range levels {
if level == "#" && i != len(levels)-1 {
return ErrInvalidTopicMultilevel
}
}
if qos < 0 || qos > 2 {
return ErrInvalidQos
}
return nil
}

View File

@ -1,36 +0,0 @@
/*
* Copyright (c) 2013 IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Seth Hoenig
* Allan Stockdill-Mander
* Mike Robertson
*/
package mqtt
import (
"io/ioutil"
"log"
)
// Internal levels of library output that are initialised to not print
// anything but can be overridden by programmer
var (
ERROR *log.Logger
CRITICAL *log.Logger
WARN *log.Logger
DEBUG *log.Logger
)
func init() {
ERROR = log.New(ioutil.Discard, "", 0)
CRITICAL = log.New(ioutil.Discard, "", 0)
WARN = log.New(ioutil.Discard, "", 0)
DEBUG = log.New(ioutil.Discard, "", 0)
}

View File

@ -1,56 +0,0 @@
/*
* Copyright (c) 2013 IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Seth Hoenig
* Allan Stockdill-Mander
* Mike Robertson
*/
package mqtt
import (
"log"
"net/http"
"os"
"testing"
_ "net/http/pprof"
)
func init() {
DEBUG = log.New(os.Stderr, "DEBUG ", log.Ltime)
WARN = log.New(os.Stderr, "WARNING ", log.Ltime)
CRITICAL = log.New(os.Stderr, "CRITICAL ", log.Ltime)
ERROR = log.New(os.Stderr, "ERROR ", log.Ltime)
go func() {
log.Println(http.ListenAndServe("localhost:6060", nil))
}()
}
func Test_NewClient_simple(t *testing.T) {
ops := NewClientOptions().SetClientID("foo").AddBroker("tcp://10.10.0.1:1883")
c := NewClient(ops)
if c == nil {
t.Fatalf("ops is nil")
}
if c.options.ClientID != "foo" {
t.Fatalf("bad client id")
}
if c.options.Servers[0].Scheme != "tcp" {
t.Fatalf("bad server scheme")
}
if c.options.Servers[0].Host != "10.10.0.1:1883" {
t.Fatalf("bad server host")
}
}

View File

@ -1,111 +0,0 @@
/*
* Copyright (c) 2013 IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Seth Hoenig
* Allan Stockdill-Mander
* Mike Robertson
*/
package mqtt
import (
"fmt"
"testing"
"time"
)
type DummyToken struct{}
func (d *DummyToken) Wait() bool {
return true
}
func (d *DummyToken) WaitTimeout(t time.Duration) bool {
return true
}
func (d *DummyToken) flowComplete() {}
func (d *DummyToken) Error() error {
return nil
}
func Test_getID(t *testing.T) {
mids := &messageIds{index: make(map[uint16]Token)}
i1 := mids.getID(&DummyToken{})
if i1 != 1 {
t.Fatalf("i1 was wrong: %v", i1)
}
i2 := mids.getID(&DummyToken{})
if i2 != 2 {
t.Fatalf("i2 was wrong: %v", i2)
}
for i := uint16(3); i < 100; i++ {
id := mids.getID(&DummyToken{})
if id != i {
t.Fatalf("id was wrong expected %v got %v", i, id)
}
}
}
func Test_freeID(t *testing.T) {
mids := &messageIds{index: make(map[uint16]Token)}
i1 := mids.getID(&DummyToken{})
mids.freeID(i1)
if i1 != 1 {
t.Fatalf("i1 was wrong: %v", i1)
}
i2 := mids.getID(&DummyToken{})
fmt.Printf("i2: %v\n", i2)
}
func Test_messageids_mix(t *testing.T) {
mids := &messageIds{index: make(map[uint16]Token)}
done := make(chan bool)
a := make(chan uint16, 3)
b := make(chan uint16, 20)
c := make(chan uint16, 100)
go func() {
for i := 0; i < 10000; i++ {
a <- mids.getID(&DummyToken{})
mids.freeID(<-b)
}
done <- true
}()
go func() {
for i := 0; i < 10000; i++ {
b <- mids.getID(&DummyToken{})
mids.freeID(<-c)
}
done <- true
}()
go func() {
for i := 0; i < 10000; i++ {
c <- mids.getID(&DummyToken{})
mids.freeID(<-a)
}
done <- true
}()
<-done
<-done
<-done
}

View File

@ -1,126 +0,0 @@
/*
* Copyright (c) 2013 IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Seth Hoenig
* Allan Stockdill-Mander
* Mike Robertson
*/
package mqtt
import (
"crypto/tls"
"crypto/x509"
"testing"
"time"
)
func Test_NewClientOptions_default(t *testing.T) {
o := NewClientOptions()
if o.ClientID != "" {
t.Fatalf("bad default client id")
}
if o.Username != "" {
t.Fatalf("bad default username")
}
if o.Password != "" {
t.Fatalf("bad default password")
}
if o.KeepAlive != 30*time.Second {
t.Fatalf("bad default timeout")
}
}
func Test_NewClientOptions_mix(t *testing.T) {
o := NewClientOptions()
o.AddBroker("tcp://192.168.1.2:9999")
o.SetClientID("myclientid")
o.SetUsername("myuser")
o.SetPassword("mypassword")
o.SetKeepAlive(88)
if o.Servers[0].Scheme != "tcp" {
t.Fatalf("bad scheme")
}
if o.Servers[0].Host != "192.168.1.2:9999" {
t.Fatalf("bad host")
}
if o.ClientID != "myclientid" {
t.Fatalf("bad set clientid")
}
if o.Username != "myuser" {
t.Fatalf("bad set username")
}
if o.Password != "mypassword" {
t.Fatalf("bad set password")
}
if o.KeepAlive != 88 {
t.Fatalf("bad set timeout")
}
}
func Test_ModifyOptions(t *testing.T) {
o := NewClientOptions()
o.AddBroker("tcp://3.3.3.3:12345")
c := NewClient(o)
o.AddBroker("ws://2.2.2.2:9999")
o.SetOrderMatters(false)
if c.options.Servers[0].Scheme != "tcp" {
t.Fatalf("client options.server.Scheme was modified")
}
// if c.options.server.Host != "2.2.2.2:9999" {
// t.Fatalf("client options.server.Host was modified")
// }
if o.Order != false {
t.Fatalf("options.order was not modified")
}
}
func Test_TLSConfig(t *testing.T) {
o := NewClientOptions().SetTLSConfig(&tls.Config{
RootCAs: x509.NewCertPool(),
ClientAuth: tls.NoClientCert,
ClientCAs: x509.NewCertPool(),
InsecureSkipVerify: true})
c := NewClient(o)
if c.options.TLSConfig.ClientAuth != tls.NoClientCert {
t.Fatalf("client options.tlsConfig ClientAuth incorrect")
}
if c.options.TLSConfig.InsecureSkipVerify != true {
t.Fatalf("client options.tlsConfig InsecureSkipVerify incorrect")
}
}
func Test_OnConnectionLost(t *testing.T) {
onconnlost := func(client *Client, err error) {
panic(err)
}
o := NewClientOptions().SetConnectionLostHandler(onconnlost)
c := NewClient(o)
if c.options.OnConnectionLost == nil {
t.Fatalf("client options.onconnlost was nil")
}
}

View File

@ -1,62 +0,0 @@
/*
* Copyright (c) 2013 IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Seth Hoenig
* Allan Stockdill-Mander
* Mike Robertson
*/
package mqtt
import (
"bytes"
"git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets"
"testing"
)
func Test_NewPingReqMessage(t *testing.T) {
pr := packets.NewControlPacket(packets.Pingreq).(*packets.PingreqPacket)
if pr.MessageType != packets.Pingreq {
t.Errorf("NewPingReqMessage bad msg type: %v", pr.MessageType)
}
if pr.RemainingLength != 0 {
t.Errorf("NewPingReqMessage bad remlen, expected 0, got %d", pr.RemainingLength)
}
exp := []byte{
0xC0,
0x00,
}
var buf bytes.Buffer
pr.Write(&buf)
bs := buf.Bytes()
if len(bs) != 2 {
t.Errorf("NewPingReqMessage.Bytes() wrong length: %d", len(bs))
}
if exp[0] != bs[0] || exp[1] != bs[1] {
t.Errorf("NewPingMessage.Bytes() wrong")
}
}
func Test_DecodeMessage_pingresp(t *testing.T) {
bs := bytes.NewBuffer([]byte{
0xD0,
0x00,
})
presp, _ := packets.ReadPacket(bs)
if presp.(*packets.PingrespPacket).MessageType != packets.Pingresp {
t.Errorf("DecodeMessage ping response wrong msg type: %v", presp.(*packets.PingrespPacket).MessageType)
}
if presp.(*packets.PingrespPacket).RemainingLength != 0 {
t.Errorf("DecodeMessage ping response wrong rem len: %d", presp.(*packets.PingrespPacket).RemainingLength)
}
}

View File

@ -1,287 +0,0 @@
/*
* Copyright (c) 2013 IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Seth Hoenig
* Allan Stockdill-Mander
* Mike Robertson
*/
package mqtt
import (
"git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets"
"testing"
)
func Test_newRouter(t *testing.T) {
router, stop := newRouter()
if router == nil {
t.Fatalf("router is nil")
}
if stop == nil {
t.Fatalf("stop is nil")
}
if router.routes.Len() != 0 {
t.Fatalf("router.routes was not empty")
}
}
func Test_AddRoute(t *testing.T) {
router, _ := newRouter()
calledback := false
cb := func(client *Client, msg Message) {
calledback = true
}
router.addRoute("/alpha", cb)
if router.routes.Len() != 1 {
t.Fatalf("router.routes was wrong")
}
}
func Test_Match(t *testing.T) {
router, _ := newRouter()
router.addRoute("/alpha", nil)
if !router.routes.Front().Value.(*route).match("/alpha") {
t.Fatalf("match function is bad")
}
if router.routes.Front().Value.(*route).match("alpha") {
t.Fatalf("match function is bad")
}
}
func Test_match(t *testing.T) {
check := func(route, topic string, exp bool) {
result := routeIncludesTopic(route, topic)
if exp != result {
t.Errorf("match was bad R: %v, T: %v, EXP: %v", route, topic, exp)
}
}
// ** Basic **
R := ""
T := ""
check(R, T, true)
R = "x"
T = ""
check(R, T, false)
R = ""
T = "x"
check(R, T, false)
R = "x"
T = "x"
check(R, T, true)
R = "x"
T = "X"
check(R, T, false)
R = "alpha"
T = "alpha"
check(R, T, true)
R = "alpha"
T = "beta"
check(R, T, false)
// ** / **
R = "/"
T = "/"
check(R, T, true)
R = "/one"
T = "/one"
check(R, T, true)
R = "/"
T = "/two"
check(R, T, false)
R = "/two"
T = "/"
check(R, T, false)
R = "/two"
T = "two"
check(R, T, false) // a leading "/" creates a different topic
R = "/a/"
T = "/a"
check(R, T, false)
R = "/a/"
T = "/a/b"
check(R, T, false)
R = "/a/b"
T = "/a/b"
check(R, T, true)
R = "/a/b/"
T = "/a/b"
check(R, T, false)
R = "/a/b"
T = "/R/b"
check(R, T, false)
// ** + **
R = "/a/+/c"
T = "/a/b/c"
check(R, T, true)
R = "/+/b/c"
T = "/a/b/c"
check(R, T, true)
R = "/a/b/+"
T = "/a/b/c"
check(R, T, true)
R = "/a/+/+"
T = "/a/b/c"
check(R, T, true)
R = "/+/+/+"
T = "/a/b/c"
check(R, T, true)
R = "/+/+/c"
T = "/a/b/c"
check(R, T, true)
R = "/a/b/c/+" // different number of levels
T = "/a/b/c"
check(R, T, false)
R = "+"
T = "a"
check(R, T, true)
R = "/+"
T = "a"
check(R, T, false)
R = "+/+"
T = "/a"
check(R, T, true)
R = "+/+"
T = "a"
check(R, T, false)
// ** # **
R = "#"
T = "/a/b/c"
check(R, T, true)
R = "/#"
T = "/a/b/c"
check(R, T, true)
// R = "/#/" // not valid
// T = "/a/b/c"
// check(R, T, true)
R = "/#"
T = "/a/b/c"
check(R, T, true)
R = "/a/#"
T = "/a/b/c"
check(R, T, true)
R = "/a/#"
T = "/a/b/c"
check(R, T, true)
R = "/a/b/#"
T = "/a/b/c"
check(R, T, true)
// ** unicode **
R = "☃"
T = "☃"
check(R, T, true)
R = "✈"
T = "☃"
check(R, T, false)
R = "/☃/✈"
T = "/☃/ッ"
check(R, T, false)
R = "#"
T = "/☃/ッ"
check(R, T, true)
R = "/☃/+"
T = "/☃/ッ/♫/ø/☹☹☹"
check(R, T, false)
R = "/☃/#"
T = "/☃/ッ/♫/ø/☹☹☹"
check(R, T, true)
R = "/☃/ッ/♫/ø/+"
T = "/☃/ッ/♫/ø/☹☹☹"
check(R, T, true)
R = "/☃/ッ/+/ø/☹☹☹"
T = "/☃/ッ/♫/ø/☹☹☹"
check(R, T, true)
R = "/+/a/ッ/+/ø/☹☹☹"
T = "/b/♫/ッ/♫/ø/☹☹☹"
check(R, T, false)
R = "/+/♫/ッ/+/ø/☹☹☹"
T = "/b/♫/ッ/♫/ø/☹☹☹"
check(R, T, true)
}
func Test_MatchAndDispatch(t *testing.T) {
calledback := make(chan bool)
cb := func(c *Client, m Message) {
calledback <- true
}
pub := packets.NewControlPacket(packets.Publish).(*packets.PublishPacket)
pub.Qos = 2
pub.TopicName = "a"
pub.Payload = []byte("foo")
msgs := make(chan *packets.PublishPacket)
router, stopper := newRouter()
router.addRoute("a", cb)
router.matchAndDispatch(msgs, true, nil)
msgs <- pub
<-calledback
stopper <- true
select {
case msgs <- pub:
t.Errorf("msgs should not have a listener")
default:
}
}

View File

@ -1,668 +0,0 @@
/*
* Copyright (c) 2013 IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Seth Hoenig
* Allan Stockdill-Mander
* Mike Robertson
*/
package mqtt
import (
"bufio"
"fmt"
"git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git/packets"
"io/ioutil"
"os"
"testing"
)
func Test_fullpath(t *testing.T) {
p := fullpath("/tmp/store", "o.44324")
e := "/tmp/store/o.44324.msg"
if p != e {
t.Fatalf("full path expected %s, got %s", e, p)
}
}
func Test_exists(t *testing.T) {
b := exists("/")
if !b {
t.Errorf("/proc/cpuinfo was not found")
}
}
func Test_exists_no(t *testing.T) {
b := exists("/this/path/is/not/real/i/hope")
if b {
t.Errorf("you have some strange files")
}
}
func isemptydir(dir string) bool {
chkcond(exists(dir))
files, err := ioutil.ReadDir(dir)
chkerr(err)
return len(files) == 0
}
func Test_mIDFromKey(t *testing.T) {
key := "i.123"
exp := uint16(123)
res := mIDFromKey(key)
if exp != res {
t.Fatalf("mIDFromKey failed")
}
}
func Test_inboundKeyFromMID(t *testing.T) {
id := uint16(9876)
exp := "i.9876"
res := inboundKeyFromMID(id)
if exp != res {
t.Fatalf("inboundKeyFromMID failed")
}
}
func Test_outboundKeyFromMID(t *testing.T) {
id := uint16(7654)
exp := "o.7654"
res := outboundKeyFromMID(id)
if exp != res {
t.Fatalf("outboundKeyFromMID failed")
}
}
/************************
**** persistOutbound ****
************************/
func Test_persistOutbound_connect(t *testing.T) {
ts := &TestStore{}
m := packets.NewControlPacket(packets.Connect).(*packets.ConnectPacket)
m.Qos = 0
m.Username = "user"
m.Password = []byte("pass")
m.ClientIdentifier = "cid"
//m := newConnectMsg(false, false, QOS_ZERO, false, "", nil, "cid", "user", "pass", 10)
persistOutbound(ts, m)
if len(ts.mput) != 0 {
t.Fatalf("persistOutbound put message it should not have")
}
if len(ts.mget) != 0 {
t.Fatalf("persistOutbound get message it should not have")
}
if len(ts.mdel) != 0 {
t.Fatalf("persistOutbound del message it should not have")
}
}
func Test_persistOutbound_publish_0(t *testing.T) {
ts := &TestStore{}
m := packets.NewControlPacket(packets.Publish).(*packets.PublishPacket)
m.Qos = 0
m.TopicName = "/popub0"
m.Payload = []byte{0xBB, 0x00}
m.MessageID = 40
persistOutbound(ts, m)
if len(ts.mput) != 0 {
t.Fatalf("persistOutbound put message it should not have")
}
if len(ts.mget) != 0 {
t.Fatalf("persistOutbound get message it should not have")
}
if len(ts.mdel) != 0 {
t.Fatalf("persistOutbound del message it should not have")
}
}
func Test_persistOutbound_publish_1(t *testing.T) {
ts := &TestStore{}
m := packets.NewControlPacket(packets.Publish).(*packets.PublishPacket)
m.Qos = 1
m.TopicName = "/popub1"
m.Payload = []byte{0xBB, 0x00}
m.MessageID = 41
persistOutbound(ts, m)
if len(ts.mput) != 1 || ts.mput[0] != 41 {
t.Fatalf("persistOutbound put message it should not have")
}
if len(ts.mget) != 0 {
t.Fatalf("persistOutbound get message it should not have")
}
if len(ts.mdel) != 0 {
t.Fatalf("persistOutbound del message it should not have")
}
}
func Test_persistOutbound_publish_2(t *testing.T) {
ts := &TestStore{}
m := packets.NewControlPacket(packets.Publish).(*packets.PublishPacket)
m.Qos = 2
m.TopicName = "/popub2"
m.Payload = []byte{0xBB, 0x00}
m.MessageID = 42
persistOutbound(ts, m)
if len(ts.mput) != 1 || ts.mput[0] != 42 {
t.Fatalf("persistOutbound put message it should not have")
}
if len(ts.mget) != 0 {
t.Fatalf("persistOutbound get message it should not have")
}
if len(ts.mdel) != 0 {
t.Fatalf("persistOutbound del message it should not have")
}
}
func Test_persistOutbound_puback(t *testing.T) {
ts := &TestStore{}
m := packets.NewControlPacket(packets.Puback).(*packets.PubackPacket)
persistOutbound(ts, m)
if len(ts.mput) != 0 {
t.Fatalf("persistOutbound put message it should not have")
}
if len(ts.mget) != 0 {
t.Fatalf("persistOutbound get message it should not have")
}
if len(ts.mdel) != 1 {
t.Fatalf("persistOutbound del message it should not have")
}
}
func Test_persistOutbound_pubrec(t *testing.T) {
ts := &TestStore{}
m := packets.NewControlPacket(packets.Pubrec).(*packets.PubrecPacket)
persistOutbound(ts, m)
if len(ts.mput) != 0 {
t.Fatalf("persistOutbound put message it should not have")
}
if len(ts.mget) != 0 {
t.Fatalf("persistOutbound get message it should not have")
}
if len(ts.mdel) != 0 {
t.Fatalf("persistOutbound del message it should not have")
}
}
func Test_persistOutbound_pubrel(t *testing.T) {
ts := &TestStore{}
m := packets.NewControlPacket(packets.Pubrel).(*packets.PubrelPacket)
m.MessageID = 43
persistOutbound(ts, m)
if len(ts.mput) != 1 || ts.mput[0] != 43 {
t.Fatalf("persistOutbound put message it should not have")
}
if len(ts.mget) != 0 {
t.Fatalf("persistOutbound get message it should not have")
}
if len(ts.mdel) != 0 {
t.Fatalf("persistOutbound del message it should not have")
}
}
func Test_persistOutbound_pubcomp(t *testing.T) {
ts := &TestStore{}
m := packets.NewControlPacket(packets.Pubcomp).(*packets.PubcompPacket)
persistOutbound(ts, m)
if len(ts.mput) != 0 {
t.Fatalf("persistOutbound put message it should not have")
}
if len(ts.mget) != 0 {
t.Fatalf("persistOutbound get message it should not have")
}
if len(ts.mdel) != 1 {
t.Fatalf("persistOutbound del message it should not have")
}
}
func Test_persistOutbound_subscribe(t *testing.T) {
ts := &TestStore{}
m := packets.NewControlPacket(packets.Subscribe).(*packets.SubscribePacket)
m.Topics = []string{"/posub"}
m.Qoss = []byte{1}
m.MessageID = 44
persistOutbound(ts, m)
if len(ts.mput) != 1 || ts.mput[0] != 44 {
t.Fatalf("persistOutbound put message it should not have")
}
if len(ts.mget) != 0 {
t.Fatalf("persistOutbound get message it should not have")
}
if len(ts.mdel) != 0 {
t.Fatalf("persistOutbound del message it should not have")
}
}
func Test_persistOutbound_unsubscribe(t *testing.T) {
ts := &TestStore{}
m := packets.NewControlPacket(packets.Unsubscribe).(*packets.UnsubscribePacket)
m.Topics = []string{"/posub"}
m.MessageID = 45
persistOutbound(ts, m)
if len(ts.mput) != 1 || ts.mput[0] != 45 {
t.Fatalf("persistOutbound put message it should not have")
}
if len(ts.mget) != 0 {
t.Fatalf("persistOutbound get message it should not have")
}
if len(ts.mdel) != 0 {
t.Fatalf("persistOutbound del message it should not have")
}
}
func Test_persistOutbound_pingreq(t *testing.T) {
ts := &TestStore{}
m := packets.NewControlPacket(packets.Pingreq)
persistOutbound(ts, m)
if len(ts.mput) != 0 {
t.Fatalf("persistOutbound put message it should not have")
}
if len(ts.mget) != 0 {
t.Fatalf("persistOutbound get message it should not have")
}
if len(ts.mdel) != 0 {
t.Fatalf("persistOutbound del message it should not have")
}
}
func Test_persistOutbound_disconnect(t *testing.T) {
ts := &TestStore{}
m := packets.NewControlPacket(packets.Disconnect)
persistOutbound(ts, m)
if len(ts.mput) != 0 {
t.Fatalf("persistOutbound put message it should not have")
}
if len(ts.mget) != 0 {
t.Fatalf("persistOutbound get message it should not have")
}
if len(ts.mdel) != 0 {
t.Fatalf("persistOutbound del message it should not have")
}
}
/************************
**** persistInbound ****
************************/
func Test_persistInbound_connack(t *testing.T) {
ts := &TestStore{}
m := packets.NewControlPacket(packets.Connack)
persistInbound(ts, m)
if len(ts.mput) != 0 {
t.Fatalf("persistInbound in bad state")
}
if len(ts.mget) != 0 {
t.Fatalf("persistInbound in bad state")
}
if len(ts.mdel) != 0 {
t.Fatalf("persistInbound in bad state")
}
}
func Test_persistInbound_publish_0(t *testing.T) {
ts := &TestStore{}
m := packets.NewControlPacket(packets.Publish).(*packets.PublishPacket)
m.Qos = 0
m.TopicName = "/pipub0"
m.Payload = []byte{0xCC, 0x01}
m.MessageID = 50
persistInbound(ts, m)
if len(ts.mput) != 0 {
t.Fatalf("persistInbound in bad state")
}
if len(ts.mget) != 0 {
t.Fatalf("persistInbound in bad state")
}
if len(ts.mdel) != 0 {
t.Fatalf("persistInbound in bad state")
}
}
func Test_persistInbound_publish_1(t *testing.T) {
ts := &TestStore{}
m := packets.NewControlPacket(packets.Publish).(*packets.PublishPacket)
m.Qos = 1
m.TopicName = "/pipub1"
m.Payload = []byte{0xCC, 0x02}
m.MessageID = 51
persistInbound(ts, m)
if len(ts.mput) != 1 || ts.mput[0] != 51 {
t.Fatalf("persistInbound in bad state")
}
if len(ts.mget) != 0 {
t.Fatalf("persistInbound in bad state")
}
if len(ts.mdel) != 0 {
t.Fatalf("persistInbound in bad state")
}
}
func Test_persistInbound_publish_2(t *testing.T) {
ts := &TestStore{}
m := packets.NewControlPacket(packets.Publish).(*packets.PublishPacket)
m.Qos = 2
m.TopicName = "/pipub2"
m.Payload = []byte{0xCC, 0x03}
m.MessageID = 52
persistInbound(ts, m)
if len(ts.mput) != 1 || ts.mput[0] != 52 {
t.Fatalf("persistInbound in bad state")
}
if len(ts.mget) != 0 {
t.Fatalf("persistInbound in bad state")
}
if len(ts.mdel) != 0 {
t.Fatalf("persistInbound in bad state")
}
}
func Test_persistInbound_puback(t *testing.T) {
ts := &TestStore{}
pub := packets.NewControlPacket(packets.Publish).(*packets.PublishPacket)
pub.Qos = 1
pub.TopicName = "/pub1"
pub.Payload = []byte{0xCC, 0x04}
pub.MessageID = 53
publishKey := inboundKeyFromMID(pub.MessageID)
ts.Put(publishKey, pub)
m := packets.NewControlPacket(packets.Puback).(*packets.PubackPacket)
m.MessageID = 53
persistInbound(ts, m) // "deletes" packets.Publish from store
if len(ts.mput) != 1 { // not actually deleted in TestStore
t.Fatalf("persistInbound in bad state")
}
if len(ts.mget) != 0 {
t.Fatalf("persistInbound in bad state")
}
if len(ts.mdel) != 1 || ts.mdel[0] != 53 {
t.Fatalf("persistInbound in bad state")
}
}
func Test_persistInbound_pubrec(t *testing.T) {
ts := &TestStore{}
pub := packets.NewControlPacket(packets.Publish).(*packets.PublishPacket)
pub.Qos = 2
pub.TopicName = "/pub2"
pub.Payload = []byte{0xCC, 0x05}
pub.MessageID = 54
publishKey := inboundKeyFromMID(pub.MessageID)
ts.Put(publishKey, pub)
m := packets.NewControlPacket(packets.Pubrec).(*packets.PubrecPacket)
m.MessageID = 54
persistInbound(ts, m)
if len(ts.mput) != 1 || ts.mput[0] != 54 {
t.Fatalf("persistInbound in bad state")
}
if len(ts.mget) != 0 {
t.Fatalf("persistInbound in bad state")
}
if len(ts.mdel) != 0 {
t.Fatalf("persistInbound in bad state")
}
}
func Test_persistInbound_pubrel(t *testing.T) {
ts := &TestStore{}
pub := packets.NewControlPacket(packets.Publish).(*packets.PublishPacket)
pub.Qos = 2
pub.TopicName = "/pub2"
pub.Payload = []byte{0xCC, 0x06}
pub.MessageID = 55
publishKey := inboundKeyFromMID(pub.MessageID)
ts.Put(publishKey, pub)
m := packets.NewControlPacket(packets.Pubrel).(*packets.PubrelPacket)
m.MessageID = 55
persistInbound(ts, m) // will overwrite publish
if len(ts.mput) != 2 {
t.Fatalf("persistInbound in bad state")
}
if len(ts.mget) != 0 {
t.Fatalf("persistInbound in bad state")
}
if len(ts.mdel) != 0 {
t.Fatalf("persistInbound in bad state")
}
}
func Test_persistInbound_pubcomp(t *testing.T) {
ts := &TestStore{}
m := packets.NewControlPacket(packets.Pubcomp).(*packets.PubcompPacket)
m.MessageID = 56
persistInbound(ts, m)
if len(ts.mput) != 0 {
t.Fatalf("persistInbound in bad state")
}
if len(ts.mget) != 0 {
t.Fatalf("persistInbound in bad state")
}
if len(ts.mdel) != 1 || ts.mdel[0] != 56 {
t.Fatalf("persistInbound in bad state")
}
}
func Test_persistInbound_suback(t *testing.T) {
ts := &TestStore{}
m := packets.NewControlPacket(packets.Suback).(*packets.SubackPacket)
m.MessageID = 57
persistInbound(ts, m)
if len(ts.mput) != 0 {
t.Fatalf("persistInbound in bad state")
}
if len(ts.mget) != 0 {
t.Fatalf("persistInbound in bad state")
}
if len(ts.mdel) != 1 || ts.mdel[0] != 57 {
t.Fatalf("persistInbound in bad state")
}
}
func Test_persistInbound_unsuback(t *testing.T) {
ts := &TestStore{}
m := packets.NewControlPacket(packets.Unsuback).(*packets.UnsubackPacket)
m.MessageID = 58
persistInbound(ts, m)
if len(ts.mput) != 0 {
t.Fatalf("persistInbound in bad state")
}
if len(ts.mget) != 0 {
t.Fatalf("persistInbound in bad state")
}
if len(ts.mdel) != 1 || ts.mdel[0] != 58 {
t.Fatalf("persistInbound in bad state")
}
}
func Test_persistInbound_pingresp(t *testing.T) {
ts := &TestStore{}
m := packets.NewControlPacket(packets.Pingresp)
persistInbound(ts, m)
if len(ts.mput) != 0 {
t.Fatalf("persistInbound in bad state")
}
if len(ts.mget) != 0 {
t.Fatalf("persistInbound in bad state")
}
if len(ts.mdel) != 0 {
t.Fatalf("persistInbound in bad state")
}
}
/***********
* restore *
***********/
func ensureRestoreDir() {
if exists("/tmp/restore") {
rerr := os.RemoveAll("/tmp/restore")
chkerr(rerr)
}
os.Mkdir("/tmp/restore", 0766)
}
func writeToRestore(fname, content string) {
f, cerr := os.Create("/tmp/restore/" + fname)
chkerr(cerr)
chkcond(f != nil)
w := bufio.NewWriter(f)
w.Write([]byte(content))
w.Flush()
f.Close()
}
func verifyFromRestore(fname, content string, t *testing.T) {
msg, oerr := os.Open("/tmp/restore/" + fname)
chkerr(oerr)
all, rerr := ioutil.ReadAll(msg)
chkerr(rerr)
msg.Close()
s := string(all)
if s != content {
t.Fatalf("verify content expected `%s` but got `%s`", content, s)
}
}
func Test_restore_1(t *testing.T) {
ensureRestoreDir()
writeToRestore("i.1.bkp", "this is critical 1")
restore("/tmp/restore")
chkcond(!exists("/tmp/restore/i.1.bkp"))
chkcond(exists("/tmp/restore/i.1.msg"))
verifyFromRestore("i.1.msg", "this is critical 1", t)
}
func Test_restore_2(t *testing.T) {
ensureRestoreDir()
writeToRestore("o.2.msg", "this is critical 2")
restore("/tmp/restore")
chkcond(!exists("/tmp/restore/o.2.bkp"))
chkcond(exists("/tmp/restore/o.2.msg"))
verifyFromRestore("o.2.msg", "this is critical 2", t)
}
func Test_restore_3(t *testing.T) {
ensureRestoreDir()
N := 20
// evens are .msg
// odds are .bkp
for i := 0; i < N; i++ {
content := fmt.Sprintf("foo %d bar", i)
if i%2 == 0 {
mname := fmt.Sprintf("i.%d.msg", i)
writeToRestore(mname, content)
} else {
mname := fmt.Sprintf("i.%d.bkp", i)
writeToRestore(mname, content)
}
}
restore("/tmp/restore")
for i := 0; i < N; i++ {
mname := fmt.Sprintf("i.%d.msg", i)
bname := fmt.Sprintf("i.%d.bkp", i)
content := fmt.Sprintf("foo %d bar", i)
chkcond(!exists("/tmp/restore/" + bname))
chkcond(exists("/tmp/restore/" + mname))
verifyFromRestore(mname, content, t)
}
}

View File

@ -1,47 +0,0 @@
/*
* Copyright (c) 2013 IBM Corp.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Seth Hoenig
* Allan Stockdill-Mander
* Mike Robertson
*/
package mqtt
import (
"testing"
)
func Test_ValidateTopicAndQos_qos3(t *testing.T) {
e := validateTopicAndQos("a", 3)
if e != ErrInvalidQos {
t.Fatalf("invalid error for invalid qos")
}
}
func Test_ValidateTopicAndQos_ES(t *testing.T) {
e := validateTopicAndQos("", 0)
if e != ErrInvalidTopicEmptyString {
t.Fatalf("invalid error for empty topic name")
}
}
func Test_ValidateTopicAndQos_a_0(t *testing.T) {
e := validateTopicAndQos("a", 0)
if e != nil {
t.Fatalf("error from valid NewTopicFilter")
}
}
func Test_ValidateTopicAndQos_H(t *testing.T) {
e := validateTopicAndQos("a/#/c", 0)
if e != ErrInvalidTopicMultilevel {
t.Fatalf("invalid error for bad multilevel topic filter")
}
}

View File

@ -1,24 +0,0 @@
# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
*.a
*.so
*.test
# Folders
_obj
_test
.vagrant
# Architecture specific extensions/prefixes
*.[568vq]
[568vq].out
*.cgo1.go
*.cgo2.c
_cgo_defun.c
_cgo_gotypes.go
_cgo_export.*
_testmain.go
*.exe

View File

@ -1,41 +0,0 @@
language: go
go:
- 1.3.3
- 1.4.2
env:
global:
- KAFKA_PEERS=localhost:9091,localhost:9092,localhost:9093,localhost:9094,localhost:9095
- TOXIPROXY_ADDR=http://localhost:8474
- KAFKA_INSTALL_ROOT=/home/travis/kafka
- KAFKA_HOSTNAME=localhost
- DEBUG=true
matrix:
- KAFKA_VERSION=0.8.1.1
- KAFKA_VERSION=0.8.2.1
before_install:
- export REPOSITORY_ROOT=${TRAVIS_BUILD_DIR}
- vagrant/install_cluster.sh
- vagrant/boot_cluster.sh
- vagrant/create_topics.sh
install:
- make install_dependencies
script:
- make test
- make vet
- make errcheck
- make fmt
matrix:
include:
- go: tip
env: KAFKA_VERSION=0.8.2.1
allow_failures:
- go: tip
fast_finish: true
sudo: false

Some files were not shown because too many files have changed in this diff Show More