zoukankan      html  css  js  c++  java
  • 集群健康检查api

    [elk@node01 ~]$ curl  http://192.168.137.2:9200/_cat/health?v
    epoch      timestamp cluster    status node.total node.data shards pri relo init unassign pending_tasks max_task_wait_time active_shards_percent 
    1496001824 04:03:44  es_cluster yellow          1         1     38  38    0    0       33             0                  -                 53.5% 
    
    
    [elk@node01 api]$ cat a1.pl 
    use  LWP::UserAgent;   
    my $ua = LWP::UserAgent->new;  
    $ua->timeout(10);  
    $ua->env_proxy;  
    $ua->agent("Mozilla/8.0");  
    my $host = "http://192.168.137.2:9200/_cat/health?v";  
    my $response = $ua->get($host);  
       $ua->default_headers;  
      if ($response->is_success) {  
          print $response->decoded_content;  # or whatever  
       }  
        else {  
        die $response->status_line;  
    } 
    [elk@node01 api]$ perl a1.pl 
    epoch      timestamp cluster    status node.total node.data shards pri relo init unassign pending_tasks max_task_wait_time active_shards_percent 
    1496002292 04:11:32  es_cluster yellow          1         1     38  38    0    0       33             0                  -                 53.5% 
    [elk@node01 api]$ 

  • 相关阅读:
    eclipse如何卸载adt插件
    Android中的Toast.LENGTH_SHORT
    Frogger
    - Oil Deposits 深搜,就是所谓的dfs
    Aggressive cows
    Phone List
    Word Amalgamation
    Street Numbers
    Charm Bracelet——背包问题
    函数参考
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13349698.html
Copyright © 2011-2022 走看看