Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

API v2 and internal graphs don't match RRD Tool output #10426

Open
1 of 4 tasks
tallen116 opened this issue Nov 23, 2021 · 0 comments
Open
1 of 4 tasks

API v2 and internal graphs don't match RRD Tool output #10426

tallen116 opened this issue Nov 23, 2021 · 0 comments
Labels
status/new New tickets

Comments

@tallen116
Copy link

The API V2 and built in graphs don't match the RRD file timeframes.

BUG REPORT INFORMATION

Prerequisites

The opened issue, must be code related. GitHub is not meant for support. Feel free to check the CONTRIBUTING section for more details.

Versions

$ rpm -qa | grep centreon | egrep -v "(plugin|pack)" | sort

centreon-21.04.7-3.el8.noarch
centreon-auto-discovery-server-21.04.1-2.el8.noarch
centreon-base-config-centreon-engine-21.04.7-3.el8.noarch
centreon-broker-21.04.4-1.el8.x86_64
centreon-broker-cbd-21.04.4-1.el8.x86_64
centreon-broker-cbmod-21.04.4-1.el8.x86_64
centreon-broker-core-21.04.4-1.el8.x86_64
centreon-broker-storage-21.04.4-1.el8.x86_64
centreon-clib-21.04.3-1.el8.x86_64
centreon-common-21.04.7-3.el8.noarch
centreon-connector-21.04.3-4.el8.x86_64
centreon-connector-perl-21.04.3-4.el8.x86_64
centreon-connector-ssh-21.04.3-4.el8.x86_64
centreon-database-21.04.7-3.el8.noarch
centreon-engine-21.04.4-4.el8.x86_64
centreon-engine-daemon-21.04.4-4.el8.x86_64
centreon-engine-extcommands-21.04.4-4.el8.x86_64
centreon-gorgone-21.04.3-4.el8.noarch
centreon-gorgone-centreon-config-21.04.3-4.el8.noarch
centreon-license-manager-21.04.0-1.el8.noarch
centreon-license-manager-common-21.04.0-1.el8.noarch
centreon-perl-libs-21.04.7-3.el8.noarch
centreon-poller-centreon-engine-21.04.7-3.el8.noarch
centreon-pp-manager-21.04.0-1.el8.noarch
centreon-release-21.04-4.el8.noarch
centreon-trap-21.04.7-3.el8.noarch
centreon-web-21.04.7-3.el8.noarch
centreon-widget-engine-status-21.04.0-1.el8.noarch
centreon-widget-global-health-21.04.0-1.el8.noarch
centreon-widget-graph-monitoring-21.04.0-1.el8.noarch
centreon-widget-grid-map-21.04.0-1.el8.noarch
centreon-widget-hostgroup-monitoring-21.04.0-1.el8.noarch
centreon-widget-host-monitoring-21.04.0-2.el8.noarch
centreon-widget-httploader-21.04.0-3.el8.noarch
centreon-widget-live-top10-cpu-usage-21.04.0-1.el8.noarch
centreon-widget-live-top10-memory-usage-21.04.0-1.el8.noarch
centreon-widget-servicegroup-monitoring-21.04.0-1.el8.noarch
centreon-widget-service-monitoring-21.04.0-1.el8.noarch
centreon-widget-tactical-overview-21.04.0-1.el8.noarch

Operating System

Linux 4.18.0-305.19.1.el8_4.x86_64 #1 SMP Wed Sep 15 19:12:32 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Rocky Linux release 8.4 (Green Obsidian)

Browser used

  • Google Chrome
  • Firefox
  • Internet Explorer IE11
  • Safari

Version: Centreon 21.04.7
(commit 191817d)

VM running on ESXi 6.7

Description

When polling the API or viewing the built-in graphs, the time frames do not match the RRD files. This makes the default graphing or any application polling the API to be incorrect. It is extremely noticeable on checks with longer than 1 hour check intervals.

I am using something that polls the performance metrics via API v2 and the metrics seem to be off by one check interval due to the time frames being off.

Steps to Reproduce

Please describe precisely the steps to reproduce the encountered issue.

Graph metrics

  1. I logged into Centreon
  2. I viewed a service graph on the Resource status page

API v2

  1. I logged in and received an API token - {{baseUrl}}/login
  2. I polled for the host and service using - {{baseUrl}}/monitoring/hosts?show_service=true
  3. I polled the Performance data - {{baseUrl}}/monitoring/hosts/:host_id/services/:service_id/metrics/performance

RRDTool

  1. I ssh'd into the server
  2. I changed directory into /var/lib/centreon/metrics
  3. I ran the rrdtool fetch to get the data
  4. rrdtool fetch 224.rrd AVERAGE -r 5m -s -6h

Describe the received result

API Result

2021-11-22T16:00:00-05:00	793399
2021-11-22T17:00:00-05:00	796999
2021-11-22T18:00:00-05:00	800599.89833
2021-11-22T19:00:00-05:00	804199.10167
2021-11-22T20:00:00-05:00	807799
2021-11-22T21:00:00-05:00	811399
2021-11-22T22:00:00-05:00	null

RRD Tool

2021-11-22T17:00:00-05:00	793518.05167
2021-11-22T18:00:00-05:00	797118
2021-11-22T19:00:00-05:00	800718.94833
2021-11-22T20:00:00-05:00	804318.05167
2021-11-22T21:00:00-05:00	807918.94833
2021-11-22T22:00:00-05:00	811518.05167
2021-11-22T23:00:00-05:00	-nan

Describe the expected result

The time for the API and internal graphing should match the RRD tool collection

API result

2021-11-22T17:00:00-05:00	793399
2021-11-22T18:00:00-05:00	796999
2021-11-22T19:00:00-05:00	800599.89833
2021-11-22T20:00:00-05:00	804199.10167
2021-11-22T21:00:00-05:00	807799
2021-11-22T22:00:00-05:00	811399
2021-11-22T23:00:00-05:00	null

Logs

PHP error logs

For version using PHP 7.2 or 7.3 on centOs 8 or PHP 8

tail -f /var/log/php-fpm/centreon-error.log

Empty

Additional relevant information (e.g. frequency, ...)

It seems to happen for all metrics that I have observed.

@tallen116 tallen116 added the status/new New tickets label Nov 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status/new New tickets
Projects
None yet
Development

No branches or pull requests

1 participant