scrape.go 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. )
  20. // ScrapeEvent is dispatched when a scrape is performed over a set of targets. It contains the name
  21. // of the scraper performing the scrape, the total number of targets, and any errors encountered.
  22. type ScrapeEvent struct {
  23. // The name of the actual Scraper implementation performing the target scrapes.
  24. ScraperName string
  25. // The type of scrape being performed. For example, if a scraper performs multiple scrapes
  26. // for different resources, this field can be used to distinguish between them.
  27. ScrapeType string
  28. // The total number of targets being accessed by the scraper.
  29. Targets int
  30. // Any errors that occurred during the scrape.
  31. Errors []error
  32. }