InfluxDB Exporter

InfluxDB Exporter is a NINA plugin that transmits periodic hardware, guiding, and image metrics to an InfluxDB time-series database. From there, the metrics may be graphed using tools such as Grafana or InfluxDB’s own built-in graphing features. A time-series database is optimized to collect and store temporally-oriented data. This data may be archived indefinitely or ephemerally, depending on the desired use and purpose.

Metrics are provided on the basis of class of equipment and the statistics of each saved image. For equipment, metrics for each class are sent each time N.I.N.A. polls the hardware for its status, which is every two seconds by default. Refer to Options > General > Advanced settings > Device polling interval. This also means that only connected hardware will have statistics transmitted. Certain metrics will also have tags associated with them which can be used in a variety of ways to select and present the data. Tags are kept to a minimum in order to manage cardinality and may be turned on and off on the plugin’s Options screen.

No sequencer instructions are required to operate this plugin as it will always transmit metrics as long as NINA is running and is connected to any relevant equipment. Naturally, a working InfluxDB API key, bucket, and organization are required as well.

Example use of metrics

My system’s Grafana-based dashboard can be found here. It displays live and historic stats from my PlaneWave CDK14-based imaging system. The metrics behind these graphs and displays are sent from NINA via InfluxDB Exporter to an InfluxDB instance. A separate Grafana instance uses that InfluxDB system as a data source to produce the graphs. A few other things are involved, such as MQTT and web API queries for stuff like the Last Target panel. Influx’s Telegraf is used to gather stats on and to monitor the setup’s APC UPS.

Requirements

  • NINA 3.2 (nightly) and later. The requirement for 3.2 stems from this plugin using the same dependencies that other parts of NINA uses, but different versions of them. This can lead to a conflict that prevents the plugin from loading. NINA 3.2 solves this issue by loading each plugin into its own assembly context.
  • InfluxDB 2.x or later.
  • Optional but suggested: Grafana

For small deployments, InfluxDB and Grafana are both available as Docker containers. Refer to their respective sites for installation and administration documentation.

FAQ

List of metrics

The following tables catalog all metrics and tags that are transmitted.

Global tags, applied to all metrics

  • profile_name: The name of the active N.I.N.A. profile
  • host_name: The name of the computer

Astrometric

Metric Definition Type
astro_moon_altitude Moon’s altitude in degrees double
astro_sun_altitude Sun’s altitude in degrees double

Camera

Additional tags:

  • camera_name: The name of the connected canera device
Metric Definition Type
camera_sensor_temperature Sensor temperature in °C double
camera_cooler_power Cooler power level in percent double
camera_battery_level Camera battery charge level integer

Focuser

Additional tags:

  • focuser_name: The name of the connected focuser device
Metric Definition Type
focuser_temperature Focuser’s temperature sensor in °C double
focuser_position Step number/position reported by focuser integer

Guider

Additional tags:

  • guider_name: The name of the connected guiding device
Metric Definition Type
guider_rms_ra_arcsec RA RMS in arcseconds double
guider_rms_dec_arcsec Declination RMS in arcseconds double
guider_rms_arcsec Comined RMS in arcseconds double
guider_rms_ra_pixel RA RMS in pixels double
guider_rms_dec_pixel Declination RMS in pixels double
guider_rms_pixel Combined RMS in pixels double
guider_rms_peak_ra_arcsec RA peak RMS in arcseconds double
guider_rms_peak_dec_arcsec Declination peak RMS in arcseconds double
guider_rms_peak_arcsec Combined peak RMS in arcseconds double
guider_rms_peak_ra_pixel RA peak RMS in arcseconds double
guider_rms_peak_dec_pixel Declination peak RMS in pixels double
guider_rms_peak_pixel Combined peak RMS in pixels double

Mount

Additional tags:

  • mount_name: The name of the connected mount device
Metric Definition Type
mount_altitude Altitude in degrees double
mount_azimuth Azimuth in degrees double

Rotator

Additional tags:

  • rotator_name: The name of the connected rotator device
Metric Definition Type
rotator_mechanical_angle Mecanical angle in degrees double
rotator_angle Sky angle in degrees double

Switches

Additional tags:

  • guider_name: The name of the connected guiding device
Metric Definition Type
switch_ro_sw<ID> Value of gauge (read-only switch) identified by the appended numeric identifier double

Each swtich metric is tagged with the human-readable name associated with the switch’s ID.

Weather

Additional tags:

  • wx_device_name: The name of the connected weather/observing conditions device
Metric Definition Type
wx_cloud_cover Cloud cover in percent double
wx_dewpoint Dewpoint in °C double
wx_humidity Relative humidity in percent double
wx_pressure Air pressure in hectopascals double
wx_rain_rate Rain rate in mm/hour double
wx_sky_brightness Sky brightness in lux double
wx_sky_quality Sky quality in magnitudes/arcsecond<sup>2</sup> double
wx_sky_temperature Sky temperature in °C double
wx_star_fwhm Measured star FWHM double
wx_temperature Ambient air temperature in °C double
wx_wind_direction Wind direction in azimuthal degrees double
wx_wind_gust Wind gust speed in meters/second double
wx_wind_speed Wind speed in meters/second double

Image statistics

Statistics are produced only for images of type LIGHT. Calibration frames and snapshots are not processed. Statistics must be on for many of these metrics to be sent.

Additional tags:

  • image_file_name: Name of the image file associated with these metrics.
  • target_name: Name of the target imaged as defined in the sequencer’s target field. This tag is omitted if no target name is defined.
  • sequence_title: The title or name of the running sequence
  • camera_name: Name of the camera
  • readout_mode: Name of the readout mode the camera is operating under
Metric Definition Type
image_mean Pixel mean value double
image_median Pixel median value double
image_std_deviation Pixel value stardard deviation double
image_mad Pixel value mean average deviation double
image_min_adu Minimum pixel ADU value integer
image_min_adu_count Number of occurences of min. pixel ADU value integer
image_max_adu Maximum pixel ADU value integer
image_max_adu_count Number of occurences of max. pixel ADU value integer
image_hfr Average star HFR double
image_hfr_std_deviation Standard deviation of measured stars’ HFR double
image_star_count Count of stars in the image integer
image_rms_avg_ra_arcsec Average guiding RMS of the RA axis during image exposure double
image_rms_avg_dec_arcsec Average guiding RMS of the declination axis during image exposure double
image_rms_avg_arcsec Combined average RMS during image exposure double
image_rms_peak_ra_arcsec Peak guiding RMS of the RA axis during image exposure double
image_rms_peak_dec_arcsec Peak guiding RMS of the declination axis during image exposure double
image_rms_peak_arcsec Combined peak RMS during image exposure double