generate_dashboard_json.php 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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' => 'http://%GangliaWebHostName%:%GangliaWebPort%/ganglia/graph.php?c=%GridSlavesClusterName%&g=load_report',
  29. 'title' => 'Load Report',
  30. 'description' => 'Key load metrics, aggregated across the slaves in the grid',
  31. 'link' => 'http://%GangliaWebHostName%:%GangliaWebPort%/ganglia/?c=%GridSlavesClusterName%'
  32. ),
  33. array
  34. (
  35. 'url' => 'http://%GangliaWebHostName%:%GangliaWebPort%/ganglia/graph.php?c=%GridSlavesClusterName%&g=mem_report',
  36. 'title' => 'Memory Report',
  37. 'description' => 'Key memory metrics, aggregated across the slaves in the grid',
  38. 'link' => 'http://%GangliaWebHostName%:%GangliaWebPort%/ganglia/?c=%GridSlavesClusterName%'
  39. ),
  40. array
  41. (
  42. 'url' => 'http://%GangliaWebHostName%:%GangliaWebPort%/ganglia/graph.php?c=%GridSlavesClusterName%&g=cpu_report',
  43. 'title' => 'CPU Report',
  44. 'description' => 'Key CPU metrics, aggregated across the slaves in the grid',
  45. 'link' => 'http://%GangliaWebHostName%:%GangliaWebPort%/ganglia/?c=%GridSlavesClusterName%'
  46. ),
  47. array
  48. (
  49. 'url' => 'http://%GangliaWebHostName%:%GangliaWebPort%/ganglia/graph.php?c=%GridSlavesClusterName%&g=network_report',
  50. 'title' => 'Network I/O Report',
  51. 'description' => 'Key network I/O metrics, aggregated across the slaves in the grid',
  52. 'link' => 'http://%GangliaWebHostName%:%GangliaWebPort%/ganglia/?c=%GridSlavesClusterName%'
  53. )
  54. )
  55. );
  56. echo json_encode($data);
  57. ?>