generate_hdfs_hdp_json.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. /*
  3. *
  4. * Licensed to the Apache Software Foundation (ASF) under one
  5. * or more contributor license agreements. See the NOTICE file
  6. * distributed with this work for additional information
  7. * regarding copyright ownership. The ASF licenses this file
  8. * to you under the Apache License, Version 2.0 (the
  9. * "License"); you may not use this file except in compliance
  10. * with the License. You may obtain a copy of the License at
  11. *
  12. * http://www.apache.org/licenses/LICENSE-2.0
  13. *
  14. * Unless required by applicable law or agreed to in writing,
  15. * software distributed under the License is distributed on an
  16. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  17. * KIND, either express or implied. See the License for the
  18. * specific language governing permissions and limitations
  19. * under the License.
  20. *
  21. */
  22. $data = array
  23. (
  24. 'Global' => array
  25. (
  26. array
  27. (
  28. 'url' =>
  29. 'http://%GangliaWebHostName%:%GangliaWebPort%/ganglia/graph.php?c=%HDFSSlavesClusterName%&g=hdp_mon_hdfs_io_report',
  30. 'title' => 'HDFS I/O',
  31. 'description' => 'Bytes written to and read from HDFS, aggregated across all the DataNodes',
  32. 'link' => 'http://%GangliaWebHostName%:%GangliaWebPort%/ganglia/?c=%NameNodeClusterName%'
  33. ),
  34. array
  35. (
  36. 'url' =>
  37. 'http://%GangliaWebHostName%:%GangliaWebPort%/ganglia/graph.php?c=%NameNodeClusterName%&g=hdp_mon_hdfs_ops_report',
  38. 'title' => 'NameNode Operation Counts',
  39. 'description' => 'Counts of key operations on the NameNode, to give a feel for the high-level HDFS activity pattern',
  40. 'link' => 'http://%GangliaWebHostName%:%GangliaWebPort%/ganglia/?c=%NameNodeClusterName%'
  41. ),
  42. array
  43. (
  44. 'url' =>
  45. 'http://%GangliaWebHostName%:%GangliaWebPort%/ganglia/graph.php?c=%NameNodeClusterName%&g=hdp_mon_jvm_gc_report',
  46. 'title' => 'NameNode: JVM Garbage Collection',
  47. 'description' => 'Key Garbage Collection stats for the NameNode\'s JVM',
  48. 'link' => 'http://%GangliaWebHostName%:%GangliaWebPort%/ganglia/?c=%NameNodeClusterName%'
  49. ),
  50. array
  51. (
  52. 'url' =>
  53. 'http://%GangliaWebHostName%:%GangliaWebPort%/ganglia/graph.php?c=%NameNodeClusterName%&g=hdp_mon_rpc_latency_report',
  54. 'title' => 'NameNode: RPC Average Latencies',
  55. 'description' => 'Average latencies for processing and queue times on the NameNode, to give a feel for potential performance bottlenecks',
  56. 'link' => 'http://%GangliaWebHostName%:%GangliaWebPort%/ganglia/?c=%NameNodeClusterName%'
  57. )
  58. )
  59. );
  60. echo json_encode($data);
  61. ?>