virtual_servers.go 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. // Copyright The OpenTelemetry Authors
  2. // SPDX-License-Identifier: Apache-2.0
  3. package models // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver/internal/models"
  4. // VirtualServersDetails represents the top level json returned by the /virtual endpoint
  5. type VirtualServersDetails struct {
  6. Items []VirtualServerProperties `json:"items"`
  7. }
  8. // VirtualServerProperties represents the properties returned for a single virtual server
  9. type VirtualServerProperties struct {
  10. SelfLink string `json:"selfLink"`
  11. PoolName string `json:"pool"`
  12. }
  13. // VirtualServers represents the top level json returned by the virtual/stats endpoint
  14. type VirtualServers struct {
  15. Entries map[string]VirtualServerStats `json:"entries"`
  16. }
  17. // VirtualServerStats represents the statistics returned for a single virtual server
  18. type VirtualServerStats struct {
  19. NestedStats struct {
  20. Entries struct {
  21. Name struct {
  22. Description string `json:"description,omitempty"`
  23. } `json:"tmName,omitempty"`
  24. // PoolName is not actually in the /stats response and will be pulled from the normal /virtual response
  25. PoolName struct {
  26. Description string `json:"description,omitempty"`
  27. } `json:"poolName,omitempty"`
  28. Destination struct {
  29. Description string `json:"description,omitempty"`
  30. } `json:"destination,omitempty"`
  31. ClientsideBitsIn struct {
  32. Value int64 `json:"value"`
  33. } `json:"clientside.bitsIn,omitempty"`
  34. ClientsideBitsOut struct {
  35. Value int64 `json:"value"`
  36. } `json:"clientside.bitsOut,omitempty"`
  37. ClientsideCurConns struct {
  38. Value int64 `json:"value"`
  39. } `json:"clientside.curConns,omitempty"`
  40. ClientsidePktsIn struct {
  41. Value int64 `json:"value"`
  42. } `json:"clientside.pktsIn,omitempty"`
  43. ClientsidePktsOut struct {
  44. Value int64 `json:"value"`
  45. } `json:"clientside.pktsOut,omitempty"`
  46. AvailabilityState struct {
  47. Description string `json:"description,omitempty"`
  48. } `json:"status.availabilityState,omitempty"`
  49. EnabledState struct {
  50. Description string `json:"description,omitempty"`
  51. } `json:"status.enabledState,omitempty"`
  52. TotalRequests struct {
  53. Value int64 `json:"value"`
  54. } `json:"totRequests,omitempty"`
  55. } `json:"entries,omitempty"`
  56. } `json:"nestedStats,omitempty"`
  57. }