public async Task CollectAsync()
        {
            var service = await _client.Get().ConfigureAwait(false);

            var count = await service.GetHostNumberOfEntriesAsync().ConfigureAwait(false);

            _numberOfHostsGauge.Set(count);
        }
        public async Task CollectAsync()
        {
            var service = await _client.Get().ConfigureAwait(false);

            var deviceInfo = await service.GetDeviceInfoAsync().ConfigureAwait(false);

            _uptimeGauge.Set(deviceInfo.UpTime);
        }
        public async Task CollectAsync()
        {
            var service = await _client.Get().ConfigureAwait(false);

            _totalBytesReceivedGauge.Set(await service.GetTotalBytesReceivedAsync().ConfigureAwait(false));
            _totalBytesSentGauge.Set(await service.GetTotalBytesSentAsync().ConfigureAwait(false));

            _totalPackagesReceivedGauge.Set(await service.GetTotalPacketsReceivedAsync().ConfigureAwait(false));
            _totalPackagesSentGauge.Set(await service.GetTotalPacketsSentAsync().ConfigureAwait(false));
        }
        public async Task CollectAsync()
        {
            var service = await _client.Get().ConfigureAwait(false);

            var stat = await service.GetStatisticsAsync().ConfigureAwait(false);

            _totalPackagesReceivedGauge.Set(stat.TotalPacketsReceived);
            _totalPackagesSentGauge.Set(stat.TotalPacketsSent);


            _totalConnectionsGauge.Set(await service.GetTotalAssociationsAsync().ConfigureAwait(false));
        }
        public async Task CollectAsync()
        {
            var service = await _client.Get().ConfigureAwait(false);

            var info = await service.GetInfoAsync().ConfigureAwait(false);

            _maxBitrageGauge.Set(info.MaxBitRate);
            _lanEnabledGauge.Set(info.Enable ? 1 : 0);

            var statistics = await service.GetStatisticsAsync().ConfigureAwait(false);

            _bytesSentGauge.Set(statistics.BytesSent);
            _bytesReceivedGauge.Set(statistics.BytesReceived);
            _packagesSentGauge.Set(statistics.PacketsSent);
            _packagesReceivedGauge.Set(statistics.PacketsReceived);
        }
Exemple #6
0
        private async Task HandleLogs()
        {
            var client = await _tRClient.Get();

            var logs = await client.GetDeviceLogAsync();

            var logsHashSet = new HashSet <string>(logs);

            logsHashSet.ExceptWith(_knownLogs);
            _knownLogs.UnionWith(logsHashSet);

            if (logsHashSet.Count > 0)
            {
                await _loki.PostLogs(logsHashSet);
            }

            if (logsHashSet.Count > 100)
            {
                logsHashSet.Clear();
            }
        }
Exemple #7
0
        public async Task CollectAsync()
        {
            var service = await _client.Get().ConfigureAwait(false);

            var info = await service.GetInfoAsync().ConfigureAwait(false);

            _EnabledGauge.Set(info.Enabled ? 1 : 0);
            _DownstreamAttenuationGauge.Set(info.DownstreamAttenuation);
            _UpstreamAttenuationGauge.Set(info.UpstreamAttenuation);
            _DownstreamCurrentRateGauge.Set(info.DownstreamCurrentRate);
            _DownstreamMaxRateGauge.Set(info.DownstreamMaxRate);
            _DownstreamNoiseMarginGauge.Set(info.DownstreamNoiseMargin);
            _DownstreamPowerGauge.Set(info.DownstreamPower);
            _UpstreamCurrentRateGauge.Set(info.UpstreamCurrentRate);
            _UpstreamMaxRateGauge.Set(info.UpstreamMaxRate);
            _UpstreamNoiseMarginGauge.Set(info.UpstreamNoiseMargin);
            _UpstreamPowerGauge.Set(info.UpstreamPower);

            var stats = await service.GetStatisticsTotalAsync().ConfigureAwait(false);

            _ATUCCRCErrorsGauge.Set(stats.ATUCCRCErrors);
            _ATUCFECErrorsGauge.Set(stats.ATUCFECErrors);
            _ATUCHECErrorsGauge.Set(stats.ATUCHECErrors);
            _CellDelinGauge.Set(stats.CellDelin);
            _CRCErrorsGauge.Set(stats.CRCErrors);
            _ErroredSecsGauge.Set(stats.ErroredSecs);
            _FECErrorsGauge.Set(stats.FECErrors);
            _HECErrorsGauge.Set(stats.HECErrors);
            _InitErrorsGauge.Set(stats.InitErrors);
            _InitTimeoutsGauge.Set(stats.InitTimeouts);
            _LinkRetrainGauge.Set(stats.LinkRetrain);
            _LossOfFramingGauge.Set(stats.LossOfFraming);
            _ReceiveBlocksGauge.Set(stats.ReceiveBlocks);
            _SeverelyErroredSecsGauge.Set(stats.SeverelyErroredSecs);
            _TransmitBlocksGauge.Set(stats.TransmitBlocks);
        }
Exemple #8
0
        public async Task CollectAsync()
        {
            var service = await _client.Get().ConfigureAwait(false);

            await service.Test().ConfigureAwait(false);
        }