AnnotationsHelp.tsx 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import React, { FC } from 'react';
  2. export const AnnotationsHelp: FC = () => {
  3. return (
  4. <div className="gf-form grafana-info-box" style={{ padding: 0 }}>
  5. <pre className="gf-form-pre alert alert-info" style={{ marginRight: 0 }}>
  6. <h5>Annotation Query Format</h5>
  7. <p>
  8. An annotation is an event that is overlaid on top of graphs. Annotation rendering is expensive so it is
  9. important to limit the number of rows returned.{' '}
  10. </p>
  11. <p>
  12. The Title and Text fields support templating and can use data returned from the query. For example, the Title
  13. field could have the following text:
  14. </p>
  15. <code>
  16. {`${'{{metric.type}}'}`} has value: {`${'{{metric.value}}'}`}
  17. </code>
  18. <p>
  19. Example Result: <code>monitoring.googleapis.com/uptime_check/http_status has this value: 502</code>
  20. </p>
  21. <label>Patterns:</label>
  22. <p>
  23. <code>{`${'{{metric.value}}'}`}</code> = value of the metric/point
  24. </p>
  25. <p>
  26. <code>{`${'{{metric.type}}'}`}</code> = metric type e.g. compute.googleapis.com/instance/cpu/usage_time
  27. </p>
  28. <p>
  29. <code>{`${'{{metric.name}}'}`}</code> = name part of metric e.g. instance/cpu/usage_time
  30. </p>
  31. <p>
  32. <code>{`${'{{metric.service}}'}`}</code> = service part of metric e.g. compute
  33. </p>
  34. <p>
  35. <code>{`${'{{metric.label.label_name}}'}`}</code> = Metric label metadata e.g. metric.label.instance_name
  36. </p>
  37. <p>
  38. <code>{`${'{{resource.label.label_name}}'}`}</code> = Resource label metadata e.g. resource.label.zone
  39. </p>
  40. </pre>
  41. </div>
  42. );
  43. };