Project

General

Profile

User story #9976

API endpoint to get information about queue status of uploaded inventories

Added by François ARMAND 11 months ago. Updated 10 months ago.

Status:
Released
Priority:
3
Category:
Web - Nodes & inventories
Target version:
Target version (plugin):
Suggestion strength:
User visibility:
Effort required:

Description

We would like to add a new api endpoint for the inventory application spec as follow:

GET /api/info

And answer:

- if the queue is not saturated: HTTP status 200 ok

{
  "queueMaxSize": 200,
  "queueFillCount": 89,
  "queueSaturated": false
}

- if the queue is saturated: HTTP status 429 too many requests

{
  "queueMaxSize": 200,
  "queueFillCount": 200,
  "queueSaturated": true
}

Subtasks

Architecture #10005: Add documentation about inventory upload on root serverReleasedAlexis MOUSSET

Bug #10047: "Inventory workflow, from nodes to Root server" should be in Reference, not troubleshootingReleasedAlexis MOUSSET


Related issues

Related to Rudder - Bug #11330: Inventory endpoint info api is reporting saturated off by one Released

Associated revisions

Revision 04bb01d7
Added by François ARMAND 11 months ago

Fixes #9976: API endpoint to get information about queue status of uploaded inventories

History

#1 Updated by François ARMAND 11 months ago

  • Status changed from New to In progress
  • Assignee set to François ARMAND

#2 Updated by François ARMAND 11 months ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from François ARMAND to Vincent MEMBRÉ
  • Pull Request set to https://github.com/Normation/ldap-inventory/pull/97

#3 Updated by François ARMAND 11 months ago

Vincent let me remark that there is no reason to send queueMaxSize/queueFillCount as string in place of number, and queueSaturated as string in place of boolean.

So I will change answer format to:

{
  "queueMaxSize": 200,
  "queueFillCount": 200,
  "queueSaturated": true
}

#4 Updated by François ARMAND 11 months ago

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100

#5 Updated by François ARMAND 11 months ago

  • Description updated (diff)
  • % Done changed from 100 to 0

Updating the description to set on the top the real output format.

For the record, it was initially wrongly described as:

{
  "queueMaxSize": "200",
  "queueFillCount": "200",
  "queueSaturated": "true" 
}

#6 Updated by Vincent MEMBRÉ 10 months ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 3.1.18, 3.2.11, 4.0.3 and 4.1.0~beta3 which were released today.

#7 Updated by Janos Mattyasovszky 3 months ago

  • Related to Bug #11330: Inventory endpoint info api is reporting saturated off by one added

Also available in: Atom PDF