scrape.go 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. package event
  2. const (
  3. DCGMScraperName = "dcgm-metrics"
  4. OpenCostScraperName = "opencost-metrics"
  5. NodeStatsScraperName = "nodestats-metrics"
  6. NetworkCostsScraperName = "network-costs-metrics"
  7. KubernetesClusterScraperName = "kubernetes-metrics"
  8. )
  9. const (
  10. NodeScraperType = "nodes"
  11. NamespaceScraperType = "namespaces"
  12. ReplicaSetScraperType = "replicasets"
  13. DeploymentScraperType = "deployments"
  14. StatefulSetScraperType = "statefulsets"
  15. ServiceScraperType = "services"
  16. PodScraperType = "pods"
  17. PvScraperType = "pvs"
  18. PvcScraperType = "pvcs"
  19. ResourceQuotaScraperType = "resourcequotas"
  20. )
  21. // ScrapeEvent is dispatched when a scrape is performed over a set of targets. It contains the name
  22. // of the scraper performing the scrape, the total number of targets, and any errors encountered.
  23. type ScrapeEvent struct {
  24. // The name of the actual Scraper implementation performing the target scrapes.
  25. ScraperName string
  26. // The type of scrape being performed. For example, if a scraper performs multiple scrapes
  27. // for different resources, this field can be used to distinguish between them.
  28. ScrapeType string
  29. // The total number of targets being accessed by the scraper.
  30. Targets int
  31. // Any errors that occurred during the scrape.
  32. Errors []error
  33. }