Skip to content

Commit beeb089

Browse files
qem19umbr
and
umbr
authored
Fix documentation about new config format (#8)
Co-authored-by: umbr <[email protected]>
1 parent b0a8c1a commit beeb089

File tree

1 file changed

+13
-20
lines changed

1 file changed

+13
-20
lines changed

README.md

+13-20
Original file line numberDiff line numberDiff line change
@@ -41,32 +41,25 @@ You could still use shared storage if you have only one fpm replica.
4141
In distributed systems like Kubernetes probably your application is likely running in multiple instances and in different modes (fpm, horizon). Each of them produces metrics and each of them has to be monitored by Prometheus. The exporter provided by this package will solve mentioned above problem. Correct setup should include:
4242

4343
- Each replica has its own (local) redis instance to store metrics
44-
- Each replica has its own exporter which exposes `/metrics`-endpoint and grabs metrics from the redis instance. The provided exporter is available: ghcr.io/umbrellio/event-tracker/exporter:latest
44+
- Each replica has its own exporter which exposes `/metrics`-endpoint and grabs metrics from the redis instance. The provided exporter is available: [event-tracker/exporter](ghcr.io/umbrellio/event-tracker/exporter:latest)
4545
- Application writes metrics to that local redis instance
46-
- `database.php` has separated connection to the local instance
46+
- `event_tracker.php` config has correct credentials for local redis
4747

4848
```php
4949
return [
50-
...
51-
'redis' => [
52-
...
53-
'metrics' => [
54-
'host' => env('REDIS_METRICS_HOST', '127.0.0.1'),
55-
'port' => env('REDIS_METRICS_PORT', 6379),
56-
'database' => env('REDIS_METRICS_DATABASE', 0),
57-
],
58-
],
59-
];
60-
```
61-
- `event_tracker.php` has the name of this connection
62-
63-
```php
64-
return [
65-
...
50+
'connection' => 'prometheus',
6651
'connections' => [
67-
...
6852
'prometheus' => [
69-
'redis' => 'metrics',
53+
'redis' => [
54+
'client' => env('EVENT_TRACKER_REDIS_CLIENT', 'phpredis'),
55+
'credentials' => [
56+
'host' => env('EVENT_TRACKER_REDIS_HOST', 'localhost'),
57+
'username' => env('EVENT_TRACKER_REDIS_USERNAME', 'redis'),
58+
'password' => env('EVENT_TRACKER_REDIS_PASSWORD'),
59+
'port' => env('EVENT_TRACKER_REDIS_PORT', '6379'),
60+
'database' => env('EVENT_TRACKER_REDIS_DATABASE', 0),
61+
],
62+
],
7063
],
7164
],
7265
];

0 commit comments

Comments
 (0)