TrueNAS App: HTTP Bridge

A Dockerised HTTP bridge application for TrueNAS environments.

Github repo

Find it here.

Introduction

What does that mean? Since the TrueNAS team moved their API to use websockets (and not HTTP REST), being able to query the API from a client that doesn’t speak websockets isn’t possible.

A good example of this is polling a SCALE system from Zabbix.

This app is a long-running daemon that connects (and stays connected) to a SCALE system, and listens on a chosen port to serve “classic” HTTP GET/POST queries, acting as a HTTP-to-websockets bridge.

Features

  • Easy deployment with Docker Compose on TrueNAS via a custom app
  • Uses a Python Fast API app to stay persistently connected to TrueNAS (minimising audit entries)
1 Like

Hey @awalkerix,

Is the only way to get interface stats is to use reporting.netdata_get_data?

I’m confused with the inconsistencies… for example, one can get load averages via system.info easily, same for pool use; but one has to first query reporting.netdata_graphs to find interfaces, and then call reporting.netdata_get_data for each, looking at aggregations

The API doco indicates that the name param is required, identifier is not… but when omitting identifier, all I get back is a mostly null skeleton (as below), when I’d expect all interfaces?

[
  {
    "name": "interface",
    "identifier": "interface",
    "data": [],
    "aggregations": {
      "min": {},
      "mean": {},
      "max": {}
    },
    "start": 1752639770,
    "end": 1752639830,
    "legend": [
      "time",
      "received",
      "sent"
    ]
  }
]