Ciena MCP Poller Microservice
Overview
ciena-mcp-poller microservice is created to poll topology, metrics and events data from ciena mcp via API & Websocket using Bearer token for authentication. It collects data in regular intervals, normalizes it and writes it to topics from which graph-sink, metric-sink and event-sink will ingest the data. Topology is polled every 24 hours, metrics are polled every 15 mins and events are polled every 5 mins.
Prerequisites
-
A microservices cluster must be setup. Refer to Microservice Cluster Setup.
-
Apache Pulsar must be installed. Refer to Apache Pulsar microservice.
-
Assure1 core microservices graph-sink, metric-sink, event-sink and event-canal must be installed.
-
Ciena MCP API Urls and Websocket URL.
- Kubernetes secret should be created to pass the username and password with a below command:
As assure1 user:
a1k create secret generic ciena-mcp-credentials --from-literal=username=<username> --from-literal=password='<password>' -n <namespace>
Topology Polling:
CienaMCP provides topology data as a historical transaction log of topology entries. Upon initial startup poller will read historical transaction logs and rebuild topology in Assure1 after which it will switch to topology live streaming (All Ciena topology changes will be reflected live in Assure1).
If websocket streaming is set to false, api polling will occur every 24 hours, where changes from last day will be reflected in Assure1.
IMPORTANT NOTE: As per Ciena docs, CienaMCP system will persist authorization token by default for a week. If the Ciena system will be down longer than this period of time, previously polled Ciena topology data in Assure1 needs to be deleted manually leveraging _source
Vertex/Edge property in graph database and poller microservice restarted. Since Ciena system would loose all "transaction index tracking" capabilities topology needs to be rebuilt again from transaction log (Poller will do it automatically upon recognizing invalidated token).
METRIC Polling:
- Metrics are collected via API calls in a configurable interval. There is some delay in the availability of the historical metric data in the API server. Hence currently the polling will start after 3 mins of the fixed polling time.
- The collected metrics will be sent to the metric sink topic via pulsar.
Redundancy
Cluster level redundancy has been implemented (Please refer to Cluster Redundancy docs).
The poller can be deployed as a secondary service pointing to the failover Ciena MCP server by configuring CIENA_FAILOVER to true. The secondary service will poll secondary Ciena system in parallel and discard data if the primary poller status is good. It will check the primary poller availability every 5 seconds and take over responsibilities if the primary Ciena system is unreachable or the primary poller is unreachable. It will graciously hand over responsibilities to primary poller once its available and/or the Ciena system is back up.
When deploying microservice as secondary poller
IMPORTANT NOTE: When deploying secondary Ciena poller:
- Make sure to install it in respective sec namespace a1-zoneX-sec
- Use the use following secret name: secondary-ciena-mcp-credentials
Setup
su - assure1
export NAMESPACE=a1-zone1-pri
export WEBFQDN=<Primary Presentation Web FQDN>
a1helm install ciena-mcp-poller assure1/ciena-mcp-poller -n $NAMESPACE --set global.imageRegistry=$WEBFQDN
Default Configuration
Name | Value | Possible Values | Notes |
---|---|---|---|
LOG_LEVEL | DEBUG | FATAL, ERROR, WARN, INFO, DEBUG | Logging level used by application. |
PULSAR_STREAM | pulsar+ssl://pulsar-broker.a1-messaging.svc.cluster.local | Text, 255 characters | Apache Pulsar topic path. Topic at end of path may be any text value |
STREAM_OUTPUT_METRIC | persistent://assure1/metric/sink | Text, 255 characters | Metric sink topic path. |
STREAM_OUTPUT_GRAPH | persistent://assure1/graph/sink | Text, 255 characters | Graph sink topic path. |
STREAM_OUTPUT_EVENT | persistent://assure1/event/sink | Text, 255 characters | Event sink topic path. |
METRIC_POLLING_INTERVAL | "15" | Integer | Time in minutes between polls of the metrics data |
TOPOLOGY_TIMER: | "00:00" | Text in Hours:Minutes format | Time in Hours : Minutes to poll topology data |
METRIC_TYPES: | "OCH-SPANLOSS,OCH-SPANLOSSMAX,OCH-SPANLOSSMIN" | List of metrics types or * | List of metrics types to be polled. Setting * collects all metrics. |
TOPOLOGY_WEBSOCKET_STREAM | "true" | "true" or "false" | Mode of live topology transaction collection. Either API or websocket |
FAILOVER_POLLER | "false" | "true" or "false" | Specifies whether it is a failover poller |
PRIMARY_POLLER_NAME_OVERRIDE | "ciena-mcp-poller-primary" | Text, 255 characters | Name of the primary poller |
FAILOVER_POLLER_NAME_OVERRIDE | "ciena-mcp-poller-failover" | Text, 255 characters | Name of the secondary poller |
Configurations can be changed by passing the values to the a1helm install
prefixed with the configData parent key.
Example of setting the log level to INFO
a1helm install ... --set configData.LOG_LEVEL=INFO