Ping Poller
Overview
The Ping Poller microservice performs ICMP discovery for the discovery request and pings the device for availability and performance.
Prerequisites
-
A microservices cluster must be setup. Refer to Microservice Cluster Setup.
-
Apache Pulsar must be installed. Refer to Apache Pulsar microservice.
-
The following core microservices must be installed as per the requirement
Setup
su - assure1
export NAMESPACE=a1-zone1-pri
export WEBFQDN=<Primary Presentation Web FQDN>
a1helm install ping-poller assure1/ping-poller -n $NAMESPACE --set global.imageRegistry=$WEBFQDN
Default Configuration
Name | Value | Possible Values | Notes |
---|---|---|---|
LOG_LEVEL | INFO | FATAL, ERROR, WARN, INFO, DEBUG | Workder level logging level used by application. |
REDUNDANCY_POLL_PERIOD | 5 | Integer | How often the secondary service checks to see if the primary is online, in seconds. |
REDUNDANCY_FAILOVER_THRESHOLD | 4 | Integer | The number of failed polls before the secondary becomes the active application. |
REDUNDANCY_FALLBACK_THRESHOLD | 1 | Integer | The number of successful polls before the secondary goes back to sleep. |
POLL_BY_IP | true | Bool | Use IP Address for ping polling instead of hostname |
Configurations can be changed by passing the values to the a1helm install
prefixed with the configData.
Default Configuration for Coordinator
Name | Value | Possible Values | Notes |
---|---|---|---|
LOG_LEVEL | "" | FATAL, ERROR, WARN, INFO, DEBUG | Coordinator level logging level used by application. |
PING_COUNT | "10" | Integer | Packet count to ping a device. |
PING_TIMEOUT | "4" | Integer | Time in seconds to timeout ping |
PORT_COORDINATOR | "" | Integer | Coordinator Port |
GRPC_FALLBACK_USE_IP | "" | Text | Connect to workers using ip address else fqdn |
PULSAR_PING_CONTROL_OVERRIDE | "" | persistent://assure1/discovery/ping-poller-zoneX | Overrides the pulsar topic from which ping poller requests to be received (same as where discovery service sends the request). Example- ping-poller-zone1 |
REDUNDANCY_POLL_PERIOD | 5 | Integer | How often the secondary service checks to see if the primary is online, in seconds. |
REDUNDANCY_FAILOVER_THRESHOLD | 4 | Integer | The number of failed polls before the secondary becomes the active application. |
REDUNDANCY_FALLBACK_THRESHOLD | 1 | Integer | The number of successful polls before the secondary goes back to sleep. |
PING_ASYNC_CASCADE | 10 | Integer | Delay (in ms) between sending ping requests (avoids socket congestion) |
DISCOVERY_WORKERS_PERCENTAGE | 10 | Integer | Percentage of workers dedicated strictly to discovery tasks. |
GRPC_IDLE_TIMEOUT_M | 0 | Integer | Timeout for idle grpc connections |
Configurations can be changed by passing the values to the a1helm install
prefixed with the coordinator.configData.
Default Configuration for worker
Name | Value | Possible Values | Notes |
---|---|---|---|
LOG_LEVEL | "info" | FATAL, ERROR, WARN, INFO, DEBUG | Worker level logging level used by application. |
PORT_COORDINATOR | "" | Integer | Coordinator Port |
PORT_WORKER | "" | Integer | Worker port |
GRPC_GRACEFUL_CONN_TIME | "" | 60(default value) | Before attempting to dial to coordinator, for specified time, try checking coordinator readiness. |
PING_MIN_PACKET_SIZE | "53" | Integer | Minimum packet size for pinging |
METRICS_TOPIC | "" | Text | Pulsar output topic for metrics |
RCA_TOPIC | "" | Text | Pulsar output topic for availablity |
PULSAR_DISCOVERY_CALLBACK_OVERRIDE | "" | persistent://assure1/discovery/discovery-service-zoneX | value to override the default discovery callback topic |
PING_TTL | 0 (Auto) | Integer | Ping packets TTL |
GRPC_IDLE_TIMEOUT_M | 0 | Timeout for idle grpc connections |
Configurations can be changed by passing the values to the a1helm install
prefixed with the worker.configData parent key respectively.
Example of setting the log level to DEBUG
a1helm install ... --set configData.LOG_LEVEL=DEBUG
Example of enabling redundancy
Redundancy will not be enabled by default. To enable this functionality, pass the following to the installation command:
a1helm install ... --set redundancy.enabled=true
Autoscaling
Autoscaling configurations can be changed by passing the values prefixed with worker.autoscaling
.
For microservice scaling options, please refer to the autoscaling docs.
On top of the standard autoscaling options, this microservice supports the following additional configurations:
Name | Value | Possible Values | Notes |
---|---|---|---|
totalTargetsPerWorker | 2000 | Integer | Number of targets that should be polled by each worker. |
Example of changing the auto-scaling value
To change the thresholds used for this functionality, pass the following to the installation command:
a1helm install ... --set worker.autoscaling.totalTargetsPerWorker=4000
Microservice self-metrics
The Ping Poller microservice exposes the following self-metrics to Prometheus.
Coordinator metrics table
Note:
Each of the below metrics is prefixed with ping_coordinator prefix. Example of a full metric name: ping_coordinator_acom_targets
Metric Name | Type | Description |
---|---|---|
acom_targets | Gauge | The number of acom targets that are to be polled |
polling_queue_length | Gauge | The length of the queue to be polled |
discovery_queue_length | Gauge | The length of the discovery queue to be polled |
total_availability_poll_cycle_time | Gauge | The total duration of the availability work done by all the workers |
total_discovery_poll_cycle_time | Gauge | The total duration of the discovery work done polled by all the workers |
polling_workers_count | Gauge | The number of polling workers being used |
discovery_workers_count | Gauge | The number of discovery workers being used |