Package: promexp
promexpPromexp is a stand-alone service (Windows/Linux), which acts as a simplified replacement of Prometheus node exporter.
Along with basic system metrics, it provides information useful in a broadcast environment.ConfigurationMost of the features should work out of the box, but you may tweak the settings using asettings.jsonfile stored in the same directory as the application. All of the variables are optional.{"host":"localhost","port":8080,"hostname":"thismachinehasanothername","prefix":"system","tags":{"site_name":"TV1"},"provider_settings":{}}Listening addressBy default, the built-in HTTP server listens on all interfaces on port 9731.
When needed, you may override this usinghostandportvariables.HostnameThe software automatically attaches ahostnametag to each published metrics.
You may disable this behavior by setting thehostnamevariable tonullor
override the machine name by setting it to a string value.PrefixBy default, all metric names are prefixed with the stringnebula_.
It is possible to change the prefix by setting theprefixto a string value.
A trailing underscore of the prefix is added automatically.Additional tagsUsing thetagsdictionary, you may specify additional tags to be appended to each metric.
For example to create a server group or specify a client name in a multitenant environment.ProvidersEach provider returns a set of metrics. By default, all providers are enabled, when supported on the platform.
You may explicitly disable a provider by setting its configuration tonull:{"provider_settings":{"nvidia":null,"casparcg":{"host":"10.0.1.15"}}}psutilThis provider returns basic machine metrics such as CPU and RAM usage.NameTypeUnitDescriptionuptime_secondscounterseconds...cpu_usagegaugepercent...memory_bytes_totalgaugebytes...memory_bytes_freegaugebytes...memory_usagegaugepercent...swap_bytes_totalgaugebytes...swap_bytes_freegaugebytes...swap_usagegaugepercent...disk_read_bytescounterbytes...disk_write_bytescounterbytes...networkSettingsNameTypeDefaultDescriptionignore_inactivebooleantrueDo not export metrics for interfaces without trafficExported metricsNameTypeUnitDescriptionnetwork_sent_bytes_totalCounterbytes...network_recv_bytes_totalCounterbytes...nvidiaUsesnvidia-smito obtain and return metrics of NVIDIA GPUsSettingsNameTypeDefaultDescriptionsmi_pathstringnull(autodetect)Path to thenvidia-smiapplication binaryExported metricsNameTypeUnitDescriptiongpu_usagegaugepercentCurrent utilization of the GPU coregpu_memorygaugepercentCurrent GPU RAM usagegpu_encodergaugepercentUtilization of the nvenc video encodergpu_decodergaugepercentUtilization of the nvdec video decodergpu_fan_speedgaugepercentCurrent fan speedgpu_temperaturegaugeDegree CelsiusGPU core temperaturegpu_power_drawgaugeWattCurrent power consumption of the cardstorageReturns storage utilization information for each mountpoint/drive.Exported metricsNameTypeUnitDescriptionstorage_bytes_totalgaugebytes...storage_bytes_freegaugebytes...storage_usagegaugepercent...storagespacesOn Windows, this provider shows a health status of each configured storage space.Exported metricsNameTypeUnitDescriptionstorage_space_healthygaugebooleanWhile1indicates nominal status,0indicates a problem (typically a degraded array)storage_space_healthymetric contains two tagsnameandmode, which may be used for filtering.casparcgSettingsNameTypeDefaultDescriptionhoststring"127.0.0.1"IP address or a hostname of the target CasparCG instanceportinteger5250AMCP port of the target CasparCG instanceosc_portinteger6250OSC listening port (server listens on all interfaces)forcebooleanfalseDo not disable the provider when CasparCG is not available during startup (keep retrying to connect)heartbeat_intervalfloat10Number of seconds after which the provider sends a heartbeatVERSIONcommandExported metricsNameTypeUnitDescriptioncasparcg_connectedGaugebooleanReturns1when CasparCG connection is estabilishedcasparcg_idle_secondsGaugesecondsTime elapsed since last OSC message. Shouldn't be much higher than 1/FPScasparcg_dropped_totalCounternoneA number of dropped frames per channel since the application startedcasparcg_peak_volumeGaugePercentAudio peak value per channel since the last requestcasparcg_peak_volumemay either help you determine whether the channel playback is stalled
(assuming audio should always play, you may check for zero values)
or to find out there is an audio channel with a posibility of clipping audio (check for 100%).casparcg_dropped_framesmetric is not available with CasparCG >2.2Building on WindowsWe use Nuitka to build the application. You may as well:Download and installPython 3.8(any version >3.6 should work should work)When asked, select "install for all users" and "install pip"Start a terminal (cmd) as an administratorRunpip install psutil nuitka nxtoolsInstallMinGWCreate an environment variable calledCCcontaining a path togcc.exebinary from the MinGW packageRunbuild.batfrom thepromexpdirectoryAfter a while, resulting binary should be located inpromexp.distAcknowledgementsPrometheusThanks toPrometheusdevelopers for their great work!psutilAs a system metrics source,psutilmodule by giampaolo is used.python-oscCasparCG provider uses public domainpython-oscmodule by attwad.nuitkaWindows binary is built usingnuitka.