You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Execute `php artisan vendor:publish` for publishing config example in your `config` directory
32
33
2. Write your credentials and settings in config. If you don't need some connections or trackers you can delete them.
33
34
35
+
### Prometheus
36
+
37
+
Each instances of your application must have own storage for your metrics. You cannot use shared storage with several replicas of your application. In that case scraping will return metrics for both the current replica and other replicas.
38
+
39
+
You could still use shared storage if you have only one fpm replica.
40
+
41
+
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:
42
+
43
+
- 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
45
+
- Application writes metrics to that local redis instance
46
+
-`database.php` has separated connection to the local instance
47
+
48
+
```php
49
+
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
0 commit comments