scrape.go 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. DaemonSetScraperType = "daemonsets"
  16. JobScraperType = "jobs"
  17. CronJobScraperType = "cronjobs"
  18. ServiceScraperType = "services"
  19. PodScraperType = "pods"
  20. PvScraperType = "pvs"
  21. PvcScraperType = "pvcs"
  22. ResourceQuotaScraperType = "resourcequotas"
  23. )
  24. // ScrapeEvent is dispatched when a scrape is performed over a set of targets. It contains the name
  25. // of the scraper performing the scrape, the total number of targets, and any errors encountered.
  26. type ScrapeEvent struct {
  27. // The name of the actual Scraper implementation performing the target scrapes.
  28. ScraperName string
  29. // The type of scrape being performed. For example, if a scraper performs multiple scrapes
  30. // for different resources, this field can be used to distinguish between them.
  31. ScrapeType string
  32. // The total number of targets being accessed by the scraper.
  33. Targets int
  34. // Any errors that occurred during the scrape.
  35. Errors []error
  36. }