<commit_before># Icecast Input Plugin

The icecast plugin gathers metrics from the Icecast listmount page enabling to see a detailed report of total listeners

### Configuration:

```toml
# Read listeners from an Icecast instance per mount
[[inputs.icecast]]
  ## Specify the IP adress to where the 'admin/listmounts' can be found. You can include port if needed.
  host = "localhost"

  ## The username/password combination needed to read the listmounts page.
  ## These must be equal to the admin login details specified in your Icecast configuration
  username = "admin"
  password = "<PASSWORD>"

  ## If you wish your host name to be different then the one specified under host, you can change it here
  alias = ""
```

### Measurements & Fields:

- listeners

### Tags:

- All measurements have the following tags:
    - host (can be either hostname/ip or an alias)
    - mount


    
### Sample Queries:

These are some useful queries (to generate dashboards or other) to run against data from this plugin:

```
SELECT last("listeners") FROM "icecast" WHERE "host" = "host" AND $timeFilter GROUP BY time($interval), "host" fill(null)
SELECT max(field1), mean(field1), min(field1) FROM measurement1 WHERE tag1=bar AND time > now() - 1h GROUP BY tag
```

### Example Output:

```
$ ./telegraf -config telegraf.conf -input-filter example -test
measurement1,tag1=foo,tag2=bar field1=1i,field2=2.1 1453831884664956455<commit_msg>Updated the configuration sample<commit_after># Icecast Input Plugin

The icecast plugin gathers metrics from the Icecast listmount page enabling to see a detailed report of total listeners

### Configuration:

```toml
# Read listeners from an Icecast instance per mount
[[inputs.icecast]]
  ## Specify the IP adress to where the 'admin/listmounts' can be found. You can include port if needed.
  host = "localhost"

  ## The username/password combination needed to read the listmounts page.
  ## These must be equal to the admin login details specified in your Icecast configuration
  username = "admin"
  password = "<PASSWORD>"

  ## If you wish your host name to be different then the one specified under host, you can change it here
  alias = ""

  ## Trim forward slash from mountpoint names
	# trimslash = false  
```

### Measurements & Fields:

- listeners

### Tags:

- All measurements have the following tags:
    - host (can be either hostname/ip or an alias)
    - mount



### Sample Queries:

These are some useful queries (to generate dashboards or other) to run against data from this plugin:

```
SELECT last("listeners") FROM "icecast" WHERE "host" = "host" AND $timeFilter GROUP BY time($interval), "host" fill(null)
```

### Example Output:

```
$ ./telegraf -config telegraf.conf -input-filter example -test
measurement1,tag1=foo,tag2=bar field1=1i,field2=2.1 1453831884664956455
{'fraction_non_alphanumeric': 0.09283445111189552, 'fraction_numerical': 0.02117896223085069, 'mean_word_length': 4.257884972170687, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4018615', 'n_tokens_mistral': 851, 'n_tokens_neox': 791, 'n_words': 353}