Reports

You get the platform’s reports as dashboards in Apache Superset. People who use the portal see twelve of them on the portal’s System reports pages. Administrators open all of them in Superset itself, at https://<SUPERSET_DOMAIN>:8094.

What you do here

This section lists what the reports give you, and the tasks on this page.

What you get:

  • 28 dashboards, with 97 charts, installed by default. See The dashboards, installed by default.

  • Twelve of them shown inside the portal, on the System reports pages.

  • Scheduled reports and alerts, sent by Superset.

What you do here:

  • Add Superset to an installation.

  • Tell Superset which databases to read.

  • Open Superset and sign in.

  • Fix a report that does not show.

Apache Superset draws the platform’s dashboards. Deployment Manager installs it as the reporting preset. The preset is six containers on one host. That host can be any host of the installation. The containers read the FTACS database and ClickHouse. Of the six, only superset-nginx publishes ports. It publishes them on every network interface of its server, so the firewall decides who can reach them.

To add reports to an installation:

  1. When you build the topology, choose the reporting preset under Presets. See Step 1. Choose a topology.

  2. On the Variables step, click Change in Plan and pick the Superset version in Plan: versions. See The Superset version.

  3. Fill in the database connections, or leave them empty. See The databases it reads.

  4. Deploy the installation.

  5. Open https://<SUPERSET_DOMAIN>:8094 and sign in with SUPERSET_USERNAME and SUPERSET_PASSWORD. See Signing in to Superset as administrator.

The Superset version

This section explains where the Superset image comes from and how you pick its version.

Superset is the image hub.friendly-tech.com/analytics/superset. The SuperSet repository builds it. CI/CD Manager releases it. Superset has its own version and its own build. It does not use the FTACS version.

  • The first release is version 1.0.0, build 0.0.1. Its tag is v1.0.0-b0.0.1.

  • A QA build has a tag like dev_0.0.1.

You pick the version in Plan: versions. Open it with Change in Plan on the Variables step. If you pick a release in Fill versions from a release, Deployment Manager fills the Superset version. The worker (superset-worker) and the scheduler (superset-beat) follow the Superset version. You do not set them.

The dashboards are inside the image. You do not download or copy any dashboard file.

Superset is needed from FTACS 7.1.3

This section explains the rule for FTACS 7.1.3 and later.

An installation that runs FTACS 7.1.3 or later must have the Superset stack. The stack is six containers: superset, superset-db, superset-redis, superset-worker, superset-beat and superset-nginx. All six must be on a server of the topology.

  • On step 3 (Variables), a tile named Needs Superset warns you first. It says that the installation cannot be downloaded or deployed until the topology places the Reporting stack.

  • In the Topology Builder, a note under the name says: "If you plan to install 7.1.3 or later, include Superset (the Reporting stack): it is required from 7.1.3." You can still save the topology.

  • If the topology has no Superset, Deployment Manager refuses to create the bundle. The deploy panel shows the title "Superset is needed from 7.1.3". It also shows the sentence from the server. It says that the topology does not place the Superset stack. It says that nothing was generated and nothing was sent to any server.

To fix it:

  1. In the tile, press Choose another topology. Or press Edit topology (name).

  2. If you open an installation that is already saved, save it first. The tile says: "Save this installation first, then edit topology (name); your changes here are not kept when you leave."

  3. In the topology, add the reporting preset to one server.

  4. Deploy the installation again.

The topology is shared. Other installations use it too. Copy the topology first if they must stay without Superset.

What the reporting preset installs

This section lists the containers of the preset and what each one does.

Container What it does

superset

The web application. It reads the reports and renders them. It is the only container an operator ever opens.

superset-worker

Runs the scheduled reports and alerts. It also runs the asynchronous SQL Lab queries.

superset-beat

The clock that puts scheduled reports on the queue. Exactly one runs. Two would put every report on the queue twice. The recipient would then get each report twice, with nothing to explain it.

superset-db

Superset’s own PostgreSQL. It holds dashboards, users, saved queries and alert state. It is not the product database. It is not shared with the Postgres of any other service.

superset-redis

The queue between the application and the worker. It holds nothing durable.

superset-nginx

The only one of the six that is published. It serves the admin port. It also serves the port the portal servers use to reach Superset. Everything else is reached only inside the installation.

All six run on ONE host. They find each other by name on a Docker bridge network. A bridge network does not cross machines. For this reason the topology builder keeps them together and does not let you split them.

A seventh container, superset-embed-proxy, runs on every server that runs the portal. Nobody adds it. The installation places it there whenever Superset is installed. The topology builder does not offer it.

Reaching Superset: addresses and containers

This section explains who opens Superset, on which address, and through which containers.

The installation deploys everything below. You do not install nginx on either server. You do not copy a certificate. You edit nothing in /etc. It does not matter which server runs Superset’s six containers. It can be a server of their own, or the same server as the portal.

Who Opens Goes through

People using the portal (embedded dashboards)

https://<portal name>:4443

superset-embed-proxy on the portal server, then superset-nginx.

UI Backend itself (sign-in and guest tokens)

SUPERSET_INTERNAL_URL, never the portal’s public name

superset-nginx directly when Superset runs on UI Backend’s server. Otherwise superset-embed-proxy on UI Backend’s server. The proxy forwards over the pinned TLS hop.

Administrators

https://<SUPERSET_DOMAIN>:8094

superset-nginx on Superset’s server, directly.

<portal name> is the name the browser uses for the portal. It is FT_UI_HOST if that was set. Otherwise it is the load balancer in front of the portal servers. Otherwise it is the portal server’s own name. DM fills in SUPERSET_URL with that address on port 4443. UI Backend gives this address to the browser.

UI Backend does not use that address for its own calls to Superset. There are two reasons. First, a container often cannot reach the public name of its own server. The firewall or NAT does not route a server back to itself. Second, the container would have to trust the portal’s certificate. So DM sets SUPERSET_INTERNAL_URL in UI Backend’s compose file, per server:

  • http://superset-nginx:80 when Superset runs on that server.

  • http://superset-embed-proxy:8080 when only the portal runs there. This is an internal port of the proxy. It is not published. It forwards to Superset’s server over the same pinned TLS as the browser’s traffic.

  • On a server with neither, the variable is left unset. UI Backend then uses SUPERSET_URL.

A value set in the server’s .env wins. UI Backend images from before SUPERSET_INTERNAL_URL support ignore it. They keep calling SUPERSET_URL.

If the installation has no portal, there is no proxy. SUPERSET_URL is then Superset’s own name on the admin port. The customer may publish the route under other names. In that case you can still type both SUPERSET_URL and SUPERSET_EMBED_ORIGINS on the Superset card.

The two hops

This section explains how traffic goes from the portal server to Superset.

superset-embed-proxy serves port 4443 with the portal’s own certificate. These are the files in portals/ssl, the same ones the portal uses for its HTTPS port. So a browser that accepted the portal also accepts the dashboards. From there:

Portal server is The proxy reaches Superset on

Superset’s server

http://superset-nginx:80, on that server’s Docker network. Nothing else is published for it.

Another machine

https://<Superset’s server>:8096 (SUPERSET_EMBED_UPSTREAM_PORT). superset-nginx publishes this port only in this case. The proxy trusts exactly one certificate there. This is the certificate that superset-nginx ships in superset/ssl. So the hop works on an IP address. It needs no public certificate authority. The proxy refuses any other certificate on that port.

Portals behind a load balancer get one proxy on each portal server.

Superset’s server name must resolve from the portal server by DNS. It can also be an IP address. The reason: the proxy asks Docker’s resolver, and Docker’s resolver does not read the host’s /etc/hosts.

Under the customer’s certificate, the administrator page on 8094 shows the customer’s certificate. The hop on 8096 and inside the Docker network keeps the certificate in superset/ssl. A new installation gets its own hop certificate from DM, valid for 20 years. See Use the customer’s certificate.

Do not replace superset/ssl/upstream.crt on Superset’s server. The portal servers trust that exact certificate. A different certificate, even for the same name, turns every embedded dashboard into a 502.

Firewall ports for Superset

This section lists the ports to open on each server.

Server Inbound port Allow

Superset’s server

8094 (SUPERSET_ADMIN_PORT)

Administrators' addresses only

Superset’s server

8096 (SUPERSET_EMBED_UPSTREAM_PORT)

The portal servers ONLY. Published only when they are other machines

Portal servers

4443 (SUPERSET_EMBED_PROXY_PORT)

The people who use the portal

To use other ports, change SUPERSET_ADMIN_PORT and SUPERSET_EMBED_UPSTREAM_PORT on the Variables step, in the Superset card, group Network. Then deploy again.

Superset, its database and Redis are never published. Users never reach Superset’s server directly. That is the purpose of the second hop.

The installation guide serves administrators on 8090. This installation uses 8094. The reason: ft-system-metrics publishes SYSTEM_METRICS_PORT (8090) on every interface. On an all-in-one server, two containers cannot publish the same port. Port 8096 avoids 8095, which the alert configuration UI of the monitoring stack uses. Whatever values the ports have, open them as the table says.

Do not apply the daemon.json from the older standalone Superset guide. It changes the Docker daemon’s networking for every container on the machine, not only for Superset. On a host that already runs the platform, this changes services that nobody asked about. The goal of that file was to limit what is reachable. Publishing only what has to be reachable does the same. The installation does that already.

The databases it reads

This section describes the two database connections Superset uses.

Superset does not own the product data. It queries it. There are two connections. You answer both at install time.

Variable Meaning

SUPERSET_FTACS_DB_TYPE

mysql or oracle. It chooses the SQL dialect the shipped dashboards are written for. DM fills it in from this installation’s own database. This includes a database the customer runs. The wizard shows the value already selected. Change it only when the reports read another database.

SUPERSET_FTACS_DB_HOST and …​_PORT, …​_NAME, …​_USER

Where the FTACS database is, as Superset’s server reaches it. Leave them empty when the database is part of this installation. This is true whether the database runs on Superset’s server or on another one. Superset then uses that database and the reporting account it creates. Fill them in only for a database the customer runs.

SUPERSET_CH_HOST, …​_PORT, …​_DB, …​_USER

ClickHouse, for the QoE dashboards. Empty means this installation’s ClickHouse, wherever it runs. Superset reads it as superset_read.

The passwords for both are asked once. They are asked on the database’s own screen, not on Superset’s screen, because the database creates those accounts. The passwords are SUPERSET_MYSQL_PASSWORD (or SUPERSET_ORACLE_PASSWORD) and SUPERSET_CH_PASSWORD. Both accounts are read-only. The FTACS account has SELECT on the FTACS schema and on two tables of the OneIoT schema. See The two OneIoT tables. The ClickHouse account, superset_read, uses ClickHouse’s read-only profile: it can read, but it cannot write. A reporting tool that can write can also lose the data it reports on. For a database the customer runs, the same passwords are asked on Superset’s screen instead. This happens once the host is filled in.

The two OneIoT tables

The reporting account can read the FTACS schema. It can also read exactly two tables of the OneIoT (iotw) schema:

  • iotw_user_activity_log

  • activity_log_updates

The portal’s User activity page uses these two tables. The account cannot read anything else in iotw. The account cannot write.

UI Backend creates the two tables when it first starts. Deploy grants the access after the containers of the server are healthy.

If the tables are not there yet, deploy prints a WARN line that names them. This happens when UI Backend runs on another server, or when UI Backend has not started. To fix it, follow these steps:

  1. Wait until UI Backend has started.

  2. Run deploy again on the database server.

The name of the iotw schema depends on the database. For MySQL it is MYSQL_SCHEMA_IOTW, which comes from northbound-api. For Oracle it is ORACLE_USER_IOTW, which is an answer of the Oracle service. This is the account that owns the iotw schema. If the database rules do not allow the name, deploy refuses it and prints a WARN line. Correct the value in the .env file of that server, then run deploy again.

Superset on a server of its own

This section explains what happens when Superset and the databases are on different servers of one installation.

You fill in nothing extra when the database or ClickHouse is on another server of the same installation. The bundle for Superset’s server carries:

  • the database server’s name and its published port. This is DB_PORT for the database (3306 for MySQL, 1501 for Oracle unless changed) and CH_HTTP_PORT for ClickHouse (8123). On one server, Superset uses the container names and their own ports instead (mysql:3306, oracle:1521, clickhouse:8123).

  • the FTACS schema (MySQL) or service name (Oracle), and the ClickHouse database, as those services are configured.

  • the names of the reporting accounts.

  • the reporting passwords. The Deploy form asks for them once and writes them on both servers.

These values arrive under their own names (SUPERSET_MYSQL_ADDRESS, SUPERSET_ORACLE_ADDRESS, SUPERSET_CH_ADDRESS and similar). The wizard does not show them. If you fill in the fields above, the fields win over these values.

The route itself is the customer’s network. Superset’s server must reach the database server on that published port. It must reach ClickHouse on 8123. The install does not detect a firewall that closes either port. The connection is created anyway. The charts of those dashboards then show a database error instead of data. The connection ready line in the superset log shows the address each connection got (password masked).

The accounts are created when the database is deployed. Every later deploy checks them again. This matters when you add Superset to an existing installation. A database runs its initialisation scripts only once, against an empty data directory. So an account added later would never appear. For this reason the deploy runs the one script that creates the account again. That script is safe to run any number of times.

Embedding dashboards in the portal

This section explains how Superset dashboards appear inside the portal.

UI Backend can show Superset dashboards inside the portal. When Superset is installed together with UI Backend, you fill in nothing. The address, the account and its password come from the Superset installation itself. UI Backend’s own three fields are not asked. They appear again if Superset is not part of the installation. You can still point the portal at a Superset that runs somewhere else.

Which portals may embed

The browser allows the embedding only for the origins in SUPERSET_EMBED_ORIGINS. DM fills it in from the portal with three addresses: the portal’s HTTPS address (https://<portal name>:<FT_UI_HTTPS_PORT>), its HTTP address (http://<portal name>:<FT_UI_HTTP_PORT>) and its address on the embed port (https://<portal name>:4443). Add any other address people use to open the portal. Separate the addresses with commas. If the installation has no portal, the variable stays empty. Then only Superset itself may frame its dashboards.

Write each address as an exact origin: scheme://host or scheme://host:port. The scheme is http or https. Do not add a path, a space, a quote or ;. Do not write *. Do not write a scheme alone, such as https:.

Superset drops every other value. The superset log shows one line for each dropped value. The line looks like this: SUPERSET_EMBED_ORIGINS: '*' ignored; list each portal origin as scheme://host[:port]. The other values still work.

DM also tells you about a dropped value before you install. The message names the value. It names at most 5 values. It counts the rest. You see it on the Secrets, Install steps, Deploy and Download screens. Fix the value before you continue.

Superset ignores letter case in a value. It also ignores one / at the end. So https://Portal:4443/ works.

A portal can be opened over HTTP, for example on port 8880. What it can show depends on the scheme:

Portal opens over What it can show

HTTPS

The report pages and the Superset console, as before.

HTTP

The report pages only. The Superset console cannot be opened inside it.

Use HTTPS for the portal if people must open the Superset console inside it.

The embedded reports do not use the Superset session. They use a guest token. The session cookie is SameSite=Lax. A portal on another site does not send the cookie to Superset, and the reports still work.

The guest token key

Superset signs each guest token with a key. DM derives this key from the installation’s SUPERSET_SECRET_KEY. Superset never uses its public default key. The key is different from SUPERSET_SECRET_KEY itself.

If you change SUPERSET_SECRET_KEY, the key changes. Guest tokens already issued stop working. The portal pages load new tokens when they reload.

The guest role

A report inside the portal does not use the Gamma role. It uses a role of its own, named EmbeddedGuest. The role has four read permissions. They are enough to show one embedded dashboard. A guest cannot list or read other dashboards, charts or datasets.

Superset creates EmbeddedGuest again on every start. If someone edits the role in Superset, the next start undoes the edit. Do not edit it. If the role does not exist yet, the reports in the portal fail. They do not use another role.

The dashboards, installed by default

This section explains how the shipped dashboards get into Superset.

You do not import anything by hand. The dashboards ship inside the Superset image. The superset container imports them every time it starts, after its own setup. It also prepares the portal’s System reports pages. The container log shows this in [dashboards] lines. One line says how many dashboards are in Superset (in_superset=). The last line says how many reports are embedded (embedded reports=).

What it does, in order:

  1. Creates the two database connections the dashboards read, FTACS and ClickHouse. It uses the installation’s variables (see the table above). Superset stores the reporting passwords in its metadata, encrypted with SUPERSET_SECRET_KEY. They are never in the connection address. The bundle never supplies a connection. A later deploy with different variables updates a connection, but only while the connection is still as the installation created it. Once someone edits it in Superset, it belongs to them. No restart or deploy changes it again. If a connection cannot be set up, Superset imports no dashboards on that start. The next start tries again. The log shows dashboards not imported: a database connection could not be set up.

  2. Imports the dashboards, charts and datasets from the image, with overwrite. The shipped version replaces what is in Superset. A layout someone changed does not survive a restart. A dashboard that an administrator deleted comes back. The import leaves out the dashboards in What the dashboards need, and what is not shipped.

  3. Embeds the twelve System reports dashboards for the portal. Each one gets a fixed identifier: the dashboard’s own UUID from the bundle. Each one is allowed for the origins in SUPERSET_EMBED_ORIGINS. Because the identifier is fixed, UI Backend’s System reports settings can use it as their default. If SUPERSET_EMBED_ORIGINS is empty, nothing is embedded. The reason: an empty list would let any site embed.

If a step fails, the log says [init] ERROR the dashboards are not fully installed. Superset starts anyway, so you can fix the connection in its screens. The next restart tries again.

Every start of superset imports the dashboards again, and it overwrites. A dashboard, chart or dataset that someone edited inside Superset goes back to the shipped version at the next restart. If a customer wants to change a dashboard, save the change under a new name. Superset does not touch a dashboard with a new name.

System reports page Dashboard

Devices distribution

Devices distribution report

Devices registration

Devices registration report

Deleted devices

Deleted devices

Online devices

Onlne devices

Offline devices

Offline devices

Automation

Automations

User activity

User activity

Group update

Group update

Inventory

Inventory

Firmware versions

Firmware versions report

Software modules

Software modules

FCC

FCC diagnostic

The Support Center’s Sessions page has no installed dashboard. The Sessions dashboard is not shipped. It says "The identifier is not set" until someone chooses one in its settings.

To get a newer dashboard, use a newer Superset version and restart superset. You do not need any other step.

The mapping itself is in one file, superset/dashboards/EMBEDDED.txt.

The deploy writes the identifiers. After the services are up, deploy.sh sets every System reports identifier that is still empty. It does this through UI Backend’s settings API, from ui-backend/dashboard-ids.txt. It does this on new and existing installations alike. It does not change an identifier that someone already chose in the portal’s interface settings. The deploy log names any identifier it could not set. You can enter those by hand in the portal’s interface settings, group System reports.

What the dashboards need, and what is not shipped

This section lists what is installed and which dashboards are left out.

The image carries 36 dashboards. Superset installs 28 of them, with 97 charts and 83 datasets. The file superset/dashboards/EXCLUDED.txt lists the eight it leaves out.

Five Wi-Fi dashboards read database views that no FTACS version creates. These are wifi_band_view, wifi_standard_view and wifi_security_view. Someone made them by hand on the demo server of the export. If Superset installed these dashboards, a tile would show a database error. The five dashboards are:

  • WI-FI Access Point Overview

  • WiFi Bands

  • WiFi Device Attributes

  • WiFi Sevcurity

  • WiFi Standards

They come back when the product creates the three views.

Three dashboards have a layout that points at charts missing from the bundle. Each missing chart would show an empty frame. The three dashboards are:

  • Current QoE Analysis

  • Network Performance

  • Sessions

They come back when the bundle is fixed. None of the eight is used by a System reports page.

Oracle installations

The SQL of the dashboards follows the installation’s database, MySQL or Oracle, by itself. You choose nothing.

The Superset reports are written for MySQL. On an Oracle FTACS, most of them fail. In the portal, only three System reports pages work:

  • Deleted devices

  • Devices registration

  • Online devices

The other pages show errors until the reports are ported to Oracle.

Deployment Manager warns you about this on these steps: Secrets, Install steps, Deploy and Download. The warning names the server. You can still install. Superset installs and runs.

Signing in to Superset as administrator

This section explains the Superset administrator account.

The administrator account is created on first start from SUPERSET_USERNAME and SUPERSET_PASSWORD. If you later change the password in the installation’s variables, it does not change in Superset. By then the account already exists. To change the password, change it inside Superset. This also means a restart does not silently undo a password that was changed in Superset.

When Superset or a report shows a problem

This section lists common symptoms of Superset and of the reports in the portal, and what they mean.

What you see What it means

On a first install, Superset opens but the dashboards are not there yet

The dashboards need MySQL and ClickHouse. On a first install they start later than Superset. Superset opens at once. It imports the dashboards by itself when both databases run. Wait. The deploy does not fail because of this.

Three containers restart forever, the other three are up

superset, superset-worker and superset-beat all load the same application, so they fail together. Look at the log of superset. The other two repeat its error. The usual cause is that the metadata database is not reachable yet. The installation waits for it, so a failure that does not stop is a real one.

A chart shows a database error instead of data

The account Superset reads with cannot see that table. Check that the reporting account exists in the product database. Check that SUPERSET_FTACS_DB_* point at the right database. If someone edited the FTACS connection in Superset, it no longer follows those variables. Correct it in Superset.

The portal’s System reports page says "The identifier is not set"

UI Backend has no dashboard identifier for that page. If UI Backend on this installation started before this release, enter the identifier from superset/dashboards/EMBEDDED.txt. Otherwise look for [dashboards] errors in the log of superset.

Dashboards load, scheduled reports never arrive

The problem is the worker and beat, not the application. Both must be running. Beat puts reports on the queue. The worker delivers them.

The portal shows an empty frame where a dashboard should be

The browser refused the embedding. The portal’s origin must be listed in SUPERSET_EMBED_ORIGINS exactly as the browser sees it. Include the scheme and the port.

The frame says the address cannot be reached, or ./smoke.sh on UI Backend’s server reports that nothing answered

superset-embed-proxy is not running on the portal server (run docker ps there). Or a firewall closes 4443 to the portal’s users.

The smoke check reports that the proxy answered 502

The proxy is up, but superset-nginx did not answer it. There are four possible causes. The container is down on Superset’s server. Or that server’s firewall does not allow the portal server on 8096. Or its name does not resolve by DNS from the portal server. Or someone replaced superset/ssl/upstream.crt there. The proxy’s log says which one (docker logs <installation>_superset-embed-proxy). If the installation has Short container names on, the container is superset-embed-proxy.

The smoke check reports the portal certificate does not name the host in SUPERSET_URL

The certificate in portals/ssl is issued for another name. A typical case is an installation opened by IP, with a certificate that has no IP in it. Browsers refuse it in the same way. Install a certificate issued for the address people open. A certificate can carry an IP address.

The smoke check reports UI Backend does not trust the certificate served there

UI Backend trusts the portal certificate of the bundle (portals/ssl/friendly.crt when the portal runs on its server). The proxy serves a different one. This happens when someone replaced the certificate on one server only.