dns.js 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /*
  2. * Copyright 2011 Manuel Munz <freifunk at somakoma dot de>
  3. * Licensed to the public under the Apache License 2.0.
  4. */
  5. 'use strict';
  6. 'require baseclass';
  7. return baseclass.extend({
  8. title: _('DNS'),
  9. rrdargs: function(graph, host, plugin, plugin_instance, dtype) {
  10. var traffic = {
  11. title: "%H: DNS traffic",
  12. vlabel: "Bit/s",
  13. data: {
  14. sources: {
  15. dns_octets: [ "queries", "responses" ]
  16. },
  17. options: {
  18. dns_octets__responses: {
  19. total: true,
  20. color: "00ff00",
  21. title: "Responses"
  22. },
  23. dns_octets__queries: {
  24. total: true,
  25. color: "0000ff",
  26. title: "Queries"
  27. }
  28. }
  29. }
  30. };
  31. var opcode_query = {
  32. title: "%H: DNS Opcode Query",
  33. vlabel: "Queries/s",
  34. data: {
  35. instances: {
  36. dns_opcode: [ "Query" ]
  37. },
  38. options: {
  39. dns_opcode_Query_value: {
  40. total: true,
  41. color: "0000ff",
  42. title: "Queries/s"
  43. }
  44. }
  45. }
  46. };
  47. var qtype = {
  48. title: "%H: DNS QType",
  49. vlabel: "Queries/s",
  50. data: {
  51. sources: { dns_qtype: [ "" ] },
  52. options: {
  53. dns_qtype_AAAA_ : { title: "AAAA", noarea: true, total: true },
  54. dns_qtype_A_ : { title: "A", noarea: true, total: true },
  55. dns_qtype_A6_ : { title: "A6", noarea: true, total: true },
  56. dns_qtype_TXT_ : { title: "TXT", noarea: true, total: true },
  57. dns_qtype_MX_ : { title: "MX", noarea: true, total: true },
  58. dns_qtype_NS_ : { title: "NS", noarea: true, total: true },
  59. dns_qtype_ANY_ : { title: "ANY", noarea: true, total: true },
  60. dns_qtype_CNAME_: { title: "CNAME", noarea: true, total: true },
  61. dns_qtype_SOA_ : { title: "SOA", noarea: true, total: true },
  62. dns_qtype_SRV_ : { title: "SRV", noarea: true, total: true },
  63. dns_qtype_PTR_ : { title: "PTR", noarea: true, total: true },
  64. dns_qtype_RP_ : { title: "RP", noarea: true, total: true },
  65. dns_qtype_MAILB_: { title: "MAILB", noarea: true, total: true },
  66. dns_qtype_IXFR_ : { title: "IXFR", noarea: true, total: true },
  67. dns_qtype_HINFO_: { title: "HINFO", noarea: true, total: true },
  68. },
  69. }
  70. };
  71. return [ traffic, opcode_query, qtype ];
  72. }
  73. });