Why 'active shard percent' is sometime less less than 100?

Why 'active shard percent' is sometime less less than 100?

9884
Created On 02/07/24 03:14 AM - Last Modified 02/07/24 04:30 AM


Question


Why 'active shard percent' is sometime less less than 100?

Environment


  • Panorama configured as either 'Panorama mode' or 'logger' mode'
  • PAN-OS 9.1 or higher
  • Elasticsearch enabled


Answer


  1. "active shard percent as number" can be checked using "show log-collector-es-cluster health" command.
  2. The ''active_shards_percent_as_number"  indicates the percentage of shards that are currently active in the ES cluster.
  3. If some shards are in 'unassigned' or initializing' state then this value will be less than 100% as can be seen in the below output.
> show log-collector-es-cluster health
 "cluster_name" : "__pan_cluster__",
  
"status" : "yellow",
  "timed_out" : false,
  "number_of_nodes" : 2,
  "number_of_data_nodes" : 2,
  "active_primary_shards" : 825,
  "active_shards" : 1441,
  "relocating_shards" : 0,
  "initializing_shards" : 32,
  "unassigned_shards" : 169,
  "delayed_unassigned_shards" : 0,
  "number_of_pending_tasks" : 0,
  "number_of_in_flight_fetch" : 0,
  "task_max_waiting_in_queue_millis" : 0,
  "active_shards_percent_as_number" : 87.75883069427528
  • initializing_shards : 32 > This is the number of shards that are actively being initialized.
  • Unassigned_shards: 169 > This is the number of shards that haven't yet been assigned
  • In ideal state, both 'initializing_shards' and 'Unassigned_shards' should be zero and 'active_shards_percent_as_number' should be 100% , but in some cases, Elasticsearch can  still work without issue even this value is not 100%. 


 



Additional Information


One scenario can be if  'unassigned shards' are replica shards and redundancy is not enabled.
In this case replica shards cannot be assigned to its peer log collector, hence they will remain in unassigned state unless manually deleted.
 


Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA14u0000008X1gCAE&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail

Choose Language