/**
 * Copyright 2022 Centreon
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * For more information : contact@centreon.com
 */

syntax = "proto3";

package com.centreon.broker;

/* io::storage, storage::de_pb_metric, 44 */
message Metric {
  enum ValueType {
    GAUGE = 0;
    COUNTER = 1;
    DERIVE = 2;
    ABSOLUTE = 3;
    AUTOMATIC = 4;
  }
  uint64 metric_id = 4;
  int32 rrd_len = 5;
  int32 interval = 6;
  ValueType value_type = 7;
  uint64 time = 8;
  double value = 9;
  string name = 10;
  uint64 host_id = 11;
  uint64 service_id = 12;
  double min = 13;
  double max = 14;
  string unit = 15;
}

/* io::storage, storage::de_pb_status, 45 */
message Status {
  uint64 index_id = 1;
  uint32 interval = 2;
  uint32 rrd_len = 3;
  uint64 time = 4;
  uint32 state = 5;
  uint64 host_id = 6;
  uint64 service_id = 7;
}

/* io::storage, storage::de_pb_index_mapping, 46 */
message IndexMapping {
  uint64 index_id = 1;
  uint64 host_id = 2;
  uint64 service_id = 3;
}

/* io::storage, storage::de_pb_metric_mapping, 47 */
message MetricMapping {
  uint64 index_id = 1;
  uint64 metric_id = 2;
}
