The web based syslog https://lggr.io
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

stats.php 2.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php
  2. require 'inc/pre.inc.php';
  3. $searchvalue = '';
  4. $searchvalueprog = '';
  5. define('TITLE', 'statistics');
  6. require 'tpl/head.inc.php';
  7. $l = null;
  8. try {
  9. $l = new Lggr($state, $config);
  10. $aLevels = $l->getLevels();
  11. $aServers = $l->getServers();
  12. $aStatistic = $l->getStatistic();
  13. $aStatistic = $aStatistic[0];
  14. $aArchivedStatistic = $l->getArchivedStatistic();
  15. $aArchivedStatistic = $aArchivedStatistic[0];
  16. $aMsgPerHour = $l->getMessagesPerHour();
  17. }
  18. catch (LggrException $e) {
  19. echo '<div class="container"><div class="alert alert-danger" role="alert">' .
  20. $e->getMessage() . '</div></div>';
  21. require 'tpl/foot.inc.php';
  22. exit();
  23. }
  24. require 'tpl/nav.inc.php';
  25. ?>
  26. <div id="statsheader" class="container">
  27. <div class="row">
  28. <div class="col-md-6">
  29. <h2>
  30. <span class="glyphicon glyphicon-time"
  31. aria-hidden="true"></span> <?= _('Messages per hour') ?></h2>
  32. <canvas id="chartMsgsPerHour"></canvas>
  33. </div>
  34. <div class="col-md-6">
  35. <h2>
  36. <span class="glyphicon glyphicon-cd" aria-hidden="true"></span> <?= _('Servers') ?></h2>
  37. <canvas id="chartServers"></canvas>
  38. </div>
  39. </div>
  40. <div class="row">
  41. <div class="col-md-4">
  42. <h2>
  43. <span class="glyphicon glyphicon-signal"
  44. aria-hidden="true"></span> <?= _('Message levels relative distribution') ?></h2>
  45. <canvas id="chartLevels"></canvas>
  46. </div>
  47. <div class="col-md-4">
  48. <h2>
  49. <span class="glyphicon glyphicon-cd" aria-hidden="true"></span> <?= _('Messages by server') ?></h2>
  50. <canvas id="chartServersPie"></canvas>
  51. </div>
  52. <div class="col-md-4">
  53. <h2>
  54. <span class="glyphicon glyphicon-wrench"
  55. aria-hidden="true"></span> <?= _('Database') ?></h2>
  56. <p><?= _('Events in DB') ?>: <?= number_format($aStatistic->cnt) ?><br><?= _('Oldest entry') ?>: <?= $aStatistic->oldest ?></p>
  57. <p><?= _('Archived') ?>: <?= number_format($aArchivedStatistic->cnt) ?></p>
  58. </div>
  59. </div>
  60. <div class="row">
  61. <div class="col-md-6">
  62. <h2>Program Cloud</h2>
  63. <div id="cloudcontainer"></div>
  64. </div>
  65. </div>
  66. </div>
  67. <!-- container -->
  68. <?php
  69. $aPerf = $l->getPerf();
  70. require 'tpl/foot.inc.php'?>
Social stuff:
Mastodon