Ray Milkey | 8e40651 | 2018-10-24 15:56:50 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2018-present Open Networking Foundation |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package org.onosproject.openstacktelemetry.impl; |
| 18 | |
| 19 | /** |
| 20 | * Name/Value constants for properties. |
| 21 | */ |
| 22 | public final class OsgiPropertyConstants { |
| 23 | private OsgiPropertyConstants() { |
| 24 | } |
| 25 | |
| 26 | // REST telemetry |
| 27 | |
| 28 | static final String PROP_REST_ENABLE_SERVICE = "enableService"; |
| 29 | static final boolean PROP_REST_ENABLE_SERVICE_DEFAULT = false; |
| 30 | |
| 31 | static final String PROP_REST_SERVER_ADDRESS = "address"; |
| 32 | static final String PROP_REST_SERVER_ADDRESS_DEFAULT = "localhost"; |
| 33 | |
| 34 | static final String PROP_REST_SERVER_PORT = "port"; |
| 35 | static final int PROP_REST_SERVER_PORT_DEFAULT = 80; |
| 36 | |
| 37 | static final String PROP_REST_ENDPOINT = "endpoint"; |
| 38 | static final String PROP_REST_ENDPOINT_DEFAULT = "telemetry"; |
| 39 | |
| 40 | static final String PROP_REST_METHOD = "method"; |
| 41 | static final String PROP_REST_METHOD_DEFAULT = "POST"; |
| 42 | |
| 43 | static final String PROP_REST_REQUEST_MEDIA_TYPE = "requestMediaType"; |
| 44 | static final String PROP_REST_REQUEST_MEDIA_TYPE_DEFAULT = "application/json"; |
| 45 | |
| 46 | static final String PROP_REST_RESPONSE_MEDIA_TYPE = "responseMediaType"; |
| 47 | static final String PROP_REST_RESPONSE_MEDIA_TYPE_DEFAULT = "application/json"; |
| 48 | |
| 49 | // Kafka telemetry |
| 50 | |
| 51 | static final String PROP_KAFKA_ENABLE_SERVICE = "enableService"; |
| 52 | static final boolean PROP_KAFKA_ENABLE_SERVICE_DEFAULT = false; |
| 53 | |
| 54 | static final String PROP_KAFKA_ADDRESS = "address"; |
| 55 | static final String PROP_KAFKA_ADDRESS_DEFAULT = "localhost"; |
| 56 | |
| 57 | static final String PROP_KAFKA_PORT = "port"; |
| 58 | static final int PROP_KAFKA_PORT_DEFAULT = 9092; |
| 59 | |
| 60 | static final String PROP_KAFKA_RETRIES = "retries"; |
| 61 | static final int PROP_KAFKA_RETRIES_DEFAULT = 0; |
| 62 | |
| 63 | static final String PROP_KAFKA_REQUIRED_ACKS = "requiredAcks"; |
| 64 | static final String PROP_KAFKA_REQUIRED_ACKS_DEFAULT = "all"; |
| 65 | |
| 66 | static final String PROP_KAFKA_BATCH_SIZE = "batchSize"; |
| 67 | static final int PROP_KAFKA_BATCH_SIZE_DEFAULT = 16384; |
| 68 | |
| 69 | static final String PROP_KAFKA_LINGER_MS = "lingerMs"; |
| 70 | static final int PROP_KAFKA_LINGER_MS_DEFAULT = 1; |
| 71 | |
| 72 | static final String PROP_KAFKA_MEMORY_BUFFER = "memoryBuffer"; |
| 73 | static final int PROP_KAFKA_MEMORY_BUFFER_DEFAULT = 33554432; |
| 74 | |
| 75 | static final String PROP_KAFKA_KEY_SERIALIZER = "keySerializer"; |
| 76 | static final String PROP_KAFKA_KEY_SERIALIZER_DEFAULT = |
| 77 | "org.apache.kafka.common.serialization.StringSerializer"; |
| 78 | |
| 79 | static final String PROP_KAFKA_VALUE_SERIALIZER = "valueSerializer"; |
| 80 | static final String PROP_KAFKA_VALUE_SERIALIZER_DEFAULT = |
| 81 | "org.apache.kafka.common.serialization.ByteArraySerializer"; |
| 82 | |
| 83 | // Stats flow rule manager |
| 84 | |
| 85 | static final String PROP_REVERSE_PATH_STATS = "reversePathStats"; |
| 86 | static final boolean PROP_REVERSE_PATH_STATS_DEFAULT = false; |
| 87 | |
| 88 | static final String PROP_EGRESS_STATS = "egressStats"; |
| 89 | static final boolean PROP_EGRESS_STATS_DEFAULT = false; |
| 90 | |
| 91 | static final String PROP_PORT_STATS = "portStats"; |
| 92 | static final boolean PROP_PORT_STATS_DEFAULT = true; |
| 93 | |
| 94 | static final String PROP_MONITOR_OVERLAY = "monitorOverlay"; |
| 95 | static final boolean PROP_MONITOR_OVERLAY_DEFAULT = true; |
| 96 | |
| 97 | static final String PROP_MONITOR_UNDERLAY = "monitorUnderlay"; |
| 98 | static final boolean PROP_MONITOR_UNDERLAY_DEFAULT = true; |
| 99 | |
| 100 | // Influx DB Telemetry config manager |
| 101 | |
| 102 | static final String PROP_INFLUXDB_ENABLE_SERVICE = "enableService"; |
| 103 | static final boolean PROP_INFLUXDB_ENABLE_SERVICE_DEFAULT = false; |
| 104 | |
| 105 | static final String PROP_INFLUXDB_SERVER_ADDRESS = "address"; |
| 106 | static final String PROP_INFLUXDB_SERVER_ADDRESS_DEFAULT = "localhost"; |
| 107 | |
| 108 | static final String PROP_INFLUXDB_SERVER_PORT = "port"; |
| 109 | static final int PROP_INFLUXDB_SERVER_PORT_DEFAULT = 8086; |
| 110 | |
| 111 | static final String PROP_INFLUXDB_USERNAME = "username"; |
| 112 | static final String PROP_INFLUXDB_USERNAME_DEFAULT = "onos"; |
| 113 | |
| 114 | static final String PROP_INFLUXDB_PASSWORD = "password"; |
| 115 | static final String PROP_INFLUXDB_PASSWORD_DEFAULT = "onos"; |
| 116 | |
| 117 | static final String PROP_INFLUXDB_DATABASE = "database"; |
| 118 | static final String PROP_INFLUXDB_DATABASE_DEFAULT = "onos"; |
| 119 | |
| 120 | static final String PROP_INFLUXDB_MEASUREMENT = "measurement"; |
| 121 | static final String PROP_INFLUXDB_MEASUREMENT_DEFAULT = "sonaflow"; |
| 122 | |
| 123 | static final String PROP_INFLUXDB_ENABLE_BATCH = "enableBatch"; |
| 124 | static final boolean PROP_INFLUXDB_ENABLE_BATCH_DEFAULT = true; |
| 125 | |
| 126 | // GRPC Telemetry config manager |
| 127 | static final String PROP_GRPC_ENABLE_SERVICE = "enableService"; |
| 128 | static final boolean GRPC_ENABLE_SERVICE_DEFAULT = false; |
| 129 | |
| 130 | static final String PROP_GRPC_SERVER_ADDRESS = "address"; |
| 131 | static final String GRPC_SERVER_ADDRESS_DEFAULT = "localhost"; |
| 132 | |
| 133 | static final String PROP_GRPC_SERVER_PORT = "port"; |
| 134 | static final int GRPC_SERVER_PORT_DEFAULT = 50051; |
| 135 | |
| 136 | static final String PROP_GRPC_USE_PLAINTEXT = "usePlaintext"; |
| 137 | static final boolean GRPC_USE_PLAINTEXT_DEFAULT = true; |
| 138 | |
| 139 | static final String PROP_GRPC_MAX_INBOUND_MSG_SIZE = "maxInboundMsgSize"; |
| 140 | static final int GRPC_MAX_INBOUND_MSG_SIZE_DEFAULT = 4194304; //4 * 1024 * 1024; |
| 141 | |
| 142 | // Prometheus Telemetry config manager |
| 143 | static final String PROP_PROMETHEUS_ENABLE_SERVICE = "enableService"; |
boyoung2 | a8549d2 | 2018-11-23 20:42:37 +0900 | [diff] [blame^] | 144 | static final boolean PROP_PROMETHEUS_ENABLE_SERVICE_DEFAULT = true; |
Ray Milkey | 8e40651 | 2018-10-24 15:56:50 -0700 | [diff] [blame] | 145 | |
| 146 | static final String PROP_PROMETHEUS_EXPORTER_ADDRESS = "address"; |
boyoung2 | a8549d2 | 2018-11-23 20:42:37 +0900 | [diff] [blame^] | 147 | public static final String PROP_PROMETHEUS_EXPORTER_ADDRESS_DEFAULT = "localhost"; |
Ray Milkey | 8e40651 | 2018-10-24 15:56:50 -0700 | [diff] [blame] | 148 | |
| 149 | static final String PROP_PROMETHEUS_EXPORTER_PORT = "port"; |
boyoung2 | a8549d2 | 2018-11-23 20:42:37 +0900 | [diff] [blame^] | 150 | public static final int PROP_PROMETHEUS_EXPORTER_PORT_DEFAULT = 9555; |
Ray Milkey | 8e40651 | 2018-10-24 15:56:50 -0700 | [diff] [blame] | 151 | } |