text:
title: Telegraf input plugins
description: Telegraf input plugins are used with the InfluxData time series platform to collect metrics from the system, services, or third party APIs.
menu:
  telegraf_1_7:
    name: Input
    weight: 10
    parent: Plugins
---

Telegraf input plugins are used with the InfluxData time series platform to collect metrics from the system, services, or third party APIs. All metrics are gathered from the inputs you [enable and configure in the configuration file](/telegraf/v1.7/administration/configuration/).

> ***Note:*** Telegraf plugins added in the current release are noted with ` -- NEW in v1.7`.
>The [Release Notes/Changelog](/telegraf/v1.7/about_the_project/release-notes-changelog) has a list of new plugins and updates for other plugins. See the plugin README files for more details.

## Usage instructions

View usage instructions for each service input by running `telegraf --usage <service-input-name>`.

## Supported Telegraf input plugins

### [Aerospike (`aerospike`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/aerospike)

The [Aerospike (`aerospike`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/aerospike) queries Aerospike servers and gets node statistics and  statistics for all configured namespaces.

### [AMQP Consumer (`amqp_consumer`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/amqp_consumer)

The [AMQP Consumer (`amqp_consumer`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/amqp_consumer) provides a consumer for use with AMQP 0-9-1, a prominent implementation of this protocol
being RabbitMQ.

### [Apache (`apache`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/apache)

The [Apache (`apache`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/apache) collects server performance information using the `mod_status` module of the Apache HTTP Server.

Typically, the `mod_status` module is configured to expose a page at the `/server-status?auto` location of the Apache
server. The [ExtendedStatus](https://httpd.apache.org/docs/2.4/mod/core.html#extendedstatus) option must be enabled in order
to collect all available fields. For information about how to configure your server reference the
[module documenation](https://httpd.apache.org/docs/2.4/mod/mod_status.html#enable).

### [Aurora (`aurora`)](https://github.com/influxdata/telegraf/blob/master/plugins/inputs/aurora) -- NEW in v.1.7

The [Aurora input plugin](https://github.com/influxdata/telegraf/blob/master/plugins/inputs/aurora) gathers metrics from [Apache Aurora](https://aurora.apache.org/) schedulers. For monitoring recommendations, see [Monitoring your Aurora cluster](https://aurora.apache.org/documentation/latest/operations/monitoring/).

### [Bcache (`bcache`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/bcache)

The [Bcache (`bcache`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/bcache) gets bcache statistics from the `stats_total` directory and `dirty_data` file.

### [Bond (`bond`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/bond)

The [Bond (`bond`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/bond) collects network bond interface status, bond's slaves interfaces status and failures count of
bond's slaves interfaces. The plugin collects these metrics from `/proc/net/bonding/*` files.

### [Burrow (`burrow`)](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/burrow) -- NEW in v.1.7

The [Burrow (`burrow` input plugin)](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/burrow) collects Apache Kafka topic, consumer, and partition status using the [Burrow](https://github.com/linkedin/Burrow) HTTP [HTTP Endpoint](https://github.com/linkedin/Burrow/wiki/HTTP-Endpoint).

### [Ceph Storage (`ceph`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/ceph)

The [Ceph Storage (`ceph`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/ceph) collects performance metrics from the MON and OSD nodes in a Ceph storage cluster.

### [CGroup (`cgroup`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/cgroup)

The [CGroup (`cgroup`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/cgroup) captures specific statistics per cgroup.

### [Chrony (`chrony`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/chrony)

The [Chrony (`chrony`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/chrony) gets standard chrony metrics, requires chronyc executable.

### [CloudWatch (`cloudwatch`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/cloudwatch)

The [CloudWatch (`cloudwatch`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/cloudwatch) pulls metric statistics from Amazon CloudWatch.

### [Conntrack (`conntrack`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/conntrack)

The [Conntrack (`conntrack`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/conntrack) collects stats from Netfilter's conntrack-tools.

The conntrack-tools provide a mechanism for tracking various aspects of network connections as they are processed by
netfilter. At runtime, conntrack exposes many of those connection statistics within `/proc/sys/net`. Depending on your
kernel version, these files can be found in either `/proc/sys/net/ipv4/netfilter` or `/proc/sys/net/netfilter` and will be
prefixed with either `ip_` or `nf_`. This plugin reads the files specified in its configuration and publishes each one as
a field, with the prefix normalized to `ip_`.

### [Consul (`consul`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/consul)

The [Consul (`consul`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/consul) will collect statistics about all health checks registered in the Consul.
It uses Consul API to query the data.
It will not report the telemetry but Consul can report those stats already using StatsD protocol, if needed.

### [Couchbase (`couchbase`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/couchbase)

The [Couchbase (`couchbase`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/couchbase) reads per-node and per-bucket metrics from Couchbase.

### [CouchDB (`couchdb`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/couchdb)

The [CouchDB (`couchdb`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/couchdb) gathers metrics of CouchDB using `_stats` endpoint.

### [CPU (`cpu`)](https://github.com/influxdata/telegraf/blob/release-1.7/plugins/inputs/system/CPU_README.md)

The [CPU (`cpu`) input plugin](https://github.com/influxdata/telegraf/blob/release-1.7/plugins/inputs/system/CPU_README.md) gathers metrics about cpu usage.

### [Mesosphere DC/OS (`dcos`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/dcos)

The [Mesosphere DC/OS (`dcos`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/dcos) gathers metrics from a DC/OS cluster's [metrics component](https://docs.mesosphere.com/1.10/metrics/).

### [Disk (`disk`)](hhttps://github.com/influxdata/telegraf/blob/release-1.7/plugins/inputs/system/DISK_README.md)

The [Disk (`disk`) input plugin](hhttps://github.com/influxdata/telegraf/blob/release-1.7/plugins/inputs/system/DISK_README.md) gathers metrics about disk usage by mount point.

### [DiskIO (`diskio`)](https://github.com/influxdata/telegraf/blob/release-1.7/plugins/inputs/system/DISKIO_README.md)

The [DiskIO (`diskio`) input plugin](https://github.com/influxdata/telegraf/blob/release-1.7/plugins/inputs/system/DISKIO_README.md) gathers metrics about disk IO by device.

### [Disque (`disque`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/disque)

The [Disque (`disque`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/disque) gathers metrics from one or more [Disque](https://github.com/antirez/disque) servers.

### [DMCache (`dmcache`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/dmcache)

The [DMCache (`dmcache`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/dmcache) provides a native collection for dmsetup-based statistics for dm-cache.

### [DNS query time (`dns_query_time`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/dns_query)

The [DNS query time (`dns_query_time`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/dns_query) gathers dns query times in milliseconds - like [Dig](https://en.wikipedia.org/wiki/Dig_(command)).

### [Docker (`docker`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/docker)

The [Docker (`docker`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/docker) uses the Docker Engine API to gather metrics on running Docker containers. The Docker plugin
uses the [Official Docker Client](https://github.com/moby/moby/tree/master/client) to gather stats from the
[Engine API](https://docs.docker.com/engine/api/v1.20/) library documentation.

### [Dovecot (`dovecot`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/dovecot)

The [Dovecot (`dovecot`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/dovecot) uses the dovecot Stats protocol to gather metrics on configured domains. For more information,
see the [Dovecot documentation](http://wiki2.dovecot.org/Statistics).

### [Elasticsearch (`elasticsearch`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/elasticsearch)

The [Elasticsearch (`elasticsearch`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/elasticsearch) queries endpoints to obtain [node](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html)
and optionally [cluster-health](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-health.html)
or [cluster-stats](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-stats.html) metrics.

### [Exec (`exec`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/exec)

The [Exec (`exec`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/exec) parses supported [Telegraf input data formats](https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md) (InfluxDB Line Protocol, JSON, Graphite, Value, Nagios, Collectd, and Dropwizard into metrics. Each Telegraf metric includes the measurement name, tags, fields, and timesamp. See [Telegraf input data formats](https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md) for details on the supported data formats.

### [Fail2ban (`fail2ban`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/fail2ban)

The [Fail2ban (`fail2ban`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/fail2ban) gathers the count of failed and banned ip addresses using [fail2ban](https://www.fail2ban.org/).

### [Fibaro (`fibaro`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/fibaro) -- NEW in v.1.7

The [Fibaro (`fibaro`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/fibaro) makes HTTP calls to the Fibaro controller API to gather values of hooked devices. Those values could be true (`1`) or false (`0`) for switches, percentage for dimmers, temperature, etc.

### [Filestat (`filestat`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/filestat)

The [Filestat (`filestat`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/filestat) gathers metrics about file existence, size, and other stats.

### [Fluentd (`fluentd`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/fluentd)

The [Fluentd (`fluentd`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/fluentd) gathers metrics from plugin endpoint provided by in_monitor plugin. This plugin understands
data provided by `/api/plugin.json` resource (`/api/config.json` is not covered).

### [Graylog (`graylog`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/graylog)

The [Graylog (`graylog`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/graylog) can collect data from remote Graylog service URLs. This plugin currently supports two
types of endpoints:

* multiple (e.g., `http://[graylog-server-ip]:12900/system/metrics/multiple`)
* namespace (e.g., `http://[graylog-server-ip]:12900/system/metrics/namespace/{namespace}`)

### [HAproxy (`haproxy`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/haproxy)

The [HAproxy (`haproxy`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/haproxy) gathers metrics directly from any running HAproxy instance. It can do so by using CSV
generated by HAproxy status page or from admin sockets.

### [Hddtemp (`hddtemp`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/hddtemp)

The [Hddtemp (`hddtemp`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/hddtemp) reads data from `hddtemp` daemons.

### [HTTP (`http`)](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/http)

The [HTTP (`http`) input plugin](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/http) collects metrics from one or more HTTP (or HTTPS) endpoints. The endpoint should have metrics formatted in one of the supported input data formats. Each data format has its own unique set of configuration options which can be added to the input configuration.

### [HTTP Listener (`http_listener`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/http_listener)

The [HTTP Listener (`http_listener`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/http_listener) listens for messages sent via HTTP POST. Messages are expected in the InfluxDB
line protocol format ONLY (other Telegraf input data formats are not supported). The plugin allows Telegraf to serve
as a proxy/router for the `/write` endpoint of the InfluxDB HTTP API.

### [HTTP Response (`http_response`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/http_response)

The [HTTP Response (`http_response`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/http_response) gathers metrics for HTTP responses. The measurements and fields include `response_time`, `http_response_code`, and `result_type`. Tags for measurements include `server` and `method`.

### [InfluxDB v1.x (`influxdb`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/influxdb)

The [InfluxDB v1.x (`influxdb`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/influxdb) gathers metrics from the exposed InfluxDB v1.x `/debug/vars` endpoint.  Using Telegraf to extract these metrics to create a "monitor of monitors" is a best practice and allows you to reduce the overhead associated with
capturing and storing these metrics locally within the `_internal` database for production deployments.
[Read more about this approach here.](https://www.influxdata.com/blog/influxdb-debugvars-endpoint/)

### [Interrupts (`interrupts`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/interrupts)

The [Interrupts (`interrupts`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/interrupts) gathers metrics about IRQs, including `interrupts` (from `/proc/interrupts`) and `soft_interrupts` (from `/proc/softirqs`).

### [IPMI Sensor (`ipmi_sensor`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/ipmi_sensor)

The [IPMI Sensor (`ipmi_sensor`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/ipmi_sensor) queries the local machine or remote host sensor statistics using the `ipmitool` utility.

### [ipset (`ipset`)](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/ipset)

The [Ipset (`ipset`) input plugin](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/ipset) gathers packets and bytes counters from Linux `ipset`. It uses the output of the command `ipset save`. Ipsets created without the `counters` option are ignored.

### [IPtables (`iptables`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/iptables)

The [IPtables (`iptables`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/iptables) gathers packets and bytes counters for rules within a set of table and chain from the Linux's iptables firewall.

### [Jolokia2 Agent (`jolokia2_agent`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/jolokia2/README.md)

The [Jolokia2 Agent (`jolokia2_agent`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/jolokia2/README.md) reads JMX metrics from one or more [Jolokia](https://jolokia.org/) agent REST endpoints using the
 [JSON-over-HTTP protocol](https://jolokia.org/reference/html/protocol.html).

### [Jolokia2 Proxy (`jolokia2_proxy`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/jolokia2/README.md)

The [Jolokia2 Proxy (`jolokia2_proxy`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/jolokia2/README.md) reads JMX metrics from one or more targets by interacting with a [Jolokia](https://jolokia.org/) proxy REST endpoint using the [Jolokia](https://jolokia.org/) [JSON-over-HTTP protocol](https://jolokia.org/reference/html/protocol.html).

### [JTI OpenConfig Telemetry](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/jti_openconfig_telemetry) -- NEW in v.1.7

The [JTI OpenConfig Telemetry (`jti_openconfig_telemetry`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/jti_openconfig_telemetry) reads Juniper Networks implementation of OpenConfig telemetry data from listed sensors using the Junos Telemetry Interface. Refer to
[openconfig.net](http://openconfig.net/) for more details about OpenConfig and [Junos Telemetry Interface (JTI)](https://www.juniper.net/documentation/en_US/junos/topics/concept/junos-telemetry-interface-oveview.html).

### [Kafka Consumer (`kafka_consumer`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/kafka_consumer)

The [Kafka Consumer (`kafka_consumer`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/kafka_consumer) polls a specified Kafka topic and adds messages to InfluxDB.
Messages are expected in the line protocol format.
[Consumer Group](http://godoc.org/github.com/wvanbergen/kafka/consumergroup) is used to talk to the Kafka cluster so
multiple instances of Telegraf can read from the same topic in parallel.

### [Kapacitor (`kapacitor`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/kapacitor)

The [Kapacitor (`kapacitor`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/kapacitor) will collect metrics from the given Kapacitor instances.

### [Kernel (`kernel`)](https://github.com/influxdata/telegraf/blob/release-1.7/plugins/inputs/system/KERNEL_README.md)

The [Kernel (`kernel`) input plugin](https://github.com/influxdata/telegraf/blob/release-1.7/plugins/inputs/system/KERNEL_README.md) gathers kernel statistics from `/proc/stat`.

### [Kernel VMStat (`kernel_vmstat`)](https://github.com/influxdata/telegraf/blob/release-1.7/plugins/inputs/system/KERNEL_VMSTAT_README.md)

The [Kernel VMStat input plugin](https://github.com/influxdata/telegraf/blob/release-1.7/plugins/inputs/system/KERNEL_VMSTAT_README.md) gathers kernel statistics from `/proc/vmstat`.

### [Kubernetes (`kubernetes`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/kubernetes)

>***Note:*** The Kubernetes input plugin is experimental and may cause high cardinality issues with moderate to
large Kubernetes deployments.

The [Kubernetes (`kubernetes`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/kubernetes) talks to the kubelet API using the `/stats/summary` endpoint to gather metrics about the running pods
and containers for a single host. It is assumed that this plugin is running as part of a daemonset within a
Kubernetes installation. This means that Telegraf is running on every node within the cluster. Therefore, you
should configure this plugin to talk to its locally running kubelet.

### [LeoFS (`leofs`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/leofs) -- NEW in v.1.7

The [LeoFS (`leofs`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/leofs) gathers metrics of LeoGateway, LeoManager, and LeoStorage using SNMP. See [System monitoring](https://leo-project.net/leofs/docs/admin/system_admin/monitoring/) in the [LeoFS documentation](https://leo-project.net/leofs/docs/) for more information.

### [Linux Sysctl FS (`linux_sysctl_fs`)](https://github.com/influxdata/telegraf/blob/release-1.7/plugins/inputs/system/LINUX_SYSCTL_FS_README.md)

The [Linux Sysctl FS input plugin](https://github.com/influxdata/telegraf/blob/release-1.7/plugins/inputs/system/LINUX_SYSCTL_FS_README.md) provides Linux system level file (`sysctl fs`) metrics. The documentation on these fields can be found at https://www.kernel.org/doc/Documentation/sysctl/fs.txt.

### [Logparser (`logparser`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/logparser)

The [Logparser (`logparser`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/logparser) streams and parses the given log files. Currently, it has the capability of parsing "grok" patterns
from log files, which also supports regular expression (regex) patterns.

### [Lustre2 (`lustre2`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/lustre2)

Lustre Jobstats allows for RPCs to be tagged with a value, such as a job's ID.  This allows for per job statistics.
The [Lustre2 (`lustre2`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/lustre2) collects statistics and tags the data with the `jobid`.

### [Mailchimp (`mailchimp`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/mailchimp)

The [Mailchimp (`mailchimp`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/mailchimp) gathers metrics from the `/3.0/reports` MailChimp API.

### [Mcrouter (`mcrouter`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/mcrouter) -- NEW in v.1.7

The [mcrouter (`mcrouter`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/mcrouter) gathers statistics data from a mcrouter instance. [Mcrouter](https://github.com/facebook/mcrouter) is a memcached protocol router, developed and maintained by Facebook, for scaling memcached (http://memcached.org/) deployments. It's a core component of cache infrastructure at Facebook and Instagram where mcrouter handles almost 5 billion requests per second at peak.

### [Mem (`mem`)](https://github.com/influxdata/telegraf/blob/release-1.7/plugins/inputs/system/MEM_README.md)

The [Mem (`mem`) input plugin](https://github.com/influxdata/telegraf/blob/release-1.7/plugins/inputs/system/MEM_README.md) collects system memory metrics. For a more complete explanation of the difference between used and actual_used RAM, see [Linux ate my ram](https://www.linuxatemyram.com/).

### [Memcached (`memcached`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/memcached)

The [Memcached (`memcached`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/memcached) gathers statistics data from a Memcached server.

### [Mesos (`mesos`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/mesos)

The [Mesos (`mesos`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/mesos) gathers metrics from Mesos. For more information, please check the
[Mesos Observability Metrics](http://mesos.apache.org/documentation/latest/monitoring/) page.

### [Minecraft (`minecraft`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/minecraft)

The [Minecraft (`minecraft`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/minecraft) uses the RCON protocol to collect statistics from a scoreboard on a Minecraft server.

### [MongoDB (`mongodb`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/mongodb)

The [MongoDB (`mongodb`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/mongodb) collects mongodb stats exposed by serverStatus and few more and create a single
measurement containing values.

### [MQTT Consumer (`mqtt_consumer`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/mqtt_consumer)

The [MQTT Consumer (`mqtt_consumer`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/mqtt_consumer) reads from specified MQTT topics and adds messages to InfluxDB. Messages are in the
Telegraf Input Data Formats.

### [MySQL `(mysql`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/mysql)

The [MySQL (`mysql`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/mysql) gathers the statistics data from MySQL servers.

### [NATS Server Monitoring (`nats`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/nats)

The [NATS Server Monitoring (`nats`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/nats) gathers metrics when using the [NATS Server monitoring server](https://www.nats.io/documentation/server/gnatsd-monitoring/).

### [NATS Consumer (`nats_consumer`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/nats_consumer)

The [NATS Consumer (`nats_consumer`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/nats_consumer) reads from specified NATS subjects and adds messages to InfluxDB. Messages are expected in the Telegraf Input Data Formats. A Queue Group is used when subscribing to subjects so multiple instances of Telegraf can read from a NATS cluster in parallel.

### [Net (`net`)](https://github.com/influxdata/telegraf/blob/release-1.7/plugins/inputs/system/NET_README.md)

The [Net (`net`) input plugin](https://github.com/influxdata/telegraf/blob/release-1.7/plugins/inputs/system/NET_README.md) gathers metrics about network interface usage (Linux only).

### [Network Response (`net_response`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/net_response)

The [Network Response (`net_response`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/net_response) tests UDP and TCP connection response time. It can also check response text.

### [Netstat (`netstat`)](https://github.com/influxdata/telegraf/blob/release-1.7/plugins/inputs/system/NETSTAT_README.md)

The [Netstat (`netstat`) input plugin](https://github.com/influxdata/telegraf/blob/release-1.7/plugins/inputs/system/NETSTAT_README.md) gathers TCP metrics such as established, time-wait and sockets counts by using `lsof`.

### [NGINX (`nginx`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/nginx)

The [NGINX (nginx) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/nginx) reads NGINX basic status information (`ngx_http_stub_status_module`).

### [NGINX Plus (`nginx_plus`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/nginx_plus/README.md)

The [NGINX Plus (`nginx_plus`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/nginx_plus/README.md) is for NGINX Plus, the commercial version of the open source web server NGINX. To use this plugin you will need a license.
For more information, see [What's the Difference between Open Source NGINX and NGINX Plus?](https://www.nginx.com/blog/whats-difference-nginx-foss-nginx-plus/).

Structures for NGINX Plus have been built based on history of [status module documentation](http://nginx.org/en/docs/http/ngx_http_status_module.html).

### [NSQ (`nsq`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/nsq)

### [NSQ Consumer (`nsq_consumer`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/nsq_consumer)

The [NSQ Consumer (`nsq_consumer`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/nsq_consumer) polls a specified NSQD topic and adds messages to InfluxDB. This plugin allows a message to be in any of the supported data_format types.

### [Nstat (`nstat`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/nstat)

The [Nstat (`nstat`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/nstat) collects network metrics from `/proc/net/netstat`, `/proc/net/snmp`, and `/proc/net/snmp6` files.

### [NTPq (`ntpq`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/ntpq)

The [NTPq (`ntpq`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/ntpq) gets standard NTP query metrics, requires ntpq executable.

### [NVIDIA SMI (`nvidia-smi`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/nvidia_smi) -- NEW in v.1.7

The [NVIDIA SMI (`nvidia-smi`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/nvidia_smi) uses a query on the [NVIDIA System Management Interface (`nvidia-smi`)](https://developer.nvidia.com/nvidia-system-management-interface) binary to pull GPU stats including memory and GPU usage, temp and other.

### [OpenLDAP (`openldap`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/openldap)

The [OpenLDAP (`openldap`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/openldap) gathers metrics from OpenLDAP's `cn=Monitor` backend.

### [OpenSMTPD (`opensmtpd`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/opensmtpd/README.md)

The [OpenSMTPD (`opensmtpd`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/opensmtpd/README.md) gathers stats from OpenSMTPD, a free implementation of the server-side SMTP protocol.

### [Particle.io Webhooks (`particle`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/webhooks/particle/README.md)

The [Particle.io Webhooks (`particle`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/webhooks/particle/README.md) enables [Particle webhooks](https://docs.particle.io/guide/tools-and-features/webhooks/) to gather Particle device data which gets routed through the Particle Device Cloud into InfluxDB. For more information on the Particle webhook integration, see [InfluxData Integration](https://docs.particle.io/tutorials/integrations/influxdata/).

### [Passenger (`passenger`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/passenger)

The [Passenger (`passenger`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/passenger) gets phusion passenger statistics using their command line utility `passenger-status`.

### [PF (`pf`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/pf/README.md)

The [PF (`pf`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/pf/README.md) gathers information from the FreeBSD/OpenBSD pf firewall. Currently it can retrive information about
the state table: the number of current entries in the table, and counters for the number of searches, inserts, and
removals to the table. The pf plugin retrieves this information by invoking the `pfstat` command.

### [PHP FPM (`phpfpm`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/phpfpm)

The [PHP FPM (`phpfpm`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/phpfpm) gets phpfpm statistics using either HTTP status page or fpm socket.

### [Ping (`ping`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/ping)

The [Ping (`ping`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/ping) measures the round-trip for ping commands, response time, and other packet statistics.

### [Postfix (`postfix`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/postfix/README.md)

The [Postfix (`postfix`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/postfix/README.md) reports metrics on the postfix queues. For each of the active, hold, incoming, maildrop, and
deferred [queues](http://www.postfix.org/QSHAPE_README.html#queues), it will report the queue length (number of items),
size (bytes used by items), and age (age of oldest item in seconds).

### [PostgreSQL (`postgresql`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/postgresql)

The [PostgreSQL (`postgresql`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/postgresql) provides metrics for your PostgreSQL database. It currently works with PostgreSQL versions 8.1+.
It uses data from the built in `pg_stat_database` and `pg_stat_bgwriter` views. The metrics recorded depend on your
version of postgres.

### [PostgreSQL Extensible (`postgresql_extensible`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/postgresql_extensible)

This [PostgreSQL Extensible (`postgresql_extensible`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/postgresql_extensible) provides metrics for your postgres database. It has been designed to parse
SQL queries in the plugin section of `telegraf.conf` files.

### [PowerDNS (`powerdns`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/powerdns)

The [PowerDNS (`powerdns`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/powerdns) gathers metrics about PowerDNS using UNIX sockets.

### [Processes (`processes`)](https://github.com/influxdata/telegraf/blob/release-1.7/plugins/inputs/system/PROCESSES_README.md)

The [Processes (`processes`) input plugin](https://github.com/influxdata/telegraf/blob/release-1.7/plugins/inputs/system/PROCESSES_README.md)
gathers info about the total number of processes and groups them by status (zombie, sleeping, running, etc.). On Linux, this plugin requires access to `procfs` (`/proc`); on other operating systems, it requires access to execute `ps`.

### [Procstat (`procstat`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/procstat)

The [Procstat (`procstat`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/procstat) can be used to monitor system resource usage by an individual process using their `/proc` data.

Processes can be specified either by `pid` file, by executable name, by command line pattern matching, by username,
by systemd unit name, or by cgroup name/path (in this order or priority). This plugin uses `pgrep` when an executable
name is provided to obtain the `pid`. The Procstat plugin transmits IO, memory, cpu, file descriptor-related
measurements for every process specified. A prefix can be set to isolate individual process specific measurements.

The plugin will tag processes according to how they are specified in the configuration. If a pid file is used, a
"pidfile" tag will be generated. On the other hand, if an executable is used an "exe" tag will be generated.

### [Prometheus (`prometheus`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/prometheus)

The [Prometheus (`prometheus`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/prometheus) input plugin gathers metrics from HTTP servers exposing metrics in Prometheus format.

### [PuppetAgent (`puppetagent`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/puppetagent)

The [PuppetAgent (`puppetagent`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/puppetagent) collects variables outputted from the `last_run_summary.yaml` file usually
located in `/var/lib/puppet/state/` PuppetAgent Runs.

### [RabbitMQ (`rabbitmq`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/rabbitmq)

The [RabbitMQ (`rabbitmq`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/rabbitmq) reads metrics from RabbitMQ servers via the [Management Plugin](https://www.rabbitmq.com/management.html).

### [Raindrops (`raindrops`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/raindrops)

The [Raindrops (`raindrops`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/raindrops) reads from specified Raindops [middleware](http://raindrops.bogomips.org/Raindrops/Middleware.html)
URI and adds the statistics to InfluxDB.

### [Redis (`redis`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/redis)

The [Redis (`redis`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/redis) gathers the results of the INFO Redis command. There are two separate measurements: `redis`
and `redis_keyspace`, the latter is used for gathering database-related statistics.

Additionally the plugin also calculates the hit/miss ratio (`keyspace_hitrate`) and the elapsed time since the last RDB
save (`rdb_last_save_time_elapsed`).

### [RethinkDB (`rethinkdb`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/rethinkdb)

The [RethinkDB (`rethinkdb`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/rethinkdb) works with RethinkDB 2.3.5+ databases that requires username, password authorization,
and Handshake protocol v1.0.

### [Riak (`riak`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/riak)

The [Riak (`riak`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/riak) gathers metrics from one or more Riak instances.

### [Salesforce (`salesforce`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/salesforce)

The [Salesforce (`salesforce`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/salesforce) gathers metrics about the limits in your Salesforce organization and the remaining usage.
It fetches its data from the limits endpoint of the Salesforce REST API.

### [Sensors (`sensors`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/sensors)

The [Sensors (`sensors`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/sensors) collects collects sensor metrics with the sensors executable from the `lm-sensor` package.

### [SMART (`smart`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/smart/README.md)

The [SMART (`smart`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/smart/README.md) gets metrics using the command line utility `smartctl` for S.M.A.R.T. (Self-Monitoring, Analysis
and Reporting Technology) storage devices. SMART is a monitoring system included in computer hard disk drives (HDDs)
and solid-state drives (SSDs), which include most modern ATA/SATA, SCSI/SAS and NVMe disks. The plugin detects and
reports on various indicators of drive reliability, with the intent of enabling the anticipation of hardware failures.
See [smartmontools](https://www.smartmontools.org/).

### [SNMP (`snmp`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/snmp)

The [SNMP (`snmp`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/snmp) gathers metrics from SNMP agents.

### [Socket Listener (`socket_listener`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/socket_listener)

The [Socket Listener (`socket_listener`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/socket_listener) listens for messages from streaming (tcp, unix) or datagram
(UDP, unixgram) protocols. Messages are expected in the
[Telegraf Input Data Formats](https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md).

### [Solr (`solr`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/solr/README.md)

The [Solr (`solr`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/solr/README.md) collects stats using the MBean Request Handler.

### [SQL Server (`sqlserver`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/sqlserver)

The [SQL Server (`sqlserver`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/sqlserver) provides metrics for your Microsoft SQL Server instance. It currently works with SQL Server
versions 2008+. Recorded metrics are lightweight and use Dynamic Management Views supplied by SQL Server.

### [StatsD (`statsd`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/statsd)

The [StatsD (`statsd`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/statsd) is a special type of plugin which runs a backgrounded `statsd` listener service while Telegraf is running.
StatsD messages are formatted as described in the original [etsy statsd](https://github.com/etsy/statsd/blob/master/docs/metric_types.md) implementation.

### [Swap (`swap`)](https://github.com/influxdata/telegraf/blob/release-1.7/plugins/inputs/system/SWAP_README.md)

The [Swap (`swap`) input plugin](https://github.com/influxdata/telegraf/blob/release-1.7/plugins/inputs/system/SWAP_README.md) gathers metrics about swap memory usage. For more information about Linux swap spaces, see [All about Linux swap space](https://www.linux.com/news/all-about-linux-swap-space)

### [Syslog (`syslog`)](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/syslog) -- NEW in v.1.7

The [Syslog (`syslog`) input plugin](https://github.com/influxdata/telegraf/tree/master/plugins/inputs/syslog) listens for syslog messages transmitted over
[UDP](https://tools.ietf.org/html/rfc5426) or [TCP](https://tools.ietf.org/html/rfc5425). Syslog messages should be formatted according to [RFC 5424](https://tools.ietf.org/html/rfc5424).

### [Sysstat (`sysstat`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/sysstat)

The [Sysstat (`sysstat`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/sysstat) collects [sysstat](https://github.com/sysstat/sysstat) system metrics with the sysstat
collector utility `sadc` and parses the created binary data file with the `sadf` utility.

### [System (`system`)](https://github.com/influxdata/telegraf/blob/release-1.7/plugins/inputs/system/SYSTEM_README.md)

The [System (`system`) input plugin](https://github.com/influxdata/telegraf/blob/release-1.7/plugins/inputs/system/SYSTEM_README.md) gathers general stats on system load, uptime, and number of users logged in. It is basically equivalent to the UNIX `uptime` command.

### [Tail (`tail`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/tail)

The [Tail (`tail`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/tail) "tails" a logfile and parses each log message.

### [Teamspeak 3 (`teamspeak`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/teamspeak/README.md)

The [Teamspeak 3 (`teamspeak`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/teamspeak/README.md) uses the Teamspeak 3 ServerQuery interface of the Teamspeak server to collect statistics of one or more virtual servers.

### [Telegraf v1.x (`internal`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/internal)

The [Telegraf v1.x (`internal`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/internal) collects metrics about the Telegraf v1.x agent itself.
Note that some metrics are aggregates across all instances of one type of plugin.

### [Tomcat (`tomcat`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/tomcat)

The [Tomcat (`tomcat`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/tomcat) collects statistics available from the tomcat manager status page from
the `http://<host>/manager/status/all?XML=true` URL. (`XML=true` will return only XML data).
See the [Tomcat documentation](https://tomcat.apache.org/tomcat-9.0-doc/manager-howto.html#Server_Status) for
details of these statistics.

### [Trig (`trig`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/trig)

The [Trig (`trig`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/trig) inserts sine and cosine waves for demonstration purposes.

### [Twemproxy (`twemproxy`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/twemproxy)

The [Twemproxy (`twemproxy`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/twemproxy) gathers data from Twemproxy instances, processes Twemproxy server statistics, processes pool data. and processes backend server (Redis/Memcached) statistics.

### [Unbound (`unbound`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/unbound/README.md)

The [Unbound (`unbound`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/unbound/README.md) gathers stats from [Unbound](https://www.unbound.net/), a validating, recursive, and
caching DNS resolver.

### [Varnish (`varnish`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/varnish)

The [Varnish (`varnish`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/varnish) gathers stats from [Varnish HTTP Cache](https://varnish-cache.org/).

### [Webhooks (`webhooks`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/webhooks)

The [Webhooks (`webhooks`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/webhooks) starts an HTTPS server and registers multiple webhook listeners.

### [Win_perf_counters (`win_perf_counters`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/win_perf_counters)

The way the [Win_perf_counters (`win_perf_counters`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/win_perf_counters) works is that on load of Telegraf, the plugin will be handed configuration
from Telegraf. This configuration is parsed and then tested for validity such as if the Object, Instance and Counter
existing. If it does not match at startup, it will not be fetched. Exceptions to this are in cases where you query for
all instances "". By default the plugin does not return `_Total` when it is querying for all () as this is redundant.

### [Win_services (`win_services`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/win_services)

The [Win_services (`win_services`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/win_services) reports Windows services info.

### [ZFS (`zfs`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/zfs)

The [ZFS (`zfs`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/zfs) provides metrics from your ZFS filesystems. It supports ZFS on Linux and FreeBSD.
It gets ZFS statistics from `/proc/spl/kstat/zfs` on Linux and from `sysctl` and `zpool` on FreeBSD.

### [Zipkin (`zipkin`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/zipkin)

The [Zipkin (`zipkin`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/zipkin) implements the Zipkin HTTP server to gather trace and timing data needed to troubleshoot latency problems in microservice architectures.

> ***Note:*** This plugin is experimental. Its data schema may be subject to change based on its main usage cases and the evolution of the OpenTracing standard.

### [Zookeeper (`zookeeper`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/zookeeper)

The [Zookeeper (`zookeeper`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/zookeeper) collects variables outputted from the `mntr` command [Zookeeper Admin](https://zookeeper.apache.org/doc/current/zookeeperAdmin.html).

## Deprecated Telegraf input plugins

### [Cassandra (`cassandra`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/cassandra)

> DEPRECATED as of version 1.7. The [Cassandra (`cassandra`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.6/plugins/inputs/cassandra) collects Cassandra 3 / JVM metrics exposed as MBean attributes through the jolokia REST endpoint.
All metrics are collected for each server configured.

### [HTTP JSON (`httpjson`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/httpjson)

> DEPRECATED as of version 1.6; use the [HTTP (`http`) input plugin](#http-http-https-github-com-influxdata-telegraf-tree-master-plugins-inputs-http).

The [HTTP JSON (`httpjson`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/httpjson) collects data from HTTP URLs which respond with JSON.
It flattens the JSON and finds all numeric values, treating them as floats.

### [Jolokia (`jolokia`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/jolokia)

> DEPRECATED as of version 1.5; use the [Jolokia2 (`jolokia2`) input plugin](#jolokia2-agent-jolokia2-agent-https-github-com-influxdata-telegraf-tree-release-1-7-plugins-inputs-jolokia2-readme-md).

### [SNMP Legacy (`snmp_legacy`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/snmp_legacy)

> DEPRECATED. Use the [SNMP (`snmp`) input plugin](https://github.com/influxdata/telegraf/tree/release-1.6/plugins/inputs/snmp).

The SNMP Legacy input plugin gathers metrics from SNMP agents.

### [TCP Listener (`tcp_listener`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/tcp_listener)

> DEPRECATED as of version 1.3; use the [Socket Listener (`socket_listener`) input plugin](#socket-listener-socket-listener-https-github-com-influxdata-telegraf-tree-release-1-7-plugins-inputs-socket-listener).

### [UDP Listener (`udp_listener`)](https://github.com/influxdata/telegraf/tree/release-1.7/plugins/inputs/udp_listener)

> DEPRECATED as of version 1.3; use the [Socket Listener (`socket_listener`) input plugin](#socket-listener-socket-listener-https-github-com-influxdata-telegraf-tree-release-1-7-plugins-inputs-socket-listener).


text:
This example is a test case to show how to use the Dynamicloud Ruby API.  The example is an interactive (REPL) program that will ask the actions to create, list and delete records.

**Models that you need to create to test this example:**

####Model **'User'**

**Fields:**
- username (Textfield)
- email (Textfield)

####Model **'Blog'**

**Fields:**

- blogname (Textfield)
- blogdesc (Textarea)
- blogcat (Combobox), items:
  - Technology (tech)
  -	Medical (med)
  -	Science (sci)
  -	General (gen)
- createdt (Date)
- creatrid (Numeric)

####Model **'Post'**

**Fields:**
- postcontent (Textarea)
- posttitl (Textfield)
- blogid (Numeric)
- createdt (Date)
- creatrid (Numeric)

After creating models, you have to set the Client Secret Key (csk) and Application Client Id (aci) in source code berfore you compile it.

**The name of the class where you have to set the csk and aci is BlogManager:**

**Variables:**

```ruby
  CSK = 'csk#...'
  ACI = 'aci#...'
```

Now, execute **ruby main.rb** command to show the available options:

```ruby
require 'optparse'
require_relative 'blog_manager'

options = {}

opt_parser = OptionParser.new do |opt|
  opt.banner = 'Dynamicloud'
  opt.separator ''
  opt.separator 'Options'

  opt.on('-u', "--u 'Username','Email'", Array, 'Create a user.  You must surround with single quote the Username and Email') do |o|
    options[:opt] = 'u'
    options[:data] = o
  end

  opt.on('-b', "--b 'Owner ID (UserID)','Name','Description','Category - Technology(tech),Medical(med),Science(sci),General(gen)'", Array, 'Create a Blog.  You must surround with single quote the Owner ID, Name, Description and Category') do |o|
    options[:opt] = 'b'
    options[:data] = o
  end

  opt.on('-lb', "--lb 'Owner ID (UserID)'", Array, 'Lists blogs of user.  You must surround with single quote the Owner ID (UserID)') do |o|
    options[:opt] = 'lb'
    options[:userid] = o
  end

  opt.on('-p', "--p 'Owner ID (UserID)','Blog ID','Post Title','Post Content'", Array, 'Post in a Blog.  You must surround with single quote the Owner ID (UserID), Blog ID, Post title and Post Content') do |o|
    options[:opt] = 'p'
    options[:data] = o
  end

  opt.on('-d', '--d UserID', Array, 'Delete User') do |o|
    options[:opt] = 'd'
    options[:data] = o
  end
end

opt_parser.parse!

case options[:opt]
  when 'u'
    username = options[:data][0]
    email = options[:data][1]

    puts 'Creating user...'
    user = BlogManager.save_user username, email
    puts "User has been created with user id -> #{user['rid']}"
  when 'b'
    user_id = options[:data][0]
    name = options[:data][1]
    description = options[:data][2]
    category = options[:data][3]

    puts 'Creating blog...'
    user = BlogManager.save_blog user_id, name, description, category
    puts "Blog has been created with blog id -> #{user['rid']}"
  when 'p'
    user_id = options[:data][0]
    blog_id = options[:data][1]
    title = options[:data][2]
    content = options[:data][3]

    puts 'Creating post...'
    post = BlogManager.save_post user_id, blog_id, title, content
    puts "Post '#{post['rid']}' has been posted at blog id -> #{blog_id}"
  when 'd'
    user_id = options[:data][0]

    puts 'Deleting user...'
    BlogManager.delete_user user_id
    puts 'User has been deleted'
  when 'lb'
    puts 'Getting blogs of user id (' + options[:userid] + ')...'
  else
    puts opt_parser
end
```

redpajama_set_name: RedPajamaGithub


text:
import networkGenerator as netGen

def generateStateBasedNetwork(timeSteps):
    graph = netGen.nx.Graph(name='State Network')
    myNetworkFrames = netGen.NetworkFrames.NetworkFrames()

    for nodes in xrange(3):
        netGen.addNodeSimple(graph,nodes)

    for edges in xrange(2):
        netGen.addEdge(graph)

    myNetworkFrames.addGraph(graph)

    for t in range(timeSteps):
        selection = [n for n in graph.node.iterkeys() if graph.node[n]['state'] == 1]
        if len(selection) > 0:
            head = netGen.random.choice(selection)
            tail = netGen.random.choice(graph.nodes())
            while head == tail:
                tail = netGen.random.choice(graph.nodes())
            newNode = netGen.getUniqueNodeIdentifier(graph)
            graph.add_edge(head,tail)
            netGen.addNodeSimple(graph, newNode)
        else:
            netGen.addNodeSimple(graph,netGen.getUniqueNodeIdentifier(graph))

        myNetworkFrames.addGraph(graph)

    myNetworkFrames.writeGraphs("StateBasedNetwork.graphML")

if __name__ == '__main__':
    timeSteps = input("Enter the number of time steps: ")
    generateStateBasedNetwork(timeSteps)


text:
<translate>Domain ID</translate>

{$ user.domain_id $}

<translate>Project ID</translate>

{$ user.tenantId || user.default_project_id $}

<translate>User Name</translate>

{$ user.name $}

<translate>Email</translate>

{$ user.email || '--' $}

<translate>User ID</translate>

{$ user.id $}

<translate>Enabled</translate>

{$ user.enabled | yesno $}


text:
package model.instruction.turtle;

import model.Model;
import model.Turtle;
import model.instruction.Instruction;
import model.instruction.InstructionConstant;

/**
 *
 * Setheading instruction for SLogo
 *
 * @author Chinmay Patwardhan
 * @author Ken McAndrews
 *
 */
public class InstructionSETHEADING extends Instruction {

    public InstructionSETHEADING (Instruction parent, Model m) {
        super(1, parent, m);
    }

    @Override
    public Instruction eval () throws Exception {
        Instruction param = getChildren().get(0).eval();
        double angle = ((InstructionConstant) param).getValue();
        double deltaAngle = 0;
        for (Turtle t : getModel().getActiveTurtles()) {
            deltaAngle = t.doAbsoluteRotate(angle);
        }
        return new InstructionConstant(deltaAngle, null, getModel());
    }

}


text:
<?php

declare(strict_types=1);

namespace EdmondsCommerce\DoctrineStaticMeta\Tests\Large\C\Entity\Fields\Traits\String;

use EdmondsCommerce\DoctrineStaticMeta\Entity\Fields\Interfaces\String\UniqueStringFieldInterface;
use EdmondsCommerce\DoctrineStaticMeta\Entity\Fields\Traits\String\UniqueStringFieldTrait;
use EdmondsCommerce\DoctrineStaticMeta\Tests\Assets\AbstractTest;
use EdmondsCommerce\DoctrineStaticMeta\Tests\Large\C\Entity\Fields\Traits\AbstractFieldTraitTest;

/**
 * @covers \EdmondsCommerce\DoctrineStaticMeta\Entity\Fields\Traits\String\UniqueStringFieldTrait
 * @covers \EdmondsCommerce\DoctrineStaticMeta\Entity\Fields\FakerData\String\UniqueStringFakerData
 */
class UniqueStringFieldTraitTest extends AbstractFieldTraitTest
{
    public const    WORK_DIR           = AbstractTest::VAR_PATH .
                                         '/' .
                                         self::TEST_TYPE_LARGE .
                                         '/UniqueStringFieldTraitTest/';
    protected const TEST_FIELD_FQN     = UniqueStringFieldTrait::class;
    protected const TEST_FIELD_PROP    = UniqueStringFieldInterface::PROP_UNIQUE_STRING;
    protected const TEST_FIELD_DEFAULT = UniqueStringFieldInterface::DEFAULT_UNIQUE_STRING;
    protected const VALIDATES          = false;
}


text:
package com.jmv.frre.moduloestudiante.android;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.RemoteInput;

public class WearReplyReceiver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {
        Bundle remoteInput = RemoteInput.getResultsFromIntent(intent);
        if (remoteInput == null) {
            return;
        }
        CharSequence text = remoteInput.getCharSequence(NotificationsController.EXTRA_VOICE_REPLY);
        if (text == null || text.length() == 0) {
            return;
        }
        long dialog_id = intent.getLongExtra("dialog_id", 0);
        int max_id = intent.getIntExtra("max_id", 0);
        if (dialog_id == 0 || max_id == 0) {
            return;
        }
        SendMessagesHelper.getInstance().sendMessage(text.toString(), dialog_id);
        MessagesController.getInstance().markDialogAsRead(dialog_id, max_id, max_id, 0, 0, true, false);
    }
}


text:
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';

import { EnumToOptionsFilter } from '../shared/components/enumToOptionsFilter.pipe';
import { PatientsFormSchemaService } from '../shared/services/patientsFormSchema.service';
import { PatientsService } from '../shared/services/patients.service';
import { UsersService } from '../shared/services/users.service';
import { User } from '../shared/models/user';
import { CONFIG } from '../shared/config';

@Component({
    selector: 'mrp-main-app',
    moduleId: module.id,
    templateUrl: './mainApp.component.html',
    styleUrls: ['./mainApp.component.css'],
    providers:[PatientsService,UsersService,PatientsFormSchemaService,EnumToOptionsFilter,CONFIG]
})
export class MainAppComponent implements OnInit{
    loggedInUser:User;
    pageTitle:string = 'Medical Research Project';
    loginTitle:string;
    loggedIn:boolean = false;

    constructor(private router:Router,private usersService:UsersService){
        this.usersService.changeEmitted$.subscribe(user => this.login(user));
    }
    ngOnInit():void{
        let isLogin = this.router.url.includes('login') || this.router.url === '/';
        if(!this.loggedInUser && sessionStorage.getItem("token") && !isLogin){
            this.usersService.getLoggedUser().subscribe(r => r,(error:any) => this.logout(1));
        }
    }
    login(user:User):void{
        if(user){
            this.loggedIn = true;
            this.loggedInUser = user;
            this.loginTitle = 'hello '+user.FullName;
        }
    }
    logout(id:number):void{
        this.loggedIn = false;
        this.usersService.logout();
        this.router.navigate(['/logout/'+(id||'0')]);
    }
}


text:
#ifndef SRC_APPMAIN_LIFE_CYCLE_H_
#define SRC_APPMAIN_LIFE_CYCLE_H_
#include "utils/macro.h"
#include "unistd.h"

#include "hmi_message_handler/hmi_message_handler_impl.h"
#ifdef DBUS_HMIADAPTER
#  include "hmi_message_handler/dbus_message_adapter.h"
#endif  // DBUS_HMIADAPTER
#if ( defined (MESSAGEBROKER_HMIADAPTER) || defined(PASA_HMI)  )
#include "hmi_message_handler/messagebroker_adapter.h"
#endif  // #if ( defined (MESSAGEBROKER_HMIADAPTER) || defined(PASA_HMI)  )
#ifdef MQUEUE_HMIADAPTER
#  include "hmi_message_handler/mqueue_adapter.h"
#endif  // MQUEUE_HMIADAPTER
#include "application_manager/application_manager_impl.h"
#include "connection_handler/connection_handler_impl.h"
#include "protocol_handler/protocol_handler_impl.h"
#include "transport_manager/transport_manager.h"
#include "transport_manager/transport_manager_default.h"
#include "media_manager/media_manager_impl.h"
#include "utils/singleton.h"
#ifdef TIME_TESTER
#include "time_tester/time_manager.h"
#endif

//#if ( defined (MESSAGEBROKER_HMIADAPTER) || defined(PASA_HMI)  )
#ifdef MESSAGEBROKER_HMIADAPTER
#include "CMessageBroker.hpp"
#include "mb_tcpserver.hpp"
#  include "networking.h"  // cpplint: Include the directory when naming .h files
#endif  // MESSAGEBROKER_HMIADAPTER
#include "system.h"      // cpplint: Include the directory when naming .h files

#ifdef ENABLE_SECURITY
namespace security_manager {
class CryptoManager;
class SecurityManagerImpl;
}  // namespace security_manager
#endif  // ENABLE_SECURITY

namespace main_namespace {
class LifeCycle : public utils::Singleton<LifeCycle> {
  public:
    bool StartComponents();

    /**
    * Initialize MessageBroker component
    * @return true if success otherwise false.
    */
    bool InitMessageSystem();
    /**
     * \brief Main loop
     */
    void Run();
    void StopComponents();

  private:
    LifeCycle();
    transport_manager::TransportManager* transport_manager_;
    protocol_handler::ProtocolHandlerImpl* protocol_handler_;
    connection_handler::ConnectionHandlerImpl* connection_handler_;
    application_manager::ApplicationManagerImpl* app_manager_;
#ifdef ENABLE_SECURITY
    security_manager::CryptoManager* crypto_manager_;
    security_manager::SecurityManager* security_manager_;
#endif  // ENABLE_SECURITY
    hmi_message_handler::HMIMessageHandlerImpl* hmi_handler_;
    hmi_message_handler::HMIMessageAdapter* hmi_message_adapter_;
    media_manager::MediaManagerImpl* media_manager_;
#ifdef TIME_TESTER
    time_tester::TimeManager* time_tester_;
#endif  // TIME_TESTER
#ifdef DBUS_HMIADAPTER
    hmi_message_handler::DBusMessageAdapter* dbus_adapter_;
    System::Thread* dbus_adapter_thread_;
#endif  // DBUS_HMIADAPTER

#ifdef MESSAGEBROKER_HMIADAPTER
    hmi_message_handler::MessageBrokerAdapter* mb_adapter_;
    NsMessageBroker::CMessageBroker* message_broker_;
    NsMessageBroker::TcpServer* message_broker_server_;
    System::Thread* mb_thread_;
    System::Thread* mb_server_thread_;
    System::Thread* mb_adapter_thread_;
#endif  // MESSAGEBROKER_HMIADAPTER

    bool components_started_;
    FRIEND_BASE_SINGLETON_CLASS(LifeCycle);
    DISALLOW_COPY_AND_ASSIGN(LifeCycle);
};
}  //  namespace main_namespace

#endif  // SRC_APPMAIN_LIFE_CYCLE_H_


text:
goog.setTestOnly();
goog.require('goog.object');
goog.require('goog.testing.AsyncTestCase');
goog.require('goog.testing.jsunit');
goog.require('hr.db');
goog.require('lf.Row');
goog.require('lf.eval.Type');
goog.require('lf.fn');
goog.require('lf.pred.JoinPredicate');
goog.require('lf.proc.Relation');
goog.require('lf.proc.RelationEntry');
goog.require('lf.proc.RelationTransformer');
goog.require('lf.schema.DataStoreType');
goog.require('lf.testing.hrSchema.EmployeeDataGenerator');
goog.require('lf.testing.hrSchema.JobDataGenerator');

/** @type {!goog.testing.AsyncTestCase} */
var asyncTestCase = goog.testing.AsyncTestCase.createAndInstall(
    'RelationTransformerTest');

/** @type {!hr.db.schema.Job} */
var j;

/** @type {!hr.db.schema.Employee} */
var e;

/** @type {!Array<!hr.db.row.Job>} */
var sampleJobs;

/** @type {!Array<!hr.db.row.Employee>} */
var sampleEmployees;

function setUp() {
  asyncTestCase.waitForAsync('setUp');
  hr.db.connect({storeType: lf.schema.DataStoreType.MEMORY}).then(function(db) {
    j = db.getSchema().getJob();
    e = db.getSchema().getEmployee();
    generateSampleJobData(db);
    asyncTestCase.continueTesting();
  }, fail);
}

/**
 * Generates sample job data.
 * @param {!lf.Database} db The db connection.
 */
function generateSampleJobData(db) {
  var schema = /** @type {!hr.db.schema.Database} */ (db.getSchema());
  var jobGenerator =
      new lf.testing.hrSchema.JobDataGenerator(schema);
  var jobCount = 10;
  sampleJobs = jobGenerator.generate(jobCount);

  var employeeGenerator =
      new lf.testing.hrSchema.EmployeeDataGenerator(schema);
  var employeeCount = 2 * jobCount;
  employeeGenerator.setJobCount(jobCount);
  sampleEmployees = employeeGenerator.generate(employeeCount);

  for (var i = 0; i < jobCount; i++) {
    var jobId = sampleJobs[i].getId();
    // Assigning two employees per job.
    sampleEmployees[2 * i].setJobId(jobId);
    sampleEmployees[2 * i + 1].setJobId(jobId);
  }
}

/** Tests the case where no columns are requested. */
function testGetTransformed_NoColumns() {
  var relation = lf.proc.Relation.fromRows(sampleJobs, [j.getName()]);
  var transformer = new lf.proc.RelationTransformer(relation, []);
  var transformedRelation = transformer.getTransformed();
  transformedRelation.entries.forEach(
      function(entry) {
        assertTrue(goog.object.isEmpty(entry.row.payload()));
      });
}

/**
 * Tests the case where all requested columns are simple (non-aggregated).
 */
function testGetTransformed_SimpleColumnsOnly() {
  var columns = [j.title, j.minSalary];
  checkTransformationWithoutJoin(columns, sampleJobs.length);
}

/**
 * Tests the case where all requested columns are aggregated.
 */
function testGetTransformed_AggregatedColumnsOnly() {
  var columns = [lf.fn.min(j.maxSalary), lf.fn.max(j.maxSalary)];
  checkTransformationWithoutJoin(columns, 1);
}

/**
 * Tests the case where both simple and aggregated columns are requested.
 */
function testGetTransformed_MixedColumns() {
  var columns = [j.title, j.maxSalary, lf.fn.avg(j.maxSalary)];
  checkTransformationWithoutJoin(columns, 1);
}

/**
 * Tests the case where a single DISTINCT column is requested.
 */
function testGetTransformed_DistinctOnly() {
  var columns = [lf.fn.distinct(j.maxSalary)];
  checkTransformationWithoutJoin(columns, 2);
}

function testGetTransformed_SimpleColumnsOnly_Join() {
  var columns = [e.email, e.hireDate, j.title];
  checkTransformationWithJoin(columns, sampleEmployees.length);
}

function testGetTransformed_AggregatedColumnsOnly_Join() {
  var columns = [
    lf.fn.min(e.hireDate), lf.fn.max(e.hireDate),
    lf.fn.min(j.maxSalary), lf.fn.max(j.maxSalary)
  ];
  checkTransformationWithJoin(columns, 1);
}

function testGetTransformed_MixedColumns_Join() {
  var columns = [
    j.title, j.maxSalary, lf.fn.min(j.maxSalary),
    e.email, e.hireDate, lf.fn.min(e.hireDate)
  ];
  checkTransformationWithJoin(columns, 1);
}

function testGetTransformed_DistinctOnly_Join() {
  var columns = [lf.fn.distinct(j.maxSalary)];
  checkTransformationWithJoin(columns, 2);
}

function testGetTransformed_Many() {
  // Creating multiple relations where each relation holds two employees that
  // have the same "jobId" field.
  var relations = [];
  for (var i = 0; i < sampleEmployees.length; i += 2) {
    var relation = lf.proc.Relation.fromRows(
        [sampleEmployees[i], sampleEmployees[i + 1]],
        [e.getName()]);
    relation.setAggregationResult(lf.fn.avg(e.salary), 50);
    relation.setAggregationResult(lf.fn.max(e.salary), 100);
    relation.setAggregationResult(lf.fn.min(e.salary), 0);

    relations.push(relation);
  }

  var columns = [
    e.jobId,
    lf.fn.min(e.salary),
    lf.fn.max(e.salary),
    lf.fn.avg(e.salary)
  ];

  var transformedRelation = lf.proc.RelationTransformer.transformMany(
      relations, columns);
  assertEquals(relations.length, transformedRelation.entries.length);
  assertColumnsPopulated(columns, transformedRelation);
}

/**
 * Checks that performing a transformation on a relationship that is *not* the
 * result of a natural join, results in a relation with fields that are
 * populated as expected.
 * @param {!Array<!lf.schema.Column>} columns The columns to be requested.
 * @param {number} expectedResultCount The expected number of results.
 * @return {!lf.proc.Relation} The transformed relation.
 */
function checkTransformationWithoutJoin(columns, expectedResultCount) {
  var transformer = new lf.proc.RelationTransformer(getRelation(), columns);
  var transformedRelation = transformer.getTransformed();

  assertEquals(expectedResultCount, transformedRelation.entries.length);
  assertColumnsPopulated(columns, transformedRelation);

  return transformedRelation;
}

/**
 * Checks that performing a transformation on a relationship that is the result
 * of a natural join, results in a relation with fields that are populated as
 * expected.
 * @param {!Array<!lf.schema.Column>} columns The columns to be requested.
 * @param {number} expectedResultCount The expected number of results.
 * @return {!lf.proc.Relation} The transformed relation.
 */
function checkTransformationWithJoin(columns, expectedResultCount) {
  var transformer = new lf.proc.RelationTransformer(
      getJoinedRelation(), columns);
  var transformedRelation = transformer.getTransformed();

  assertEquals(expectedResultCount, transformedRelation.entries.length);
  assertColumnsPopulated(columns, transformedRelation);

  return transformedRelation;
}

/**
 * Asserts that all requested columns are populated in the given relation's
 * entries.
 * @param {!Array<!lf.schema.Column>} columns
 * @param {!lf.proc.Relation} relation The relation to be checked.
 */
function assertColumnsPopulated(columns, relation) {
  relation.entries.forEach(
      function(entry, index) {
        columns.forEach(function(column) {
          // Checking that all requested columns are populated.
          assertTrue(goog.isDefAndNotNull(entry.getField(column)));
        });
      });
}

/**
 * Generates a dummy relation, with bogus aggregation results to be used for
 * tesing.
 * @return {!lf.proc.Relation}
 */
function getRelation() {
  var relation = lf.proc.Relation.fromRows(sampleJobs, [j.getName()]);

  // Filling in dummy aggregation results. In a normal scenario those have been
  // calculated before ProjectStep executes.
  relation.setAggregationResult(lf.fn.avg(j.maxSalary), 50);
  relation.setAggregationResult(lf.fn.max(j.maxSalary), 100);
  relation.setAggregationResult(lf.fn.min(j.maxSalary), 0);

  var entry1 = new lf.proc.RelationEntry(
      new lf.Row(1, {'maxSalary': 1000}), false);
  var entry2 = new lf.proc.RelationEntry(
      new lf.Row(1, {'maxSalary': 2000}), false);
  var distinctRelation = new lf.proc.Relation([entry1, entry2], [j.getName()]);
  relation.setAggregationResult(lf.fn.distinct(j.maxSalary), distinctRelation);
  return relation;
}

/**
 * Generates a dummy joined relation, with bogus aggregation results to be used
 * for tesing.
 * @return {!lf.proc.Relation}
 */
function getJoinedRelation() {
  var relationLeft = lf.proc.Relation.fromRows(sampleEmployees, [e.getName()]);
  var relationRight = lf.proc.Relation.fromRows(sampleJobs, [j.getName()]);
  var joinPredicate = new lf.pred.JoinPredicate(
      e.jobId, j.id, lf.eval.Type.EQ);
  var joinedRelation = joinPredicate.evalRelations(
      relationLeft, relationRight, false);

  joinedRelation.setAggregationResult(lf.fn.avg(j.maxSalary), 50);
  joinedRelation.setAggregationResult(lf.fn.max(j.maxSalary), 100);
  joinedRelation.setAggregationResult(lf.fn.min(j.maxSalary), 0);
  joinedRelation.setAggregationResult(lf.fn.min(e.hireDate), 0);
  joinedRelation.setAggregationResult(lf.fn.max(e.hireDate), 0);

  var entry1 = new lf.proc.RelationEntry(
      new lf.Row(1, {'maxSalary': 1000}), false);
  var entry2 = new lf.proc.RelationEntry(
      new lf.Row(1, {'maxSalary': 2000}), false);
  var distinctRelation = new lf.proc.Relation([entry1, entry2], [j.getName()]);
  joinedRelation.setAggregationResult(
      lf.fn.distinct(j.maxSalary), distinctRelation);

  return joinedRelation;
}


text:
<!doctype html>
<meta name="timeout" content="long">
<title>Accept-CH Persistence test</title>
<body>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/get-host-info.sub.js"></script>
<script src="resources/accept-ch-test.js"></script>

<script>
run_test({ name: "same origin subresource",
    initial_url: echo,
    accept_url: accept,
    expect_url: do_not_expect,
    type: "subresource" });
</script>
</body>
</html>


text:
<?php

namespace Redking\ParseBundle\Tests\Functional;

use Parse\ParseQuery;
use Redking\ParseBundle\Tests\Models\Blog\User;
use Redking\ParseBundle\Tests\Models\Blog\Picture;
use Redking\ParseBundle\Tests\Models\Blog\Role;

class ACLTest extends \Redking\ParseBundle\Tests\TestCase
{
    protected static $modelSets = [
        'Redking\ParseBundle\Tests\Models\Blog\User',
        'Redking\ParseBundle\Tests\Models\Blog\Picture',
        'Redking\ParseBundle\Tests\Models\Blog\Role',
    ];

    public function testWithoutAcl()
    {
        $user = new User();
        $user->setPassword('p4ss');
        $user->setName('foo');

        $this->om->persist($user);
        $this->om->flush();

        $picture = new Picture();
        $picture->setFile('screen1.jpg');

        $this->om->persist($picture);
        $this->om->flush();
        $this->om->clear();

        $user = $this->om->getRepository(User::class)->findOneByName('foo');
        $picture = $this->om->getRepository(Picture::class)->findOneByFile('screen1.jpg');
        $this->assertNotNull($user);
        $this->assertNotNull($picture);

        $this->assertTrue($picture->getPublicAclReadAccess());
        $this->assertTrue($picture->getPublicAclWriteAccess());
        $this->assertTrue($user->getPublicAclReadAccess());
        $this->assertFalse($user->getPublicAclWriteAccess());

        $parseObject = $this->om->getUnitOfWork()->getOriginalObjectData($picture);
        $this->assertEquals(['*' => ['read' => true, 'write' => true]], $parseObject->getAcl()->_encode());

        $userParseObject = $this->om->getUnitOfWork()->getOriginalObjectData($user);
        $this->assertEquals(['*' => ['read' => true], $user->getId() => ['read' => true, 'write' => true]], $userParseObject->getAcl()->_encode());
    }

    public function testUserAcl()
    {
        $user = new User();
        $user->setName('foo');
        $user->setPassword('p4ss');

        $this->om->persist($user);
        $this->om->flush();

        $picture = new Picture();
        $picture->setFile('screen1.jpg');
        $picture->setPublicAcl(false, false);
        $picture->addUserAcl($user, true, true);

        $this->om->persist($picture);
        $this->om->flush();
        $this->om->clear();

        $user = $this->om->getRepository(User::class)->findOneByName('foo');
        $picture = $this->om->getRepository(Picture::class)->findOneByFile('screen1.jpg');
        $this->assertNotNull($user);
        $this->assertNotNull($picture);

        $this->assertFalse($picture->getPublicAclReadAccess());
        $this->assertFalse($picture->getPublicAclWriteAccess());

        $this->assertTrue($picture->getUserAclReadAccess($user));
        $this->assertTrue($picture->getUserAclWriteAccess($user));

        $parseObject = $this->om->getUnitOfWork()->getOriginalObjectData($picture);
        $this->assertEquals([$user->getId() => ['read' => true, 'write' => true]], $parseObject->getAcl()->_encode());
    }

    public function testRoleAcl()
    {
        $user = new User();
        $user->setName('foo');
        $user->setPassword('p4ss');

        $role = new Role();
        $role->setName('Foo');
        $role->addUser($user);

        $this->om->persist($user);
        $this->om->persist($role);
        $this->om->flush();
        $this->om->clear();

        $role = $this->om->getRepository(Role::class)->findOneByName('Foo');
        $this->assertNotNull($role);
        $this->assertCount(1, $role->getUsers());
        $this->assertTrue($role->getPublicAclReadAccess());
        $this->assertFalse($role->getPublicAclWriteAccess());

        $picture = new Picture();
        $picture->setFile('screen1.jpg');
        $picture->setPublicAcl(false, false);
        $picture->addRoleAcl($role, true, true);

        $this->om->persist($picture);
        $this->om->flush();
        $this->om->clear();

        $picture = $this->om->getRepository(Picture::class)->findOneByFile('screen1.jpg');
        $role = $this->om->getRepository(Role::class)->findOneByName('Foo');

        $this->assertNotNull($picture);

        $this->assertFalse($picture->getPublicAclReadAccess());
        $this->assertFalse($picture->getPublicAclWriteAccess());

        $this->assertTrue($picture->getRoleAclReadAccess($role));
        $this->assertTrue($picture->getRoleAclWriteAccess($role));

        $pictureParseObject = $this->om->getUnitOfWork()->getOriginalObjectData($picture);
        $this->assertEquals(['role:'.$role->getName() => ['read' => true, 'write' => true]], $pictureParseObject->getAcl()->_encode());

        // Update to see if the ACL are still there when no changes are made
        $exif = [
            'location' => [
                'city' => 'Marigot',
                'zipCode' => 97150
            ],
            'resolution' => [
                'width' => 1920,
                'height' => 1080,
            ]
        ];
        $picture->setExif($exif);

        $this->om->persist($picture);
        $this->om->flush();
        $this->om->clear();

        $picture = $this->om->getRepository(Picture::class)->findOneByFile('screen1.jpg');
        $role = $this->om->getRepository(Role::class)->findOneByName('Foo');
        $user = $this->om->getRepository(User::class)->findOneByName('foo');

        $this->assertNotNull($picture);
        $this->assertEquals($exif, $picture->getExif());

        $this->assertFalse($picture->getPublicAclReadAccess());
        $this->assertFalse($picture->getPublicAclWriteAccess());

        $this->assertTrue($picture->getRoleAclReadAccess($role));
        $this->assertTrue($picture->getRoleAclWriteAccess($role));

        // Update ACLs
        $picture->setPublicAcl(true, false);
        $picture->removeRoleAcl($role);
        $picture->addUserAcl($user, true, true);

        $this->om->persist($picture);
        $this->om->flush();
        $this->om->clear();

        $picture = $this->om->getRepository(Picture::class)->findOneByFile('screen1.jpg');
        $role = $this->om->getRepository(Role::class)->findOneByName('Foo');
        $user = $this->om->getRepository(User::class)->findOneByName('foo');

        $this->assertTrue($picture->getPublicAclReadAccess());
        $this->assertFalse($picture->getPublicAclWriteAccess());

        $this->assertTrue($picture->getRoleAclReadAccess($role)); // As public read is now true
        $this->assertFalse($picture->getRoleAclWriteAccess($role));

        $this->assertTrue($picture->getUserAclReadAccess($user));
        $this->assertTrue($picture->getUserAclWriteAccess($user));

        $pictureParseObject = $this->om->getUnitOfWork()->getOriginalObjectData($picture);
        $this->assertEquals(['*' => ['read' => true], $user->getId() => ['read' => true, 'write' => true]], $pictureParseObject->getAcl()->_encode());
    }
}


text:
using System;
using Cake.Core;
using Cake.Core.Diagnostics;
using Cake.Core.IO;
using Cake.Core.Utilities;

namespace Cake.Common.Tools.NuGet.SetApiKey
{
    /// <summary>
    /// The NuGet set API key used to set API key used for API/feed authentication.
    /// </summary>
    public sealed class NuGetSetApiKey : Tool<NuGetSetApiKeySettings>
    {
        private readonly ICakeLog _log;
        private readonly ICakeEnvironment _environment;
        private readonly IToolResolver _nugetToolResolver;

        /// <summary>
        /// Initializes a new instance of the <see cref="NuGetSetApiKey"/> class.
        /// </summary>
        /// <param name="log">The log.</param>
        /// <param name="fileSystem">The file system.</param>
        /// <param name="environment">The environment.</param>
        /// <param name="processRunner">The process runner.</param>
        /// <param name="nugetToolResolver">The NuGet tool resolver.</param>
        public NuGetSetApiKey(ICakeLog log, IFileSystem fileSystem, ICakeEnvironment environment,
            IProcessRunner processRunner, IToolResolver nugetToolResolver)
            : base(fileSystem, environment, processRunner)
        {
            _log = log;
            _environment = environment;
            _nugetToolResolver = nugetToolResolver;
        }

        /// <summary>
        /// Installs NuGet packages using the specified package id and settings.
        /// </summary>
        /// <param name="apiKey">The API key.</param>
        /// <param name="source">The Server URL where the API key is valid.</param>
        /// <param name="settings">The settings.</param>
        public void SetApiKey(string apiKey, string source, NuGetSetApiKeySettings settings)
        {
            if (string.IsNullOrWhiteSpace(apiKey))
            {
                throw new ArgumentNullException("apiKey");
            }

            if (string.IsNullOrWhiteSpace(source))
            {
                throw new ArgumentNullException("source");
            }

            if (settings == null)
            {
                throw new ArgumentNullException("settings");
            }
            string output = null;
            var processSettings = new ProcessSettings
            {
                Arguments = GetArguments(apiKey, source, settings),
                RedirectStandardOutput = true
            };
            Run(settings, null, settings.ToolPath, processSettings, process => output = string.Join("\r\n", process.GetStandardOutput()));

            if (string.IsNullOrWhiteSpace(output) ||
                !output.Contains(string.Concat("The API Key '", apiKey, "' was saved for '", source, "'.")))
            {
                throw new CakeException("SetApiKey returned unexpected response.");
            }
        }

        private ProcessArgumentBuilder GetArguments(string apiKey, string source, NuGetSetApiKeySettings settings)
        {
            var builder = new ProcessArgumentBuilder();

            builder.Append("setapikey");
            builder.AppendQuotedSecret(apiKey);

            // Source
            builder.Append("-Source");
            builder.AppendQuoted(source);

            // Verbosity?
            if (settings.Verbosity.HasValue)
            {
                builder.Append("-Verbosity");
                builder.Append(settings.Verbosity.Value.ToString().ToLowerInvariant());
            }

            // Configuration file
            if (settings.ConfigFile != null)
            {
                builder.Append("-ConfigFile");
                builder.AppendQuoted(settings.ConfigFile.MakeAbsolute(_environment).FullPath);
            }

            builder.Append("-NonInteractive");

            return builder;
        }

        /// <summary>
        /// Gets the name of the tool.
        /// </summary>
        /// <returns>The name of the tool.</returns>
        protected override string GetToolName()
        {
            return _nugetToolResolver.Name;
        }

        /// <summary>
        /// Gets the default tool path.
        /// </summary>
        /// <param name="settings">The settings.</param>
        /// <returns>The default tool path.</returns>
        protected override FilePath GetDefaultToolPath(NuGetSetApiKeySettings settings)
        {
            return _nugetToolResolver.ResolveToolPath();
        }
    }
}


text:
import * as turf from '@turf/helpers';
import sector from '@turf/sector';
import cheapRuler = require('cheap-ruler');
import {Feature, Polygon} from 'geojson';

import Point from '../../geo/point';
import AreaShape from './area';
import Cylinder from './cylinder';

export default class Sector extends AreaShape {
  readonly direction: number; // direction in which the sector is pointing
  readonly angle: number; // "width" of the sector in degrees

  protected _polygon: Feature<Polygon>;

  private readonly _cylinder: Cylinder;
  private readonly _ruler: cheapRuler.CheapRuler;

  constructor(center: Point, radius: number, angle: number, direction: number) {
    super();

    this.angle = angle;
    this.direction = direction;

    this._polygon = sector(
      turf.point(center),
      radius / 1000,
      direction - angle / 2,
      direction + angle / 2,
      { steps: Math.max(Math.round(angle), 64) },
    ) as Feature<Polygon>;

    this._cylinder = new Cylinder(center, radius);
    this._ruler = cheapRuler(center[1]);
  }

  get center(): Point {
    return this._cylinder.center;
  }

  get radius(): number {
    return this._cylinder.radius;
  }

  toGeoJSON(): Feature<Polygon> {
    return this._polygon;
  }
}


text:
<!DOCTYPE html>

<title>BluetoothServiceHandler_unregister_unregisterServiceRecord</title>


text:
using System;
using ZooBurst.Core;
using ZooBurst.Utils;
using ZooBurst.View.Activities;

namespace ZooBurst.View.Animations
{
    public class AnimationInvalidSwap : Animation
    {
        public override void Play(GameView view, Action<object[]> onComplete, params object[] args)
        {
            var swap = args[0] as Swap;

            if (swap == null)
                return;

            var moveTo = new MoveActivity(swap.From.Sprite.LocalPosition, swap.To.Sprite.LocalPosition, TimeSpan.FromSeconds(0.2D), EaseMode.Out);
            var moveFrom = new MoveActivity(swap.To.Sprite.LocalPosition, swap.From.Sprite.LocalPosition, TimeSpan.FromSeconds(0.2D), EaseMode.Out);

            swap.From.Sprite.AddActivity(new ActivitySequence(new Activity[] { moveTo, moveFrom }));
            swap.To.Sprite.AddActivity(new ActivitySequence(new[] { moveFrom.Clone(), moveTo.Clone() }, onComplete));
        }
    }
}


text:
class Dialog(object):
    """
    Dialog base class.
    """
    def __init__(self, app, parent=None):
        self.initialized = False
        self.app, self.parent = app, parent

    def execute(self, force=False):
        """Executes this dialog.
        """
        self.app.set_title(self.get_title())

        if force or not self.initialized:
            self.initialized = True
            self.init_ui()

        self.display()

    def back(self):
        """Executes the parent dialog.
        """
        if self.parent:
            self.parent.execute()

    def init_ui(self):
        """Creates the UI elements. This default implementation raises
        NotImplementedError
        """
        raise NotImplementedError

    def display(self):
        """Displays the UI on the screen. This default implementation raises
        NotImplementedError
        """
        raise NotImplementedError

    def get_title(self):
        """Returns the dialog title. This default implementation raises
        NotImplementedError.
        """
        raise NotImplementedError


text:
This directory contains an example [docker-compose.yml](./docker-compose.yml) file which will allow you to run a full Bitcoin node. The compose file will automatically handle creating a data volume for you, so that blockchain data is persisted between Bitcoin upgrades. It also makes it easy to run `bitcoin-cli` against your running Bitcoin node.

Before you can get started, you need to install Docker Compose. Follow the [Docker Compose installation instructions](https://docs.docker.com/compose/install/) relevant to your platform.

### Create a workspace

First, you should create a directory to keep your compose file in. Copy the example `docker-compose.yml` file from this repository into your local directory.

```sh
$ mkdir bitcoin
$ cd bitcoin
$ wget https://raw.githubusercontent.com/amacneil/docker-bitcoin/master/example/docker-compose.yml
```

### Launch bitcoind

To launch your node, simply type `docker-compose up`:

```sh
$ docker-compose up -d  # start bitcoind in the background
$ docker-compose ps     # show running processes
$ docker-compose down   # stop bitcoind (blockchain data will remain on disk)
```

### Run bitcoin-cli

To run commands against your running Bitcoin node, a `bitcoin-cli` shorthand is provided. Simply use the `docker-compose run` command:

```sh
$ docker-compose run --rm bitcoin-cli getinfo
```

Note that passing `--rm` to `docker-compose run` is not strictly necessary. However, it will prevent exited containers building up on your system after each command, which can waste disk space. If you forget to pass `--rm`, the unused containers will be cleaned up next time you run `docker-compose down`.

### Configuration options

To configure your Bitcoin node, update the `command: bitcoind` line in `docker-compose.yml`. For example, to run a node on the Bitcoin testnet, you would change the line to:

```
command: bitcoind -testnet
```

### Running a specific fork or version

The `docker-compose.yml` file can be edited to suit your needs. If you wish to run a specific version or fork of bitcoin, simply replace `amacneil/bitcoin` with the desired image.


text:
package restic

import (
	// local
	"lab.pztrn.name/pztrn/caddybuilder/plugins/context"
)

var (
	ctx *plugincontext.PluginContext
)

func New(c *plugincontext.PluginContext) *ResticPlugin {
	ctx = c
	return &ResticPlugin{}
}


text:
package libdokan

import (
	"time"

	"github.com/keybase/kbfs/libfs"
	"github.com/keybase/kbfs/libkbfs"
	"golang.org/x/net/context"
)

// NewFileInfoFile returns a special file that contains a text
// representation of a file's KBFS metadata.
func NewFileInfoFile(
	fs *FS, dir libkbfs.Node, name string) *SpecialReadFile {
	return &SpecialReadFile{
		read: func(ctx context.Context) ([]byte, time.Time, error) {
			return libfs.GetFileInfo(ctx, fs.config, dir, name)
		},
		fs: fs,
	}
}


text:
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package org.chromium.chrome.browser.tabmodel;

import org.chromium.base.CommandLine;
import org.chromium.base.ThreadUtils;
import org.chromium.chrome.browser.compositor.layouts.content.TabContentManager;
import org.chromium.chrome.browser.tab.Tab;
import org.chromium.chrome.browser.tabmodel.TabModel.TabLaunchType;
import org.chromium.chrome.browser.tabmodel.TabModel.TabSelectionType;
import org.chromium.content.browser.test.NativeLibraryTestBase;
import org.chromium.content_public.browser.LoadUrlParams;
import org.chromium.ui.base.WindowAndroid;

import java.util.HashSet;
import java.util.Set;

/**
 * Basis for testing tab model selector observers.
 */
public class TabModelSelectorObserverTestBase extends NativeLibraryTestBase {
    protected TabModelSelectorBase mSelector;
    protected TabModelSelectorTestTabModel mNormalTabModel;
    protected TabModelSelectorTestTabModel mIncognitoTabModel;

    protected WindowAndroid mWindowAndroid;

    @Override
    public void setUp() throws Exception {
        super.setUp();

        CommandLine.init(null);
        loadNativeLibraryAndInitBrowserProcess();

        ThreadUtils.runOnUiThreadBlocking(new Runnable() {
            @Override
            public void run() {
                initialize();
            }
        });
    }

    private void initialize() {
        mWindowAndroid = new WindowAndroid(
                getInstrumentation().getTargetContext().getApplicationContext());

        mSelector = new TabModelSelectorBase() {
            @Override
            public Tab openNewTab(LoadUrlParams loadUrlParams, TabLaunchType type, Tab parent,
                    boolean incognito) {
                return null;
            }
        };

        TabModelOrderController orderController = new TabModelOrderController(mSelector);
        TabContentManager tabContentManager =
                new TabContentManager(getInstrumentation().getTargetContext(), null, false);
        TabPersistencePolicy persistencePolicy = new TabbedModeTabPersistencePolicy(0, false);
        TabPersistentStore tabPersistentStore = new TabPersistentStore(persistencePolicy, mSelector,
                null, null);

        TabModelDelegate delegate = new TabModelDelegate() {
            @Override
            public void selectModel(boolean incognito) {
                mSelector.selectModel(incognito);
            }

            @Override
            public void requestToShowTab(Tab tab, TabSelectionType type) {
            }

            @Override
            public boolean isSessionRestoreInProgress() {
                return false;
            }

            @Override
            public boolean isInOverviewMode() {
                return false;
            }

            @Override
            public TabModel getModel(boolean incognito) {
                return mSelector.getModel(incognito);
            }

            @Override
            public TabModel getCurrentModel() {
                return mSelector.getCurrentModel();
            }

            @Override
            public boolean closeAllTabsRequest(boolean incognito) {
                return false;
            }
        };
        mNormalTabModel = new TabModelSelectorTestTabModel(
                false, orderController, tabContentManager, tabPersistentStore, delegate);

        mIncognitoTabModel = new TabModelSelectorTestTabModel(
                true, orderController, tabContentManager, tabPersistentStore, delegate);

        mSelector.initialize(false, mNormalTabModel, mIncognitoTabModel);
    }

    /**
     * Test TabModel that exposes the needed capabilities for testing.
     */
    public static class TabModelSelectorTestTabModel extends TabModelImpl {
        private Set<TabModelObserver> mObserverSet = new HashSet<>();

        public TabModelSelectorTestTabModel(
                boolean incognito, TabModelOrderController orderController,
                TabContentManager tabContentManager, TabPersistentStore tabPersistentStore,
                TabModelDelegate modelDelegate) {
            super(incognito, false, null, null, null, orderController, tabContentManager,
                    tabPersistentStore, modelDelegate, false);
        }

        @Override
        public void addObserver(TabModelObserver observer) {
            super.addObserver(observer);
            mObserverSet.add(observer);
        }

        @Override
        public void removeObserver(TabModelObserver observer) {
            super.removeObserver(observer);
            mObserverSet.remove(observer);
        }

        public Set<TabModelObserver> getObservers() {
            return mObserverSet;
        }
    }
}


text:
>This repository is currently a prototype to test out Ionic 2, NativeScript and Angular 2 together. This is not the app store version.
Trampolining Scores App - Built in Ionic 2 + Angular 2 + TypeScript

Install Ionic v2 CLI

http://ionicframework.com/docs/v2/getting-started/installation/

### Added:
1. Regions/Leagues + search (list filter)
2. Map page - Google Map - in progress

### to-do:
1. finish route changes
2. search page

### router-link:
Added routerLink directive to the start page:
[Commit](https://github.com/matt4446/WhatsMyScore2-Ionic2/blob/58b59d5963b5c062d6dc049e6109c53d4e7d5b1e/app/pages/startPage/startPage.html)

changed the button from:
>(click)="NavigateToProviderList()

To:
>[routerLink]="['/Regions']"

### Router Sections:
1. /Regions
    * todo: more complex route
    * Regions/:regionId/Competition/:competitionId

2. /UpcomingCompetitionMap