Status to InfluxDB

This Wiki Page describes how to use our SDK functionality to monitor current status value into external Database(influxdb). It allows you to get more connectivtiy into you network infrastructor. This can be used for all netmodule routers.


  • NetModule Wireless Router with any WAN connection
  • NRSW or newer
  • Not available for legacy products NB1600, NB2700, NB3700, NB3710


Netmodule routers provide several service status values via cli. We are going to send those informations to the external influxdb. For this usecase we want to use the REST-API and the line protocol by influxdb. Our SDK functionality has different kind of netmodule specific functions to do HTTP request. The status value can attached to the HEADER of the HTTP request and going to get send via TLS/SSL connection to the database.

SDK scripting

All information about SDK can be found here


InfluxDB is an opensource database software, which gives you multiple opperunitys to visual, monitoring, retrieval of time series data, recording performance metrics, analytics or simplely storage data for any other applications. It has different kind of state of the art interfaces and is fully integrated into python for example. You can easily register at to get a free userspace/cloud for your needs. It is required for this HowTo to have a account. This contains no additional cost at all.


All guiding pictures are .gif and will show you the following steps. You need to click them twice to start the .gif


1. Bucket

Once you have created an account login and created a new data bucket

2. API Access Token

Generate a “all access api token” to write data to the bucket. Once you have seen the API token, you have option to see the token again. Please save the token may in your password manager.


For the last step you need your Organisation ID and bring all other information into a specific URL.

You can find your OrgID here:

Netmodule router

1. Allow https connections

To send the data via TLS/SSL we need to add the domian certifcate to the netmodule router. Therefor you need to upload the Root CA R3 chain from the influxdb SSL Certificate. You can easily download the cert chain with the following steps:

Then login to your netmodule router WEB UI and upload the cert chain under SYSTEM –> Keys & Certificates –> Authorities.

2. SDK job

For the final step you need to define the SDK Job as followed:

Timebased trigger periodically every 1min.

upload the the script below with you URL and API

Select trigger and script and define the sdk job.

status2influx script

*/ DESC: This script is sendinf the current cli WWAN infos to a external InfluxDB
*  created by [TD] 24.9.2023
*  Copyright (C) (2013-2024) NetModule AG, Switzerland
url = "";
usr = "";
pwd = "";
pp = "";
resp = "response.txt";
status = nb_status("wwan");
stinfo = struct_fields(status);
sn = struct_get(nb_status("system"), "SERIAL_NUMBER");
host = nb_config_get("network.hostname");
data = sprintf("host=%s,sn=%s ", host, sn);
//define header with valid influx API Token
header = "Authorization: Token XansFOeVPLFvPkfGiboGW7RvXwaio1WmjodVklcbtOJPumgqH5KGhIQyHQuMlflL72bWk27liAybzE2EhA3ksQ==";
for (i = 0; i < length(stinfo); i++) {
   // if value is digit
   if (isdigit(struct_get(status, stinfo[i]))) {
      data = strcat(data, sprintf("%s=%s,", stinfo[i], struct_get(status, stinfo[i])));
   } else {
      data = strcat(data, sprintf('%s="%s",', stinfo[i], struct_get(status, stinfo[i])));
len = strlen(data);
data = left(data, len - 1);
// POST request
response = nb_transfer_post(usr, pwd, url, "", data, resp, header, 1);
printf("Exited script with response %d", response);

InfluxDB Dashboard

This section will show you how to create a simple dashboard to monitor the cpu temperature of a the router.