Add a prometheus exporter

Change-Id: I2989d87c2a83eed31c6617694bdcb78bf9b38553
diff --git a/apps/openstacktelemetry/BUCK b/apps/openstacktelemetry/BUCK
index 2368ebe..3636bbb 100644
--- a/apps/openstacktelemetry/BUCK
+++ b/apps/openstacktelemetry/BUCK
@@ -3,6 +3,19 @@
 BUNDLES = [
     '//lib:kafka-clients',
     '//lib:influxdb-java',
+    '//lib:simpleclient',
+    '//lib:simpleclient_common',
+    '//lib:simpleclient_hotspot',
+    '//lib:simpleclient_servlet',
+    '//lib:jetty-http',
+    '//lib:jetty-servlet',
+    '//lib:jetty-server',
+    '//lib:jetty-security',
+    '//lib:jetty-util',
+    '//lib:jetty-io',
+    '//lib:servlet-api',
+    '//lib:javax.ws.rs-api',
+    '//lib:jetty-websocket',
     '//lib:commons-codec',
     '//lib:retrofit',
     '//lib:okhttp',
diff --git a/apps/openstacktelemetry/api/src/main/java/org/onosproject/openstacktelemetry/api/Constants.java b/apps/openstacktelemetry/api/src/main/java/org/onosproject/openstacktelemetry/api/Constants.java
index f34c0dc..11b2774 100644
--- a/apps/openstacktelemetry/api/src/main/java/org/onosproject/openstacktelemetry/api/Constants.java
+++ b/apps/openstacktelemetry/api/src/main/java/org/onosproject/openstacktelemetry/api/Constants.java
@@ -42,6 +42,10 @@
     public static final String DEFAULT_INFLUXDB_MEASUREMENT = "sonaflow";
     public static final boolean DEFAULT_INFLUXDB_ENABLE_BATCH = true;
 
+    // default configuration variables for Promethetus exporter
+    public static final String DEFAULT_PROMETHEUS_EXPORTER_IP = "0.0.0.0";
+    public static final int DEFAULT_PROMETHEUS_EXPORTER_PORT = 9501;
+
     // default configuration variables for Kafka
     public static final String DEFAULT_KAFKA_SERVER_IP = DEFAULT_SERVER_IP;
     public static final int DEFAULT_KAFKA_SERVER_PORT = 9092;
diff --git a/apps/openstacktelemetry/api/src/main/java/org/onosproject/openstacktelemetry/api/PrometheusTelemetryAdminService.java b/apps/openstacktelemetry/api/src/main/java/org/onosproject/openstacktelemetry/api/PrometheusTelemetryAdminService.java
new file mode 100644
index 0000000..15572c4
--- /dev/null
+++ b/apps/openstacktelemetry/api/src/main/java/org/onosproject/openstacktelemetry/api/PrometheusTelemetryAdminService.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * 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.
+ */
+package org.onosproject.openstacktelemetry.api;
+
+/**
+ * Admin service API for publishing openstack telemetry through Prometheus producer.
+ */
+public interface PrometheusTelemetryAdminService
+        extends TelemetryAdminService, PrometheusTelemetryService {
+}
diff --git a/apps/openstacktelemetry/api/src/main/java/org/onosproject/openstacktelemetry/api/PrometheusTelemetryConfigService.java b/apps/openstacktelemetry/api/src/main/java/org/onosproject/openstacktelemetry/api/PrometheusTelemetryConfigService.java
new file mode 100644
index 0000000..4e115de
--- /dev/null
+++ b/apps/openstacktelemetry/api/src/main/java/org/onosproject/openstacktelemetry/api/PrometheusTelemetryConfigService.java
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * 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.
+ */
+package org.onosproject.openstacktelemetry.api;
+
+/**
+ * Configuration service API for publishing openstack telemetry through Prometheus producer.
+ */
+public interface PrometheusTelemetryConfigService extends TelemetryConfigService {
+}
diff --git a/apps/openstacktelemetry/api/src/main/java/org/onosproject/openstacktelemetry/api/PrometheusTelemetryService.java b/apps/openstacktelemetry/api/src/main/java/org/onosproject/openstacktelemetry/api/PrometheusTelemetryService.java
new file mode 100644
index 0000000..2680ab1
--- /dev/null
+++ b/apps/openstacktelemetry/api/src/main/java/org/onosproject/openstacktelemetry/api/PrometheusTelemetryService.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * 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.
+ */
+package org.onosproject.openstacktelemetry.api;
+
+import java.util.Set;
+
+/**
+ * Service API for publishing openstack telemetry through Prometheus producer.
+ */
+public interface PrometheusTelemetryService extends TelemetryService {
+    /**
+     * Publishes openstack telemetry to Prometheus server.
+     *
+     * @param flowInfos a network metric to be published
+     */
+    void publish(Set<FlowInfo> flowInfos);
+}
diff --git a/apps/openstacktelemetry/api/src/main/java/org/onosproject/openstacktelemetry/api/config/PrometheusTelemetryConfig.java b/apps/openstacktelemetry/api/src/main/java/org/onosproject/openstacktelemetry/api/config/PrometheusTelemetryConfig.java
new file mode 100644
index 0000000..536bd53
--- /dev/null
+++ b/apps/openstacktelemetry/api/src/main/java/org/onosproject/openstacktelemetry/api/config/PrometheusTelemetryConfig.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * 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.
+ */
+package org.onosproject.openstacktelemetry.api.config;
+
+import java.util.Map;
+
+public interface PrometheusTelemetryConfig extends TelemetryConfig {
+
+    /**
+     * Obtains prometheus exporter IP address.
+     *
+     * @return IP address which prometheus exporter binds
+     */
+    String address();
+
+    /**
+     * Obtains prometheus exporter port number.
+     *
+     * @return prometheus exporter port number
+     */
+    int port();
+
+    /**
+     * Obtains prometheus config maps.
+     *
+     * @return prometheus config map
+     */
+    Map<String, Object> configMap();
+
+
+    /**
+     * Builder class of PrometheusTelemetryConfig.
+     */
+    interface Builder extends TelemetryConfig.Builder {
+
+        /**
+         * Sets prometheus exporter IP address.
+         *
+         * @param address prometheus exporter IP
+         * @return builder instance
+         */
+        Builder withAddress(String address);
+
+        /**
+         * Sets prometheus exporter port number.
+         *
+         * @param port prometheus exporter port
+         * @return builder instance
+         */
+        Builder withPort(int port);
+
+        // TODO   add authentication.
+
+        /**
+         * Sets other prometheus configuration map.
+         *
+         * @param configMap prometheus configuration map
+         * @return builder instance
+         */
+        Builder withConfigMap(Map<String, Object> configMap);
+
+        /**
+         * Creates a prometheus telemetry config instance.
+         *
+         * @return prometheus telemetry config instance
+         */
+        PrometheusTelemetryConfig build();
+    }
+}
diff --git a/apps/openstacktelemetry/app/BUCK b/apps/openstacktelemetry/app/BUCK
index 4cc3d98..0d8faa4 100644
--- a/apps/openstacktelemetry/app/BUCK
+++ b/apps/openstacktelemetry/app/BUCK
@@ -15,6 +15,18 @@
     '//apps/openstacktelemetry/api:onos-apps-openstacktelemetry-api',
     '//lib:kafka-clients',
     '//lib:influxdb-java',
+    '//lib:simpleclient',
+    '//lib:simpleclient_common',
+    '//lib:simpleclient_hotspot',
+    '//lib:simpleclient_servlet',
+    '//lib:jetty-http',
+    '//lib:jetty-servlet',
+    '//lib:jetty-server',
+    '//lib:jetty-security',
+    '//lib:jetty-websocket',
+    '//lib:jetty-util',
+    '//lib:jetty-io',
+    '//lib:servlet-api',
     '//lib:protobuf-java-3.2.0',
     '//lib:GRPC_1.3',
     '//incubator/grpc-dependencies:grpc-core-repkg-' + GRPC_VER,
diff --git a/apps/openstacktelemetry/app/BUILD b/apps/openstacktelemetry/app/BUILD
index c3f3b36..06b9f73 100644
--- a/apps/openstacktelemetry/app/BUILD
+++ b/apps/openstacktelemetry/app/BUILD
@@ -2,6 +2,16 @@
     "@kafka_clients//jar",
     "@jersey_client//jar",
     "@influxdb_java//jar",
+    "@simpleclient//jar",
+    "@simpleclient_common//jar",
+    "@simpleclient_hotspot//jar",
+    "@simpleclient_servlet//jar",
+    "@jetty_servlet//jar",
+    "@jetty_http//jar",
+    "@jetty_server//jar",
+    "@jetty_util//jar",
+    "@jetty_websocket//jar",
+    "@servlet_api//jar",
     "@io_grpc_grpc_java//core",
     "@io_grpc_grpc_java//protobuf-lite",
     "//core/store/serializers:onos-core-serializers",
diff --git a/apps/openstacktelemetry/app/src/main/java/org/onosproject/openstacktelemetry/config/DefaultPrometheusTelemetryConfig.java b/apps/openstacktelemetry/app/src/main/java/org/onosproject/openstacktelemetry/config/DefaultPrometheusTelemetryConfig.java
new file mode 100644
index 0000000..b22f053
--- /dev/null
+++ b/apps/openstacktelemetry/app/src/main/java/org/onosproject/openstacktelemetry/config/DefaultPrometheusTelemetryConfig.java
@@ -0,0 +1,131 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * 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.
+ */
+package org.onosproject.openstacktelemetry.config;
+
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.Maps;
+import org.onosproject.openstacktelemetry.api.config.PrometheusTelemetryConfig;
+import org.onosproject.openstacktelemetry.api.config.TelemetryConfig;
+
+import java.util.Map;
+import java.util.Objects;
+
+import static com.google.common.base.MoreObjects.toStringHelper;
+import static com.google.common.base.Preconditions.checkNotNull;
+
+/**
+ * A configuration file contains Prometheus telemetry parameters.
+ */
+public final class DefaultPrometheusTelemetryConfig implements PrometheusTelemetryConfig {
+
+    private final String address;
+    private final int port;
+    private final Map<String, Object> configMap;
+
+    private DefaultPrometheusTelemetryConfig(String address,
+                                             int port,
+                                             Map<String, Object> configMap) {
+        this.address = address;
+        this.port = port;
+        this.configMap = configMap;
+    }
+
+    @Override
+    public String address() {
+        return address;
+    }
+
+    @Override
+    public int port() {
+        return port;
+    }
+
+    @Override
+    public Map<String, Object> configMap() {
+        if (configMap != null) {
+            return ImmutableMap.copyOf(configMap);
+        } else {
+            return Maps.newConcurrentMap();
+        }
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+
+        if (obj instanceof DefaultPrometheusTelemetryConfig) {
+            final DefaultPrometheusTelemetryConfig other = (DefaultPrometheusTelemetryConfig) obj;
+            return Objects.equals(this.address, other.address) &&
+                    Objects.equals(this.port, other.port) &&
+                    Objects.equals(this.configMap, other.configMap);
+        }
+        return false;
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(address, port, configMap);
+    }
+
+    @Override
+    public String toString() {
+        return toStringHelper(this)
+                .add("address", address)
+                .add("port", port)
+                .add("configMap", configMap)
+                .toString();
+    }
+
+    @Override
+    public TelemetryConfig.Builder createBuilder() {
+        return new DefaultBuilder();
+    }
+
+    /**
+     * Builder class of DefaultPrometheusTelemetryConfig.
+     */
+    public static final class DefaultBuilder implements Builder {
+        private String address;
+        private int port;
+        private Map<String, Object> configMap;
+
+        @Override
+        public Builder withAddress(String address) {
+            this.address = address;
+            return this;
+        }
+
+        @Override
+        public Builder withPort(int port) {
+            this.port = port;
+            return this;
+        }
+
+        @Override
+        public Builder withConfigMap(Map<String, Object> configMap) {
+            this.configMap = configMap;
+            return this;
+        }
+        @Override
+        public PrometheusTelemetryConfig build() {
+            checkNotNull(address, "Prometheus exporter binding address cannot be null");
+            checkNotNull(configMap, "Config map cannot be null");
+            return new DefaultPrometheusTelemetryConfig(address, port, configMap);
+        }
+    }
+}
diff --git a/apps/openstacktelemetry/app/src/main/java/org/onosproject/openstacktelemetry/impl/InfluxDbTelemetryManager.java b/apps/openstacktelemetry/app/src/main/java/org/onosproject/openstacktelemetry/impl/InfluxDbTelemetryManager.java
index e35d662..41a318b 100644
--- a/apps/openstacktelemetry/app/src/main/java/org/onosproject/openstacktelemetry/impl/InfluxDbTelemetryManager.java
+++ b/apps/openstacktelemetry/app/src/main/java/org/onosproject/openstacktelemetry/impl/InfluxDbTelemetryManager.java
@@ -58,8 +58,6 @@
     private static final String SRC_PORT = "srcPort";
     private static final String DST_PORT = "dstPort";
     private static final String PROTOCOL = "protocol";
-    private static final String SRC_MAC = "srcMac";
-    private static final String DST_MAC = "dstMac";
 
     private static final String STARTUP_TIME = "startupTime";
     private static final String FST_PKT_ARR_TIME = "fstPktArrTime";
@@ -130,7 +128,7 @@
             producer = null;
         }
 
-        log.info("InfluxDB producer has Stopped");
+        log.info("InfluxDB producer has stopped");
     }
 
     @Override
diff --git a/apps/openstacktelemetry/app/src/main/java/org/onosproject/openstacktelemetry/impl/OpenstackTelemetryManager.java b/apps/openstacktelemetry/app/src/main/java/org/onosproject/openstacktelemetry/impl/OpenstackTelemetryManager.java
index 761e01b..3e629cc 100644
--- a/apps/openstacktelemetry/app/src/main/java/org/onosproject/openstacktelemetry/impl/OpenstackTelemetryManager.java
+++ b/apps/openstacktelemetry/app/src/main/java/org/onosproject/openstacktelemetry/impl/OpenstackTelemetryManager.java
@@ -30,6 +30,7 @@
 import org.onosproject.openstacktelemetry.api.InfluxDbTelemetryService;
 import org.onosproject.openstacktelemetry.api.KafkaTelemetryService;
 import org.onosproject.openstacktelemetry.api.OpenstackTelemetryService;
+import org.onosproject.openstacktelemetry.api.PrometheusTelemetryService;
 import org.onosproject.openstacktelemetry.api.RestTelemetryService;
 import org.onosproject.openstacktelemetry.api.TelemetryService;
 import org.onosproject.openstacktelemetry.codec.TinaMessageByteBufferCodec;
@@ -96,6 +97,12 @@
                 invokeInfluxDbPublisher((InfluxDbTelemetryService) service, flowInfos);
             }
 
+            if (service instanceof PrometheusTelemetryManager &&
+                    getPropertyValueAsBoolean(componentConfigService.getProperties(
+                            PrometheusTelemetryConfigManager.class.getName()), ENABLE_SERVICE)) {
+                invokePrometheusPublisher((PrometheusTelemetryService) service, flowInfos);
+            }
+
             if (service instanceof KafkaTelemetryManager &&
                     getPropertyValueAsBoolean(componentConfigService.getProperties(
                             KafkaTelemetryConfigManager.class.getName()), ENABLE_SERVICE)) {
@@ -127,6 +134,10 @@
         service.publish(influxRecord);
     }
 
+    private void invokePrometheusPublisher(PrometheusTelemetryService service, Set<FlowInfo> flowInfos) {
+        service.publish(flowInfos);
+    }
+
     private void invokeKafkaPublisher(KafkaTelemetryService service, Set<FlowInfo> flowInfos) {
         TinaMessageByteBufferCodec codec = new TinaMessageByteBufferCodec();
         ByteBuffer buffer = codec.encode(flowInfos);
diff --git a/apps/openstacktelemetry/app/src/main/java/org/onosproject/openstacktelemetry/impl/PrometheusTelemetryConfigManager.java b/apps/openstacktelemetry/app/src/main/java/org/onosproject/openstacktelemetry/impl/PrometheusTelemetryConfigManager.java
new file mode 100644
index 0000000..23cc240
--- /dev/null
+++ b/apps/openstacktelemetry/app/src/main/java/org/onosproject/openstacktelemetry/impl/PrometheusTelemetryConfigManager.java
@@ -0,0 +1,140 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * 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.
+ */
+package org.onosproject.openstacktelemetry.impl;
+
+import org.apache.felix.scr.annotations.Activate;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Deactivate;
+import org.apache.felix.scr.annotations.Modified;
+import org.apache.felix.scr.annotations.Property;
+import org.apache.felix.scr.annotations.Reference;
+import org.apache.felix.scr.annotations.ReferenceCardinality;
+import org.apache.felix.scr.annotations.Service;
+import org.onlab.util.Tools;
+import org.onosproject.cfg.ComponentConfigService;
+import org.onosproject.openstacktelemetry.api.PrometheusTelemetryAdminService;
+import org.onosproject.openstacktelemetry.api.PrometheusTelemetryConfigService;
+import org.onosproject.openstacktelemetry.api.config.TelemetryConfig;
+import org.onosproject.openstacktelemetry.config.DefaultPrometheusTelemetryConfig;
+import org.osgi.service.component.ComponentContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Dictionary;
+
+import static org.onosproject.openstacktelemetry.api.Constants.DEFAULT_DISABLE;
+import static org.onosproject.openstacktelemetry.api.Constants.DEFAULT_ENABLE;
+import static org.onosproject.openstacktelemetry.api.Constants.DEFAULT_PROMETHEUS_EXPORTER_IP;
+import static org.onosproject.openstacktelemetry.api.Constants.DEFAULT_PROMETHEUS_EXPORTER_PORT;
+import static org.onosproject.openstacktelemetry.util.OpenstackTelemetryUtil.getBooleanProperty;
+import static org.onosproject.openstacktelemetry.util.OpenstackTelemetryUtil.initTelemetryService;
+
+/**
+ * Prometheus exporter configuration manager for publishing openstack telemetry.
+ */
+@Component(immediate = true)
+@Service
+public class PrometheusTelemetryConfigManager implements PrometheusTelemetryConfigService {
+
+    private final Logger log = LoggerFactory.getLogger(getClass());
+
+    private static final String ENABLE_SERVICE = "enableService";
+    private static final String ADDRESS = "address";
+    private static final String PORT = "port";
+
+    @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+    protected ComponentConfigService componentConfigService;
+
+    @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+    protected PrometheusTelemetryAdminService prometheusTelemetryAdminService;
+
+    @Property(name = ADDRESS, value = DEFAULT_PROMETHEUS_EXPORTER_IP,
+            label = "Default IP address of prometheus exporter")
+    protected String address = DEFAULT_PROMETHEUS_EXPORTER_IP;
+
+    @Property(name = PORT, intValue = DEFAULT_PROMETHEUS_EXPORTER_PORT,
+            label = "Default port number of prometheus exporter")
+    protected Integer port = DEFAULT_PROMETHEUS_EXPORTER_PORT;
+
+    @Property(name = ENABLE_SERVICE, boolValue = DEFAULT_ENABLE,
+            label = "Specify the default behavior of telemetry service")
+    protected Boolean enableService = DEFAULT_ENABLE;
+
+    @Activate
+    protected void activate(ComponentContext context) {
+        componentConfigService.registerProperties(getClass());
+        if (enableService) {
+            prometheusTelemetryAdminService.start(getConfig());
+        }
+        log.info("Started");
+    }
+
+    @Deactivate
+    protected void deactivate() {
+        componentConfigService.unregisterProperties(getClass(), false);
+        if (enableService) {
+            prometheusTelemetryAdminService.stop();
+        }
+        log.info("Stopped");
+    }
+
+    @Modified
+    private void modified(ComponentContext context) {
+        readComponentConfiguration(context);
+        initTelemetryService(prometheusTelemetryAdminService, getConfig(), enableService);
+        log.info("Modified");
+    }
+
+    @Override
+    public TelemetryConfig getConfig() {
+        return new DefaultPrometheusTelemetryConfig.DefaultBuilder()
+                .withAddress(address)
+                .withPort(port)
+                .build();
+    }
+
+    /**
+     * Extracts properties from the component configuration context.
+     *
+     * @param context the component context
+     */
+    private void readComponentConfiguration(ComponentContext context) {
+        Dictionary<?, ?> properties = context.getProperties();
+
+        String addressStr = Tools.get(properties, ADDRESS);
+        address = addressStr != null ? addressStr : DEFAULT_PROMETHEUS_EXPORTER_IP;
+        log.info("Configured. Prometheus exporter address is {}", address);
+
+        Integer portConfigured = Tools.getIntegerProperty(properties, PORT);
+        if (portConfigured == null) {
+            port = DEFAULT_PROMETHEUS_EXPORTER_PORT;
+            log.info("Prometheus exporter port is NOT configured, default value is {}", port);
+        } else {
+            port = portConfigured;
+            log.info("Configured. Prometheus exporter port is {}", port);
+        }
+
+        Boolean enableServiceConfigured = getBooleanProperty(properties, ENABLE_SERVICE);
+        if (enableServiceConfigured == null) {
+            enableService = DEFAULT_DISABLE;
+            log.info("Prometheus service enable flag is NOT " +
+                             "configured, default value is {}", enableService);
+        } else {
+            enableService = enableServiceConfigured;
+            log.info("Configured. Prometheus service enable flag is {}", enableService);
+        }
+    }
+}
diff --git a/apps/openstacktelemetry/app/src/main/java/org/onosproject/openstacktelemetry/impl/PrometheusTelemetryManager.java b/apps/openstacktelemetry/app/src/main/java/org/onosproject/openstacktelemetry/impl/PrometheusTelemetryManager.java
new file mode 100644
index 0000000..f06a961
--- /dev/null
+++ b/apps/openstacktelemetry/app/src/main/java/org/onosproject/openstacktelemetry/impl/PrometheusTelemetryManager.java
@@ -0,0 +1,196 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * 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.
+ */
+package org.onosproject.openstacktelemetry.impl;
+
+import org.apache.felix.scr.annotations.Activate;
+import org.apache.felix.scr.annotations.Component;
+import org.apache.felix.scr.annotations.Deactivate;
+import org.apache.felix.scr.annotations.Reference;
+import org.apache.felix.scr.annotations.ReferenceCardinality;
+import org.apache.felix.scr.annotations.Service;
+import org.onosproject.openstacktelemetry.api.FlowInfo;
+import org.onosproject.openstacktelemetry.api.OpenstackTelemetryService;
+import org.onosproject.openstacktelemetry.api.PrometheusTelemetryAdminService;
+import org.onosproject.openstacktelemetry.api.config.PrometheusTelemetryConfig;
+import org.onosproject.openstacktelemetry.api.config.TelemetryConfig;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import io.prometheus.client.Counter;
+import io.prometheus.client.exporter.MetricsServlet;
+import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.servlet.ServletContextHandler;
+import org.eclipse.jetty.servlet.ServletHolder;
+import java.util.Set;
+
+/**
+ * Prometheus telemetry manager.
+ */
+@Component(immediate = true)
+@Service
+public class PrometheusTelemetryManager implements PrometheusTelemetryAdminService {
+
+    private final Logger log = LoggerFactory.getLogger(getClass());
+
+    private Server prometheusExporter;
+
+    private static final String BYTE_VM2VM = "byte_vm2vm";
+    private static final String BYTE_DEVICE = "byte_device";
+    private static final String BYTE_SRC_IP = "byte_src_ip";
+    private static final String BYTE_DST_IP = "byte_dst_ip";
+
+    private static final String PKT_VM2VM = "pkt_vm2vm";
+    private static final String PKT_DEVICE = "pkt_device";
+    private static final String PKT_SRC_IP = "pkt_src_ip";
+    private static final String PKT_DST_IP = "pkt_dst_ip";
+
+    private static final String PKT_ERROR = "pkt_error";
+    private static final String PKT_DROP = "pkt_drop";
+
+    private static final String LABEL_IP_5_TUPLE = "IP_5_TUPLE";
+    private static final String LABEL_DEV_ID = "DEVICE_ID";
+    private static final String LABEL_SRC_IP = "SOURCE_IP";
+    private static final String LABEL_DST_IP = "DESTINATION_IP";
+
+    private static final String HELP_MSG = "SONA Flow statistics";
+
+    private static Counter byteVM2VM = Counter.build().name(BYTE_VM2VM)
+                                    .help(HELP_MSG)
+                                    .labelNames(LABEL_IP_5_TUPLE).register();
+
+    private static Counter byteDevice = Counter.build().name(BYTE_DEVICE)
+                                    .help(HELP_MSG)
+                                    .labelNames(LABEL_DEV_ID).register();
+
+    private static Counter byteSrcIp = Counter.build().name(BYTE_SRC_IP)
+                                    .help(HELP_MSG)
+                                    .labelNames(LABEL_SRC_IP).register();
+
+    private static Counter byteDstIp = Counter.build().name(BYTE_DST_IP)
+                                    .help(HELP_MSG)
+                                    .labelNames(LABEL_DST_IP).register();
+
+    private static Counter pktVM2VM = Counter.build().name(PKT_VM2VM)
+                                    .help(HELP_MSG)
+                                    .labelNames(LABEL_IP_5_TUPLE).register();
+
+    private static Counter pktDevice = Counter.build().name(PKT_DEVICE)
+                                    .help(HELP_MSG)
+                                    .labelNames(LABEL_DEV_ID).register();
+
+    private static Counter pktSrcIp = Counter.build().name(PKT_SRC_IP)
+                                    .help(HELP_MSG)
+                                    .labelNames(LABEL_SRC_IP).register();
+
+    private static Counter pktDstIp = Counter.build().name(PKT_DST_IP)
+                                    .help(HELP_MSG)
+                                    .labelNames(LABEL_DST_IP).register();
+
+    private static Counter pktError = Counter.build().name(PKT_ERROR)
+                                    .help(HELP_MSG)
+                                    .register();
+    private static Counter pktDrop = Counter.build().name(PKT_DROP)
+                                    .help(HELP_MSG)
+                                    .register();
+
+    @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
+    protected OpenstackTelemetryService openstackTelemetryService;
+
+    @Activate
+    protected void activate() {
+        openstackTelemetryService.addTelemetryService(this);
+        log.info("Started");
+    }
+
+    @Deactivate
+    protected void deactivate() {
+        stop();
+        openstackTelemetryService.removeTelemetryService(this);
+        log.info("Stopped");
+    }
+
+    @Override
+    public void start(TelemetryConfig config) {
+        log.info("Prometheus exporter starts.");
+
+        PrometheusTelemetryConfig prometheusConfig = (PrometheusTelemetryConfig) config;
+
+        try {
+            // TODO  Offer a 'Authentication'
+            prometheusExporter = new Server(prometheusConfig.port());
+            ServletContextHandler context = new ServletContextHandler();
+            context.setContextPath("/");
+            prometheusExporter.setHandler(context);
+            context.addServlet(new ServletHolder(new MetricsServlet()), "/metrics");
+
+            log.info("Prometeus server start");
+
+            prometheusExporter.start();
+        } catch (Exception ex) {
+            log.warn("Exception: {}", ex.toString());
+        }
+    }
+
+    @Override
+    public void stop() {
+        try {
+            prometheusExporter.stop();
+        } catch (Exception ex) {
+            log.warn("Exception: {}", ex.toString());
+        }
+        log.info("Prometheus exporter has stopped");
+    }
+
+    @Override
+    public void restart(TelemetryConfig config) {
+        stop();
+        start(config);
+    }
+
+    @Override
+    public void publish(Set<FlowInfo> flowInfos) {
+        if (flowInfos.size() == 0) {
+            log.debug("No record to publish");
+            return;
+        }
+
+        long flowByte;
+        int flowPkt;
+        for (FlowInfo flowInfo: flowInfos) {
+            flowByte = flowInfo.statsInfo().currAccBytes() - flowInfo.statsInfo().prevAccBytes();
+            flowPkt = flowInfo.statsInfo().currAccPkts() - flowInfo.statsInfo().prevAccPkts();
+
+            byteVM2VM.labels(flowInfo.uniqueFlowInfoKey()).inc(flowByte);
+            byteDevice.labels(flowInfo.deviceId().toString()).inc(flowByte);
+            byteSrcIp.labels(flowInfo.srcIp().toString()).inc(flowByte);
+            byteDstIp.labels(flowInfo.dstIp().toString()).inc(flowByte);
+
+            pktVM2VM.labels(flowInfo.uniqueFlowInfoKey()).inc(flowPkt);
+            pktDevice.labels(flowInfo.deviceId().toString()).inc(flowPkt);
+            pktSrcIp.labels(flowInfo.srcIp().toString()).inc(flowPkt);
+            pktDstIp.labels(flowInfo.dstIp().toString()).inc(flowPkt);
+
+            pktError.inc(flowInfo.statsInfo().errorPkts());
+            pktDrop.inc(flowInfo.statsInfo().dropPkts());
+        }
+    }
+
+    @Override
+    public boolean isRunning() {
+        log.info("Prometheus Exporter State: {}", prometheusExporter.isRunning());
+        return prometheusExporter.isRunning();
+    }
+}
diff --git a/apps/openstacktelemetry/app/src/test/java/org/onosproject/openstacktelemetry/config/DefaultPrometheusTelemetryConfigTest.java b/apps/openstacktelemetry/app/src/test/java/org/onosproject/openstacktelemetry/config/DefaultPrometheusTelemetryConfigTest.java
new file mode 100644
index 0000000..3e291c2
--- /dev/null
+++ b/apps/openstacktelemetry/app/src/test/java/org/onosproject/openstacktelemetry/config/DefaultPrometheusTelemetryConfigTest.java
@@ -0,0 +1,113 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * 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.
+ */
+package org.onosproject.openstacktelemetry.config;
+
+import com.google.common.collect.ImmutableMap;
+import com.google.common.testing.EqualsTester;
+import org.junit.Before;
+import org.junit.Test;
+import org.onosproject.openstacktelemetry.api.config.PrometheusTelemetryConfig;
+
+import java.util.Map;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.is;
+import static org.onlab.junit.ImmutableClassChecker.assertThatClassIsImmutable;
+import static org.onosproject.openstacktelemetry.api.Constants.DEFAULT_PROMETHEUS_EXPORTER_IP;
+import static org.onosproject.openstacktelemetry.api.Constants.DEFAULT_PROMETHEUS_EXPORTER_PORT;
+
+/**
+ * Unit tests for DefaultPrometheusTelemetryConfig class.
+ */
+public class DefaultPrometheusTelemetryConfigTest {
+
+    private static final String IP_ADDRESS_1 = DEFAULT_PROMETHEUS_EXPORTER_IP;
+    private static final String IP_ADDRESS_2 = "10.10.1.2";
+
+    private static final int PORT_1 = DEFAULT_PROMETHEUS_EXPORTER_PORT;
+    private static final int PORT_2 = DEFAULT_PROMETHEUS_EXPORTER_PORT + 1;
+
+    private static final Map<String, Object> CONFIG_MAP_1 =
+            ImmutableMap.of("key1", "value1");
+    private static final Map<String, Object> CONFIG_MAP_2 =
+            ImmutableMap.of("key2", "value2");
+
+    private PrometheusTelemetryConfig config1;
+    private PrometheusTelemetryConfig sameAsConfig1;
+    private PrometheusTelemetryConfig config2;
+
+    /**
+     * Initial setup for this unit test.
+     */
+    @Before
+    public void setup() {
+
+        PrometheusTelemetryConfig.Builder builder1 =
+                new DefaultPrometheusTelemetryConfig.DefaultBuilder();
+        PrometheusTelemetryConfig.Builder builder2 =
+                new DefaultPrometheusTelemetryConfig.DefaultBuilder();
+        PrometheusTelemetryConfig.Builder builder3 =
+                new DefaultPrometheusTelemetryConfig.DefaultBuilder();
+
+        config1 = builder1
+                .withAddress(IP_ADDRESS_1)
+                .withPort(PORT_1)
+                .withConfigMap(CONFIG_MAP_1)
+                .build();
+
+        sameAsConfig1 = builder2
+                .withAddress(IP_ADDRESS_1)
+                .withPort(PORT_1)
+                .withConfigMap(CONFIG_MAP_1)
+                .build();
+
+        config2 = builder3
+                .withAddress(IP_ADDRESS_2)
+                .withPort(PORT_2)
+                .withConfigMap(CONFIG_MAP_2)
+                .build();
+    }
+
+    /**
+     * Tests class immutability.
+     */
+    @Test
+    public void testImmutability() {
+        assertThatClassIsImmutable(DefaultPrometheusTelemetryConfig.class);
+    }
+
+    /**
+     * Tests object equality.
+     */
+    @Test
+    public void testEquality() {
+        new EqualsTester()
+                .addEqualityGroup(config1, sameAsConfig1)
+                .addEqualityGroup(config2).testEquals();
+    }
+
+    /**
+     * Tests object construction.
+     */
+    @Test
+    public void testConstruction() {
+        PrometheusTelemetryConfig config = config1;
+
+        assertThat(config.address(), is(IP_ADDRESS_1));
+        assertThat(config.port(), is(PORT_1));
+        assertThat(config.configMap(), is(CONFIG_MAP_1));
+    }
+}
diff --git a/lib/BUCK b/lib/BUCK
index e89fa92..c202051 100644
--- a/lib/BUCK
+++ b/lib/BUCK
@@ -1,4 +1,4 @@
-# ***** This file was auto-generated at Mon, 10 Sep 2018 20:11:15 GMT. Do not edit this file manually. *****
+# ***** This file was auto-generated at Thu, 27 Sep 2018 15:25:26 GMT. Do not edit this file manually. *****
 # ***** Use onos-lib-gen *****
 
 pass_thru_pom(
@@ -610,6 +610,42 @@
 )
 
 remote_jar (
+  name = 'simpleclient',
+  out = 'simpleclient-0.5.0.jar',
+  url = 'mvn:io.prometheus:simpleclient:jar:0.5.0',
+  sha1 = 'fbbfe2300098798e3d23f93b7b14befeceacf512',
+  maven_coords = 'io.prometheus:simpleclient:0.5.0',
+  visibility = [ 'PUBLIC' ],
+)
+
+remote_jar (
+  name = 'simpleclient_common',
+  out = 'simpleclient_common-0.5.0.jar',
+  url = 'mvn:io.prometheus:simpleclient_common:jar:0.5.0',
+  sha1 = 'bfd93082d7cf85c0543c2ccc286b96c817d1090c',
+  maven_coords = 'io.prometheus:simpleclient_common:0.5.0',
+  visibility = [ 'PUBLIC' ],
+)
+
+remote_jar (
+  name = 'simpleclient_hotspot',
+  out = 'simpleclient_hotspot-0.5.0.jar',
+  url = 'mvn:io.prometheus:simpleclient_hotspot:jar:0.5.0',
+  sha1 = '0f341cb84d6713255b1ce46c7593eee50a35d414',
+  maven_coords = 'io.prometheus:simpleclient_hotspot:0.5.0',
+  visibility = [ 'PUBLIC' ],
+)
+
+remote_jar (
+  name = 'simpleclient_servlet',
+  out = 'simpleclient_servlet-0.5.0.jar',
+  url = 'mvn:io.prometheus:simpleclient_servlet:jar:0.5.0',
+  sha1 = '28d75ee90a5c2ac70eeebb0864b15885116207a4',
+  maven_coords = 'io.prometheus:simpleclient_servlet:0.5.0',
+  visibility = [ 'PUBLIC' ],
+)
+
+remote_jar (
   name = 'retrofit',
   out = 'retrofit-2.3.0.jar',
   url = 'mvn:com.squareup.retrofit2:retrofit:jar:2.3.0',
@@ -853,6 +889,24 @@
 )
 
 remote_jar (
+  name = 'jetty-servlet',
+  out = 'jetty-servlet-9.2.26.v20180806.jar',
+  url = 'mvn:org.eclipse.jetty:jetty-servlet:jar:9.2.26.v20180806',
+  sha1 = '7d54ae4579454d9df2c3324de7eddfbd81ffb8cc',
+  maven_coords = 'org.eclipse.jetty:jetty-servlet:9.2.26.v20180806',
+  visibility = [ 'PUBLIC' ],
+)
+
+remote_jar (
+  name = 'jetty-security',
+  out = 'jetty-security-9.2.21.v20170120.jar',
+  url = 'mvn:org.eclipse.jetty:jetty-security:jar:9.2.21.v20170120',
+  sha1 = 'ceb39cd058fa22172c6e7ef493af90891e701f23',
+  maven_coords = 'org.eclipse.jetty:jetty-security:9.2.21.v20170120',
+  visibility = [ 'PUBLIC' ],
+)
+
+remote_jar (
   name = 'jetty-continuation',
   out = 'jetty-continuation-9.2.21.v20170120.jar',
   url = 'mvn:org.eclipse.jetty:jetty-continuation:jar:9.2.21.v20170120',
diff --git a/lib/deps.json b/lib/deps.json
index 6a52650..a5bd894 100644
--- a/lib/deps.json
+++ b/lib/deps.json
@@ -179,6 +179,10 @@
     "httpclient-osgi": "mvn:org.apache.httpcomponents:httpclient-osgi:4.5.1",
     "httpcore-osgi": "mvn:org.apache.httpcomponents:httpcore-osgi:4.4.4",
     "influxdb-java": "mvn:org.influxdb:influxdb-java:2.9",
+    "simpleclient": "mvn:io.prometheus:simpleclient:0.5.0",
+    "simpleclient_common": "mvn:io.prometheus:simpleclient_common:0.5.0",
+    "simpleclient_hotspot": "mvn:io.prometheus:simpleclient_hotspot:0.5.0",
+    "simpleclient_servlet": "mvn:io.prometheus:simpleclient_servlet:0.5.0",
     "retrofit": "mvn:com.squareup.retrofit2:retrofit:2.3.0",
     "converter-moshi": "mvn:com.squareup.retrofit2:converter-moshi:2.3.0",
     "okhttp": "mvn:com.squareup.okhttp3:okhttp:3.9.1",
@@ -210,6 +214,8 @@
     "jetty-util": "mvn:org.eclipse.jetty:jetty-util:9.2.21.v20170120",
     "jetty-websocket": "mvn:org.eclipse.jetty:jetty-websocket:8.1.19.v20160209",
     "jetty-server": "mvn:org.eclipse.jetty:jetty-server:9.2.21.v20170120",
+    "jetty-servlet": "mvn:org.eclipse.jetty:jetty-servlet:9.2.26.v20180806",
+    "jetty-security": "mvn:org.eclipse.jetty:jetty-security:9.2.21.v20170120",
     "jetty-continuation": "mvn:org.eclipse.jetty:jetty-continuation:9.2.21.v20170120",
     "jetty-http": "mvn:org.eclipse.jetty:jetty-http:9.2.21.v20170120",
     "jetty-io": "mvn:org.eclipse.jetty:jetty-io:9.2.21.v20170120",
diff --git a/tools/build/bazel/generate_workspace.bzl b/tools/build/bazel/generate_workspace.bzl
index 44da091..500fd0b 100644
--- a/tools/build/bazel/generate_workspace.bzl
+++ b/tools/build/bazel/generate_workspace.bzl
@@ -1,4 +1,4 @@
-# ***** This file was auto-generated at Mon, 10 Sep 2018 20:10:18 GMT. Do not edit this file manually. *****
+# ***** This file was auto-generated at Thu, 27 Sep 2018 15:23:13 GMT. Do not edit this file manually. *****
 # ***** Use onos-lib-gen *****
 
 load("//tools/build/bazel:variables.bzl", "ONOS_GROUP_ID", "ONOS_VERSION")
@@ -399,6 +399,30 @@
             jar_sha256 = "c2c35eff56e5b101028a52f5fa2bc25e7b5e0f6c7b7fdf9f5c8ed503621547eb",
             licenses = ["notice"],
             jar_urls = ["http://repo1.maven.org/maven2/org/influxdb/influxdb-java/2.9/influxdb-java-2.9.jar"],        )
+    if "simpleclient" not in native.existing_rules():
+        java_import_external(
+            name = "simpleclient",
+            jar_sha256 = "68e20a01ec974f382553b763f58594416c3c652b7067d8aeccf1a5ea6c8b1d0d",
+            licenses = ["notice"],
+            jar_urls = ["http://repo1.maven.org/maven2/io/prometheus/simpleclient/0.5.0/simpleclient-0.5.0.jar"],        )
+    if "simpleclient_common" not in native.existing_rules():
+        java_import_external(
+            name = "simpleclient_common",
+            jar_sha256 = "41d881034a44639d5717d71c61d207b8580bc755e0c0a6f4a1ec7137a7274366",
+            licenses = ["notice"],
+            jar_urls = ["http://repo1.maven.org/maven2/io/prometheus/simpleclient_common/0.5.0/simpleclient_common-0.5.0.jar"],        )
+    if "simpleclient_hotspot" not in native.existing_rules():
+        java_import_external(
+            name = "simpleclient_hotspot",
+            jar_sha256 = "93f4f9e43948599ce42e38b3899194a130989d967eba47233abe16177fef1d06",
+            licenses = ["notice"],
+            jar_urls = ["http://repo1.maven.org/maven2/io/prometheus/simpleclient_hotspot/0.5.0/simpleclient_hotspot-0.5.0.jar"],        )
+    if "simpleclient_servlet" not in native.existing_rules():
+        java_import_external(
+            name = "simpleclient_servlet",
+            jar_sha256 = "f8c1d2879588475a4a2600f286347203ef71fdde68ebac0006498c821e6d0de3",
+            licenses = ["notice"],
+            jar_urls = ["http://repo1.maven.org/maven2/io/prometheus/simpleclient_servlet/0.5.0/simpleclient_servlet-0.5.0.jar"],        )
     if "retrofit" not in native.existing_rules():
         java_import_external(
             name = "retrofit",
@@ -561,6 +585,18 @@
             jar_sha256 = "b47f7bdf72133e7dfd30fc8ae6f08080f2a808026102bd194b70bba98fd5fa7e",
             licenses = ["notice"],
             jar_urls = ["http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-server/9.2.21.v20170120/jetty-server-9.2.21.v20170120.jar"],        )
+    if "jetty_servlet" not in native.existing_rules():
+        java_import_external(
+            name = "jetty_servlet",
+            jar_sha256 = "84843dd91905a6e12242f41efe4b58d7009f5714b602b380d2c8e3b0513f0eb8",
+            licenses = ["notice"],
+            jar_urls = ["http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-servlet/9.2.26.v20180806/jetty-servlet-9.2.26.v20180806.jar"],        )
+    if "jetty_security" not in native.existing_rules():
+        java_import_external(
+            name = "jetty_security",
+            jar_sha256 = "397d7bb721e51060cb62f01814b9cabbe6700080f2e39143544cc78fddc23f3f",
+            licenses = ["notice"],
+            jar_urls = ["http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-security/9.2.21.v20170120/jetty-security-9.2.21.v20170120.jar"],        )
     if "jetty_continuation" not in native.existing_rules():
         java_import_external(
             name = "jetty_continuation",
@@ -1368,6 +1404,10 @@
 artifact_map["@httpclient_osgi//:httpclient_osgi"] = "mvn:org.apache.httpcomponents:httpclient-osgi:jar:4.5.1"
 artifact_map["@httpcore_osgi//:httpcore_osgi"] = "mvn:org.apache.httpcomponents:httpcore-osgi:jar:4.4.4"
 artifact_map["@influxdb_java//:influxdb_java"] = "mvn:org.influxdb:influxdb-java:jar:NON-OSGI:2.9"
+artifact_map["@simpleclient//:simpleclient"] = "mvn:io.prometheus:simpleclient:jar:0.5.0"
+artifact_map["@simpleclient_common//:simpleclient_common"] = "mvn:io.prometheus:simpleclient_common:jar:0.5.0"
+artifact_map["@simpleclient_hotspot//:simpleclient_hotspot"] = "mvn:io.prometheus:simpleclient_hotspot:jar:0.5.0"
+artifact_map["@simpleclient_servlet//:simpleclient_servlet"] = "mvn:io.prometheus:simpleclient_servlet:jar:0.5.0"
 artifact_map["@retrofit//:retrofit"] = "mvn:com.squareup.retrofit2:retrofit:jar:NON-OSGI:2.3.0"
 artifact_map["@converter_moshi//:converter_moshi"] = "mvn:com.squareup.retrofit2:converter-moshi:jar:NON-OSGI:2.3.0"
 artifact_map["@okhttp//:okhttp"] = "mvn:com.squareup.okhttp3:okhttp:jar:NON-OSGI:3.9.1"
@@ -1395,6 +1435,8 @@
 artifact_map["@jetty_util//:jetty_util"] = "mvn:org.eclipse.jetty:jetty-util:jar:9.2.21.v20170120"
 artifact_map["@jetty_websocket//:jetty_websocket"] = "mvn:org.eclipse.jetty:jetty-websocket:jar:8.1.19.v20160209"
 artifact_map["@jetty_server//:jetty_server"] = "mvn:org.eclipse.jetty:jetty-server:jar:9.2.21.v20170120"
+artifact_map["@jetty_servlet//:jetty_servlet"] = "mvn:org.eclipse.jetty:jetty-servlet:jar:9.2.26.v20180806"
+artifact_map["@jetty_security//:jetty_security"] = "mvn:org.eclipse.jetty:jetty-security:jar:9.2.21.v20170120"
 artifact_map["@jetty_continuation//:jetty_continuation"] = "mvn:org.eclipse.jetty:jetty-continuation:jar:9.2.21.v20170120"
 artifact_map["@jetty_http//:jetty_http"] = "mvn:org.eclipse.jetty:jetty-http:jar:9.2.21.v20170120"
 artifact_map["@jetty_io//:jetty_io"] = "mvn:org.eclipse.jetty:jetty-io:jar:9.2.21.v20170120"