Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2017
392
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 5.52 KB | None | 0 0
  1. diff -uNr upstream-ganglia/debian/changelog fastly-ganglia/debian/changelog
  2. --- upstream-ganglia/debian/changelog   2011-07-05 12:49:53.326995000 -0400
  3. +++ fastly-ganglia/debian/changelog 2011-07-07 10:49:29.952319239 -0400
  4. @@ -1,3 +1,34 @@
  5. +ganglia (3.2.0-7) unstable; urgency=low
  6. +  
  7. +  * Stop recording and propagating dmax entries asap
  8. +  * Dont save the last grid twice
  9. +
  10. + -- Artur Bergman <artur@fastly.com>  Thu, 07 Jul 2011 03:23:28 +0000
  11. +
  12. +ganglia (3.2.0-6) unstable; urgency=low
  13. +  
  14. +  * Propagate DMAX you piece of shit
  15. +
  16. + -- Artur Bergman <artur@fastly.com>  Thu, 07 Jul 2011 01:54:48 +0000
  17. +
  18. +ganglia (3.2.0-5) unstable; urgency=low
  19. +  
  20. +  * Fix to read the string value
  21. +
  22. + -- Artur Bergman <artur@fastly.com>  Wed, 06 Jul 2011 19:42:52 +0000
  23. +
  24. +ganglia (3.2.0-4) unstable; urgency=low
  25. +  
  26. +  * Actually fix code
  27. +
  28. + -- Artur Bergman <artur@fastly.com>  Wed, 06 Jul 2011 17:32:13 +0000
  29. +
  30. +ganglia (3.2.0-4) unstable; urgency=low
  31. +  
  32. +  * Re-export tags from gmetad
  33. +
  34. + -- Artur Bergman <artur@fastly.com>  Wed, 06 Jul 2011 16:38:49 +0000
  35. +
  36.  ganglia (3.2.0-3) unstable; urgency=low
  37.    
  38.    * Fix jasons broken adduser
  39. diff -uNr upstream-ganglia/gmetad/gmetad.h fastly-ganglia/gmetad/gmetad.h
  40. --- upstream-ganglia/gmetad/gmetad.h    2011-07-01 12:14:12.641109000 -0400
  41. +++ fastly-ganglia/gmetad/gmetad.h  2011-07-07 10:49:29.962319239 -0400
  42. @@ -189,6 +189,7 @@
  43.        uint32_t tmax;
  44.        uint32_t dmax;
  45.        short int location;
  46. +      short int tags;
  47.        uint32_t reported;
  48.        uint32_t started;
  49.        short int stringslen;
  50. diff -uNr upstream-ganglia/gmetad/process_xml.c fastly-ganglia/gmetad/process_xml.c
  51. --- upstream-ganglia/gmetad/process_xml.c   2010-02-05 17:03:45.236452000 -0500
  52. +++ fastly-ganglia/gmetad/process_xml.c 2011-07-07 10:49:29.962319239 -0400
  53. @@ -482,6 +482,7 @@
  54.     edge = 0;
  55.  
  56.     host->location = -1;
  57. +   host->tags = -1;
  58.     host->reported = reported;
  59.     host->tn = tn;
  60.     host->tmax = tmax;
  61. @@ -508,6 +509,9 @@
  62.                 case LOCATION_TAG:
  63.                    host->location = addstring(host->strings, &edge, attr[i+1]);
  64.                    break;
  65. +          case TAGS_TAG:
  66. +         host->tags = addstring(host->strings, &edge, attr[i+1]);
  67. +         break;
  68.                 case STARTED_TAG:
  69.                    host->started = strtoul(attr[i+1], (char **)NULL, 10);
  70.                    break;
  71. @@ -628,6 +632,10 @@
  72.        {
  73.           /* Save the data to a round robin database if the data source is alive
  74.            */
  75. +         fillmetric(attr, metric, type);
  76. +    if (metric->dmax && metric->tn > metric->dmax)
  77. +          return;
  78. +
  79.           if (do_summary && !xmldata->ds->dead && !xmldata->rval)
  80.              {
  81.                    debug_msg("Updating host %s, metric %s",
  82. @@ -640,7 +648,7 @@
  83.           metric->report_start = metric_report_start;
  84.           metric->report_end = metric_report_end;
  85.  
  86. -         fillmetric(attr, metric, type);
  87. +
  88.           edge = metric->stringslen;
  89.           metric->name = addstring(metric->strings, &edge, name);
  90.           metric->stringslen = edge;
  91. @@ -1164,7 +1172,7 @@
  92.        {
  93.           case GRID_TAG:
  94.              rc = endElement_GRID(data, el);
  95. -            /* No break. */
  96. +       break;
  97.  
  98.           case CLUSTER_TAG:
  99.              rc = endElement_CLUSTER(data, el);
  100. diff -uNr upstream-ganglia/gmetad/server.c fastly-ganglia/gmetad/server.c
  101. --- upstream-ganglia/gmetad/server.c    2009-01-25 06:18:30.107438000 -0500
  102. +++ fastly-ganglia/gmetad/server.c  2011-07-07 10:49:29.962319239 -0400
  103. @@ -141,6 +141,9 @@
  104.     tn = client->now.tv_sec - metric->t0.tv_sec;
  105.     if (tn<0) tn = 0;
  106.  
  107. +   if (metric->dmax && metric->dmax < tn)
  108. +     return 0;
  109. +
  110.     rc=xml_print(client, "<METRIC NAME=\"%s\" VAL=\"%s\" TYPE=\"%s\" "
  111.        "UNITS=\"%s\" TN=\"%u\" TMAX=\"%u\" DMAX=\"%u\" SLOPE=\"%s\" "
  112.        "SOURCE=\"%s\">\n",
  113. @@ -186,10 +189,10 @@
  114.  
  115.     /* Note the hash key is the host's IP address. */
  116.     rc = xml_print(client, "<HOST NAME=\"%s\" IP=\"%s\" REPORTED=\"%u\" "
  117. -      "TN=\"%u\" TMAX=\"%u\" DMAX=\"%u\" LOCATION=\"%s\" GMOND_STARTED=\"%u\">\n",
  118. +      "TN=\"%u\" TMAX=\"%u\" DMAX=\"%u\" LOCATION=\"%s\" GMOND_STARTED=\"%u\" TAGS=\"%s\">\n",
  119.        name, getfield(host->strings, host->ip), host->reported, tn,
  120.        host->tmax, host->dmax, getfield(host->strings, host->location),
  121. -      host->started);
  122. +         host->started, getfield(host->strings, host->tags));
  123.  
  124.     return rc;
  125.  }
  126. diff -uNr upstream-ganglia/gmond/gmond.c fastly-ganglia/gmond/gmond.c
  127. --- upstream-ganglia/gmond/gmond.c  2011-06-27 15:47:46.437353000 -0400
  128. +++ fastly-ganglia/gmond/gmond.c    2011-07-07 10:49:29.962319239 -0400
  129. @@ -1622,13 +1622,14 @@
  130.      }
  131.    
  132.    len = apr_snprintf(metricxml, 1024,
  133. -          "<METRIC NAME=\"%s\" VAL=\"%s\" TYPE=\"%s\" UNITS=\"%s\" TN=\"%d\" TMAX=\"%d\" DMAX=\"0\" SLOPE=\"%s\">\n",
  134. +          "<METRIC NAME=\"%s\" VAL=\"%s\" TYPE=\"%s\" UNITS=\"%s\" TN=\"%d\" TMAX=\"%d\" DMAX=\"%d\" SLOPE=\"%s\">\n",
  135.                metricName,
  136.                gmetric_value_to_str(&(val->message_u.v_message)),
  137.                data->message_u.f_message.Ganglia_metadata_msg_u.gfull.metric.type,
  138.                data->message_u.f_message.Ganglia_metadata_msg_u.gfull.metric.units,
  139.                (int)((now - val->last_heard_from) / APR_USEC_PER_SEC),
  140.                data->message_u.f_message.Ganglia_metadata_msg_u.gfull.metric.tmax,
  141. +              data->message_u.f_message.Ganglia_metadata_msg_u.gfull.metric.dmax,
  142.                slope_to_cstr(data->message_u.f_message.Ganglia_metadata_msg_u.gfull.metric.slope));
  143.  
  144.    if (metricName) free(metricName);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement