> ## Documentation Index
> Fetch the complete documentation index at: https://otel.fyi/llms.txt
> Use this file to discover all available pages before exploring further.

# Filestats

> OpenTelemetry receiver for Filestats

# Filestats Receiver

![Status](https://img.shields.io/badge/status-beta-yellow)

**Available in:** `contrib`

**Maintainers:** [@atoulme](https://github.com/atoulme)

**Source:** [opentelemetry-collector-contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/filestatsreceiver)

## Supported Telemetry

![Metrics](https://img.shields.io/badge/metrics-beta-green)

## Overview

## Configuration

> **Note:** This receiver was renamed from `filestats` to `file_stats` to match the snake\_case naming convention.
> The deprecated component type `filestats` is still accepted as an alias and will log a deprecation warning.

* `include` (required): The glob path for files to watch
* `collection_interval` (default = `1m`): The interval at which metrics are emitted by this receiver.
* `initial_delay` (default = `1s`): defines how long this receiver waits before starting.

### Example

```
receivers:
  file_stats:
    include: /tmp/files/*
    collection_interval: 10s
    initial_delay: 1s
```

See [documentation.md](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/filestatsreceiver/documentation.md) for a list of the metrics collected.

## Metrics

| Metric Name | Description | Unit | Type | Attributes |
| - | - | - | - | - |
| ❌ `file.atime` | Elapsed time since last access of the file or folder, in seconds since Epoch. | s | UpDownCounter | |
| ❌ `file.count` | The number of files matched | \{file} | Gauge | file.include |
| ❌ `file.ctime` | Elapsed time since the last change of the file or folder, in seconds since Epoch. In addition to `file.mtime`, this metric tracks metadata changes such as permissions or renaming the file. | s | UpDownCounter | file.permissions |
| ✅ `file.mtime` | Elapsed time since the last modification of the file or folder, in seconds since Epoch. | s | UpDownCounter | |
| ✅ `file.size` | The size of the file or folder, in bytes. | b | Gauge | |

## Attributes

| Attribute Name | Description | Type | Values |
| - | - | - | - |
| `file.include` | The glob pattern configured via the `include` option that produced this count. | string | |
| `file.permissions` | the permissions associated with the file, using an octal format. | string | |

## Resource Attributes

| Attribute Name | Description | Type | Enabled |
| - | - | - | - |
| `file.name` | The name of the file | string | ✅ |
| `file.path` | The absolute path of the file | string | ❌ |

***

*Last generated: 2026-10-05*
