Skip to content

Horizon not collecting metrics #648

@halloei

Description

@halloei

This library supports Horizon, however, I can't get it working entirely. The queue jobs are processed, but Horizon is not showing any metrics:

Image

For example, the "Jobs Past Hour" counter (red circle) does not increase. And no jobs are shown under /horizon/jobs/completed. Only the "Jobs" amount (green circle) briefly displays the current number.

Please find my configuration below. If I switch it to Redis it works perfectly fine.

config/horizon.php:

return [
    // ...

    'defaults' => [
        'supervisor-1' => [
            'connection' => 'rabbitmq',
            // ...
        ],
    ],

    'environments' => [
        'local' => [
            'supervisor-1' => [
                'maxProcesses' => 3,
            ],
        ],
    ],
];

config/queue.php:

return [
    'default' => 'rabbitmq',

    'connections' => [
        'rabbitmq' => [
            'driver' => 'rabbitmq',
            'hosts' => [
                // ...
            ],
            'worker' => 'horizon',
        ],
    ],

    // ...
];

Running php artisan horizon (instead of php artisan queue:work or php artisan rabbitmq:consume) is correct when using Horizon, isn't it? This is not 100 % clear after reading the docs.
What am I missing? I am using v14.4.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions