Skip to content

feat(api): health overview endpoint with system & jobs status. Closes #845#856

Merged
regulartim merged 3 commits intointelowlproject:developfrom
drona-gyawali:feat/health
Feb 25, 2026
Merged

feat(api): health overview endpoint with system & jobs status. Closes #845#856
regulartim merged 3 commits intointelowlproject:developfrom
drona-gyawali:feat/health

Conversation

@drona-gyawali
Copy link
Copy Markdown
Contributor

@drona-gyawali drona-gyawali commented Feb 21, 2026

Description

This PR adds a new /health/overview API endpoint that provides a consolidated overview of the system status and key observables . It is accessible only to admin users.

Features

  • Reports system status including:
    • Database connectivity (up / down / degraded)
    • Django-Q cluster status (up / idle / down)
    • Elasticsearch cluster status (up / down / not configured)
    • System uptime in seconds
  • Aggregates overview data:
    • IOC counts (total and new in last 24h)
    • Cowrie session counts (total and last 24h)
    • Honeypots (total and active)
    • Threat lists (FireHol, Mass Scanners, Tor exit nodes)
    • Django-Q jobs (scheduled, failed last 24h, successful last 24h)

API Response

{
  "system": {
    "uptime_seconds": 580,
    "database": "up",
    "qcluster": "up",
    "elasticsearch": "up"
  },
  "overview": {
    "iocs": {
      "total": 0,
      "new_last_24h": 0
    },
    "sessions": {
      "total": 0,
      "last_24h": 0
    },
    "honeypots": {
      "total": 7,
      "active": 1
    },
    "threat_lists": {
      "firehol": 0,
      "mass_scanners": 0,
      "tor_exit_nodes": 0
    },
    "jobs": {
      "scheduled": 9,
      "failed_last_24h": 0,
      "successful_last_24h": 16
    }
  }
}

Related issues

closes: #845

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).

Checklist

  • I have read and understood the rules about how to Contribute to this project.
  • The pull request is for the branch develop.
  • I have added documentation of the new features.
  • Linter (Ruff) gave 0 errors. If you have correctly installed pre-commit, it does these checks and adjustments on your behalf.
  • I have added tests for the feature/bug I solved. All the tests (new and old ones) gave 0 errors.
  • If changes were made to an existing model/serializer/view, the docs were updated and regenerated (check CONTRIBUTE.md).
  • If the GUI has been modified:
    • I have a provided a screenshot of the result in the PR.
    • I have created new frontend tests for the new component or updated existing ones.

Important Rules

  • If you miss to compile the Checklist properly, your PR won't be reviewed by the maintainers.
  • If your changes decrease the overall tests coverage (you will know after the Codecov CI job is done), you should add the required tests to fix the problem
  • Everytime you make changes to the PR and you think the work is done, you should explicitly ask for a review. After being reviewed and received a "change request", you should explicitly ask for a review again once you have made the requested changes.

@drona-gyawali drona-gyawali marked this pull request as ready for review February 21, 2026 13:57
Copy link
Copy Markdown
Collaborator

@regulartim regulartim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks solid! 👍

Could you please add test cases that cover cover degraded/down states? Also, the ES health check logic is completely untested.

Signed-off-by: Drona Raj Gyawali <dronarajgyawali@gmail.com>
Copy link
Copy Markdown
Collaborator

@regulartim regulartim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few details left. Would you also write documentation in the docs repo?

Signed-off-by: Drona Raj Gyawali <dronarajgyawali@gmail.com>
Copy link
Copy Markdown
Collaborator

@regulartim regulartim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job! 👍

@regulartim regulartim merged commit 08a638f into intelowlproject:develop Feb 25, 2026
4 checks passed
@drona-gyawali
Copy link
Copy Markdown
Contributor Author

Good job! 👍

I'm really glad you liked it. Thanks for the guidance

@drona-gyawali drona-gyawali deleted the feat/health branch February 25, 2026 08:41
@regulartim
Copy link
Copy Markdown
Collaborator

Your welcome! :) Could you also update the "Usage" docs in the docs repo? Maybe add a comment that this API will only available on versions >= 3.2.0.

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

Successfully merging this pull request may close these issues.

2 participants