Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bills Module get_bill broken when used with period=previous #15980

Open
ObjectiveWriter opened this issue Apr 25, 2024 · 0 comments
Open

Bills Module get_bill broken when used with period=previous #15980

ObjectiveWriter opened this issue Apr 25, 2024 · 0 comments

Comments

@ObjectiveWriter
Copy link

The problem

According to the docs one can request the last period for a bill (by id) by sending a request to: /api/v0/bills/:id?period=previous

However no useful data is returned.


curl -H 'X-Auth-Token: -removed-' 'http:/192.168.1.244/api/v0/bills/5?period=previous'
{
    "status": "ok",
    "bills": [],
    "count": 0
}

However the API appears to be somewhat working, as the "history" can be requested.


 curl -H 'X-Auth-Token: -removed-' 'http:/192.168.1.244/api/v0/bills/5/history'
{
    "status": "ok",
    "bill_history": [
        {
            "bill_hist_id": 24,
            "bill_id": 5,
            "updated": "2024-04-25 15:01:01",
......

On the testing setup we have various different historic bills for the bill-id5, so there is data of more than one complete billing period.

Any advice would be apreciated.

Output of ./validate.php

./validate.php
===========================================
Component | Version
--------- | -------
LibreNMS  | 24.4.1 (2024-04-20T14:26:51+00:00)
DB Schema | 2024_04_10_093513_remove_device_perf (291)
PHP       | 8.2.8
Python    | 3.11.2
Database  | MariaDB 10.11.3-MariaDB-1
RRDTool   | 1.7.2
SNMP      | 5.9.3
===========================================

[OK]    Composer Version: 2.7.4
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[OK]    Database Schema is current
[OK]    SQL Server meets minimum requirements
[OK]    lower_case_table_names is enabled
[OK]    MySQL engine is optimal
[OK]    Database and column collations are correct
[OK]    Database schema correct
[OK]    MySQL and PHP time match
[OK]    Active pollers found
[OK]    Dispatcher Service not detected
[OK]    Locks are functional
[OK]    Python poller wrapper is polling
[OK]    Redis is unavailable
[OK]    rrd_dir is writable
[OK]    rrdtool version ok

What was the last working version of LibreNMS?

No response

Anything in the logs that might be useful for us?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant