diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 1d026392eef7..260b83426ad5 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -112,6 +112,7 @@ receiver/awscontainerinsightreceiver/ @open-telemetry/collector-c receiver/awsecscontainermetricsreceiver/ @open-telemetry/collector-contrib-approvers @Aneurysm9 receiver/awsfirehosereceiver/ @open-telemetry/collector-contrib-approvers @Aneurysm9 receiver/awsxrayreceiver/ @open-telemetry/collector-contrib-approvers @willarmiros +receiver/bigipreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @StefanKurek receiver/carbonreceiver/ @open-telemetry/collector-contrib-approvers @pjanotti receiver/cloudfoundryreceiver/ @open-telemetry/collector-contrib-approvers @agoallikmaa @pellared receiver/collectdreceiver/ @open-telemetry/collector-contrib-approvers @owais diff --git a/CHANGELOG.md b/CHANGELOG.md index f02aa9d1cddf..ec97e5d3e53f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -96,6 +96,7 @@ - `iisreceiver`: Add implementation of IIS Metric Receiver (#8832) - `sqlserverreceiver`: Add implementation of SQL Server Metric Receiver (#8398) - `activedirectorydsreceiver`: Add implementation of Active Directory Domain Services metric receiver (#9359) +- `bigipreceiver`: Add implementation of F5 Big-IP Metric Receiver (#9680) ### 💡 Enhancements 💡 diff --git a/cmd/configschema/go.mod b/cmd/configschema/go.mod index 0636571ef9c3..faadec7d3c33 100644 --- a/cmd/configschema/go.mod +++ b/cmd/configschema/go.mod @@ -335,6 +335,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver v0.51.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsfirehosereceiver v0.51.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver v0.51.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver v0.51.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver v0.51.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/receiver/cloudfoundryreceiver v0.51.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/receiver/collectdreceiver v0.51.0 // indirect @@ -731,6 +732,8 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsfi replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver => ../../receiver/awsxrayreceiver +replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver => ../../receiver/bigipreceiver + replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/couchdbreceiver => ../../receiver/couchdbreceiver replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver => ../../receiver/carbonreceiver diff --git a/go.mod b/go.mod index c234c0b4053e..45eff87a326f 100644 --- a/go.mod +++ b/go.mod @@ -82,6 +82,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver v0.51.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsfirehosereceiver v0.51.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver v0.51.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver v0.51.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver v0.51.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/cloudfoundryreceiver v0.51.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/collectdreceiver v0.51.0 @@ -738,6 +739,8 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsfi replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver => ./receiver/awsxrayreceiver +replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver => ./receiver/bigipreceiver + replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver => ./receiver/carbonreceiver replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/cloudfoundryreceiver => ./receiver/cloudfoundryreceiver diff --git a/internal/components/components.go b/internal/components/components.go index de8142b7755f..3a97feecbeed 100644 --- a/internal/components/components.go +++ b/internal/components/components.go @@ -102,6 +102,7 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsfirehosereceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver" + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/cloudfoundryreceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/collectdreceiver" @@ -190,6 +191,7 @@ func Components() (component.Factories, error) { awsecscontainermetricsreceiver.NewFactory(), awsfirehosereceiver.NewFactory(), awsxrayreceiver.NewFactory(), + bigipreceiver.NewFactory(), carbonreceiver.NewFactory(), cloudfoundryreceiver.NewFactory(), collectdreceiver.NewFactory(), diff --git a/internal/components/receivers_test.go b/internal/components/receivers_test.go index 2175ecacc34b..9d6456dc7e48 100644 --- a/internal/components/receivers_test.go +++ b/internal/components/receivers_test.go @@ -74,6 +74,9 @@ func TestDefaultReceivers(t *testing.T) { receiver: "awsxray", skipLifecyle: true, // Requires AWS endpoint to check identity to run }, + { + receiver: "bigip", + }, { receiver: "carbon", getConfigFn: func() config.Receiver { diff --git a/receiver/bigipreceiver/Makefile b/receiver/bigipreceiver/Makefile new file mode 100644 index 000000000000..ded7a36092dc --- /dev/null +++ b/receiver/bigipreceiver/Makefile @@ -0,0 +1 @@ +include ../../Makefile.Common diff --git a/receiver/bigipreceiver/README.md b/receiver/bigipreceiver/README.md new file mode 100644 index 000000000000..a9bd1d52d8a2 --- /dev/null +++ b/receiver/bigipreceiver/README.md @@ -0,0 +1,40 @@ +# F5 Big-IP Receiver + +This receiver fetches stats from a F5 Big-IP node using F5's [iControl REST API](https://clouddocs.f5.com/api/icontrol-rest). + +Supported pipeline types: `metrics` + +## Prerequisites + +This receiver supports Big-IP versions `11.6.5+` + +## Configuration + +The following settings are required: +- `username` +- `password` + +The following settings are optional: + +- `endpoint` (default: `https://localhost:443`): The URL of the Big-IP environment. +- `collection_interval` (default = `10s`): This receiver collects metrics on an interval. Valid time units are `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`. +- `tls` (defaults defined [here](https://github.com/open-telemetry/opentelemetry-collector/blob/main/config/configtls/README.md)): TLS control. By default insecure settings are rejected and certificate verification is on. + +### Example Configuration + +```yaml +receivers: + bigip: + collection_interval: 10s + endpoint: https://localhost:443 + username: otelu + password: $BIGIP_PASSWORD + tls: + insecure_skip_verify: true +``` + +The full list of settings exposed for this receiver are documented [here](./config.go) with detailed sample configurations [here](./testdata/config.yaml). TLS config is documented further under the [opentelemetry collector's configtls package](https://github.com/open-telemetry/opentelemetry-collector/blob/main/config/configtls/README.md). + +## Metrics + +Details about the metrics produced by this receiver can be found in [documentation.md](./documentation.md) diff --git a/receiver/bigipreceiver/client.go b/receiver/bigipreceiver/client.go new file mode 100644 index 000000000000..6314dd9bcfe0 --- /dev/null +++ b/receiver/bigipreceiver/client.go @@ -0,0 +1,336 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package bigipreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "strings" + + "go.opentelemetry.io/collector/component" + "go.uber.org/multierr" + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver/internal/models" +) + +const ( + // loginPath is the path to the login endpoint + loginPath = "/mgmt/shared/authn/login" + // virtualServersPath is the path to the virtual servers endpoint + virtualServersPath = "/mgmt/tm/ltm/virtual" + // virtualServersStatsPath is the path to the virtual servers statistics endpoint + virtualServersStatsPath = "/mgmt/tm/ltm/virtual/stats" + // poolsStatsPath is the path to the pools statistics endpoint + poolsStatsPath = "/mgmt/tm/ltm/pool/stats" + // nodesStatsPath is the path to the nodes statistics endpoint + nodesStatsPath = "/mgmt/tm/ltm/node/stats" + // poolMembersStatsPathSuffix is the suffix added onto an individual pool's statistics endpoint + poolMembersStatsPathSuffix = "/members/stats" +) + +// custom errors +var ( + errCollectedNoPoolMembers = errors.New(`all pool member requests have failed`) +) + +// client is used for retrieving data about a Big-IP environment +type client interface { + // HasToken checks if the client currently has an auth token + HasToken() bool + // GetNewToken must be called initially as it retrieves and sets an auth token for future calls + GetNewToken(ctx context.Context) error + // GetVirtualServers retrieves data for all LTM virtual servers in a Big-IP environment + GetVirtualServers(ctx context.Context) (*models.VirtualServers, error) + // GetPools retrieves data for all LTM pools in a Big-IP environment + GetPools(ctx context.Context) (*models.Pools, error) + // GetPoolMembers retrieves data for all LTM pool members in a Big-IP environment + GetPoolMembers(ctx context.Context, pools *models.Pools) (*models.PoolMembers, error) + // GetNodes retrieves data for all LTM nodes in a Big-IP environment + GetNodes(ctx context.Context) (*models.Nodes, error) +} + +// bigipClient implements the client interface and retrieves data through the iControl REST API +type bigipClient struct { + client *http.Client + hostEndpoint string + creds bigipCredentials + token string + logger *zap.Logger +} + +// bigipCredentials stores the username and password needed to retrieve an access token from the iControl REST API +type bigipCredentials struct { + username string + password string +} + +// Verify bigipClient implements client interface +var _ client = (*bigipClient)(nil) + +// newClient creates an initialized client (but with no token) +func newClient(cfg *Config, host component.Host, settings component.TelemetrySettings, logger *zap.Logger) (client, error) { + httpClient, err := cfg.ToClient(host.GetExtensions(), settings) + if err != nil { + return nil, fmt.Errorf("failed to create HTTP Client: %w", err) + } + + return &bigipClient{ + client: httpClient, + hostEndpoint: cfg.Endpoint, + creds: bigipCredentials{ + username: cfg.Username, + password: cfg.Password, + }, + logger: logger, + }, nil +} + +// HasToken checks to see if an auth token has been set for the client +func (c *bigipClient) HasToken() bool { + return c.token != "" +} + +// GetNewToken makes an appropriate call to the iControl REST login endpoint and sets the returned token on the bigipClient +func (c *bigipClient) GetNewToken(ctx context.Context) error { + var tokenDetails *models.TokenDetails + + if err := c.post(ctx, loginPath, &tokenDetails); err != nil { + c.logger.Debug("Failed to retrieve api token", zap.Error(err)) + return err + } + + c.token = tokenDetails.Token.Token + return nil +} + +// GetVirtualServers makes calls to both the standard and statistics version of the virtual servers endpoint. +// It combines this info into one object and returns it. +func (c *bigipClient) GetVirtualServers(ctx context.Context) (*models.VirtualServers, error) { + // get standard Virtual Server details + var virtualServers *models.VirtualServers + + if err := c.get(ctx, virtualServersStatsPath, &virtualServers); err != nil { + c.logger.Debug("Failed to retrieve virtual servers", zap.Error(err)) + return nil, err + } + + // get statistic virtual server details and combine them + var virtualServersDetails *models.VirtualServersDetails + + if err := c.get(ctx, virtualServersPath, &virtualServersDetails); err != nil { + c.logger.Warn("Failed to retrieve virtual servers properties", zap.Error(err)) + return virtualServers, nil + } + + return addVirtualServerPoolDetails(virtualServers, virtualServersDetails), nil +} + +// GetPools makes a call the statistics version of the pools endpoint and returns the data. +func (c *bigipClient) GetPools(ctx context.Context) (*models.Pools, error) { + var pools *models.Pools + + if err := c.get(ctx, poolsStatsPath, &pools); err != nil { + c.logger.Debug("Failed to retrieve pools", zap.Error(err)) + return nil, err + } + + return pools, nil +} + +// GetPoolMembers takes in a list of all Pool data. It then iterates over this list to make a call to the statistics version +// of each pool's pool members endpoint. It accumulates all of this data into a single pool members object and returns it. +func (c *bigipClient) GetPoolMembers(ctx context.Context, pools *models.Pools) (*models.PoolMembers, error) { + var ( + poolMembers *models.PoolMembers + combinedPoolMembers *models.PoolMembers + ) + collectedPoolMembers := false + + var errors []error + // for each pool get pool member info and aggregate it into a single spot + for poolURL := range pools.Entries { + poolMemberPath := strings.TrimPrefix(poolURL, "https://localhost") + poolMemberPath = strings.TrimSuffix(poolMemberPath, "/stats") + poolMembersStatsPathSuffix + + if err := c.get(ctx, poolMemberPath, &poolMembers); err != nil { + errors = append(errors, err) + c.logger.Warn("Failed to retrieve all pool members", zap.Error(err)) + } else { + combinedPoolMembers = combinePoolMembers(combinedPoolMembers, poolMembers) + collectedPoolMembers = true + } + } + + combinedErr := multierr.Combine(errors...) + + if combinedErr != nil && !collectedPoolMembers { + return nil, errCollectedNoPoolMembers + } + + return combinedPoolMembers, combinedErr +} + +// GetNodes makes a call the statistics version of the nodes endpoint and returns the data. +func (c *bigipClient) GetNodes(ctx context.Context) (nodes *models.Nodes, err error) { + if err = c.get(ctx, nodesStatsPath, &nodes); err != nil { + c.logger.Debug("Failed to retrieve nodes", zap.Error(err)) + return nil, err + } + + return nodes, nil +} + +// post makes a POST request for the passed in path and stores result in the respObj +func (c *bigipClient) post(ctx context.Context, path string, respObj interface{}) error { + // Construct endpoint and create request + url := c.hostEndpoint + path + postBody, _ := json.Marshal(map[string]string{ + "username": c.creds.username, + "password": c.creds.password, + "loginProviderName": "tmos", + }) + requestBody := bytes.NewBuffer(postBody) + req, err := http.NewRequestWithContext(ctx, http.MethodPost, url, requestBody) + if err != nil { + return fmt.Errorf("failed to create post request for path %s: %w", path, err) + } + + return c.makeHTTPRequest(req, respObj) +} + +// get makes a GET request (with token in header) for the passed in path and stores result in the respObj +func (c *bigipClient) get(ctx context.Context, path string, respObj interface{}) error { + // Construct endpoint and create request + url := c.hostEndpoint + path + req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, http.NoBody) + req.Header.Add("X-F5-Auth-Token", c.token) + if err != nil { + return fmt.Errorf("failed to create get request for path %s: %w", path, err) + } + + return c.makeHTTPRequest(req, respObj) +} + +// makeHTTPRequest makes the request and decodes the body into the respObj on a 200 Status +func (c *bigipClient) makeHTTPRequest(req *http.Request, respObj interface{}) (err error) { + // Make request + resp, err := c.client.Do(req) + if err != nil { + return fmt.Errorf("failed to make http request: %w", err) + } + + // Defer body close + defer func() { + if closeErr := resp.Body.Close(); closeErr != nil { + c.logger.Warn("failed to close response body", zap.Error(closeErr)) + } + }() + + // Check for OK status code + if err = c.checkHTTPStatus(resp); err != nil { + return err + } + + // Decode the payload into the passed in response object + if err := json.NewDecoder(resp.Body).Decode(respObj); err != nil { + return fmt.Errorf("failed to decode response payload: %w", err) + } + + return nil +} + +// checkHTTPStatus returns an error if the response status is != 200 +func (c *bigipClient) checkHTTPStatus(resp *http.Response) (err error) { + if resp.StatusCode != http.StatusOK { + c.logger.Debug("Big-IP API non-200", zap.Error(err), zap.Int("status_code", resp.StatusCode)) + + // Attempt to extract the error payload + payloadData, err := io.ReadAll(resp.Body) + if err != nil { + c.logger.Debug("failed to read payload error message", zap.Error(err)) + } else { + c.logger.Debug("Big-IP API Error", zap.ByteString("api_error", payloadData)) + } + + return fmt.Errorf("non 200 code returned %d", resp.StatusCode) + } + + return nil +} + +// combinePoolMembers takes two PoolMembers and returns an aggregate of them both +func combinePoolMembers(poolMembersA *models.PoolMembers, poolMembersB *models.PoolMembers) *models.PoolMembers { + var aSize int + if poolMembersA != nil { + aSize = len(poolMembersA.Entries) + } + + var bSize int + if poolMembersB != nil { + bSize = len(poolMembersB.Entries) + } + + totalSize := aSize + bSize + if totalSize == 0 { + return &models.PoolMembers{} + } + + combinedPoolMembers := models.PoolMembers{Entries: make(map[string]models.PoolMemberStats, totalSize)} + + if poolMembersA != nil { + for url, data := range poolMembersA.Entries { + combinedPoolMembers.Entries[url] = data + } + } + if poolMembersB != nil { + for url, data := range poolMembersB.Entries { + combinedPoolMembers.Entries[url] = data + } + } + + return &combinedPoolMembers +} + +// addVirtualServerPoolDetails takes in VirtualServers and VirtualServersDetails, matches the data, and combines them into a returned VirtualServers +func addVirtualServerPoolDetails(virtualServers *models.VirtualServers, virtualServersDetails *models.VirtualServersDetails) *models.VirtualServers { + vSize := len(virtualServers.Entries) + if vSize == 0 { + return &models.VirtualServers{} + } + + combinedVirtualServers := models.VirtualServers{Entries: make(map[string]models.VirtualServerStats, vSize)} + + for virtualServerURL, entry := range virtualServers.Entries { + combinedVirtualServers.Entries[virtualServerURL] = entry + } + + // for each item in VirtualServersDetails match it with the entry in VirtualServers, combine it, and add it to the combined data object + for _, item := range virtualServersDetails.Items { + parts := strings.Split(item.SelfLink, "?") + entryKey := parts[0] + "/stats" + if entryValue, ok := combinedVirtualServers.Entries[entryKey]; ok { + entryValue.NestedStats.Entries.PoolName.Description = item.PoolName + combinedVirtualServers.Entries[entryKey] = entryValue + } + } + + return &combinedVirtualServers +} diff --git a/receiver/bigipreceiver/client_test.go b/receiver/bigipreceiver/client_test.go new file mode 100644 index 000000000000..3fd6d6c39e12 --- /dev/null +++ b/receiver/bigipreceiver/client_test.go @@ -0,0 +1,749 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package bigipreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver" + +import ( + "context" + "encoding/json" + "errors" + "io/ioutil" + "net/http" + "net/http/httptest" + "path/filepath" + "strings" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/config/configtls" + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver/internal/models" +) + +const ( + loginResponseFile = "post_login_response.json" + virtualServersResponseFile = "get_virtual_servers_response.json" + virtualServersStatsResponseFile = "get_virtual_servers_stats_response.json" + virtualServersCombinedFile = "virtual_servers_combined.json" + poolsStatsResponseFile = "get_pools_stats_response.json" + poolMembersStatsResponse1File = "get_pool_members_stats_response_1.json" + poolMembersStatsResponse2File = "get_pool_members_stats_response_2.json" + poolMembersCombinedFile = "pool_members_combined.json" + nodesStatsResponseFile = "get_nodes_stats_response.json" +) + +func TestNewClient(t *testing.T) { + testCase := []struct { + desc string + cfg *Config + host component.Host + settings component.TelemetrySettings + logger *zap.Logger + expectError error + }{ + { + desc: "Invalid HTTP config", + cfg: &Config{ + HTTPClientSettings: confighttp.HTTPClientSettings{ + Endpoint: defaultEndpoint, + TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.TLSSetting{ + CAFile: "/non/existent", + }, + }, + }, + }, + host: componenttest.NewNopHost(), + settings: componenttest.NewNopTelemetrySettings(), + logger: zap.NewNop(), + expectError: errors.New("failed to create HTTP Client"), + }, + { + desc: "Valid Configuration", + cfg: &Config{ + HTTPClientSettings: confighttp.HTTPClientSettings{ + TLSSetting: configtls.TLSClientSetting{}, + Endpoint: defaultEndpoint, + }, + }, + host: componenttest.NewNopHost(), + settings: componenttest.NewNopTelemetrySettings(), + logger: zap.NewNop(), + expectError: nil, + }, + } + + for _, tc := range testCase { + t.Run(tc.desc, func(t *testing.T) { + ac, err := newClient(tc.cfg, tc.host, tc.settings, tc.logger) + if tc.expectError != nil { + require.Nil(t, ac) + require.Contains(t, err.Error(), tc.expectError.Error()) + } else { + require.NoError(t, err) + + actualClient, ok := ac.(*bigipClient) + require.True(t, ok) + + require.Equal(t, tc.cfg.Username, actualClient.creds.username) + require.Equal(t, tc.cfg.Password, actualClient.creds.password) + require.Equal(t, tc.cfg.Endpoint, actualClient.hostEndpoint) + require.Equal(t, tc.logger, actualClient.logger) + require.NotNil(t, actualClient.client) + } + }) + } +} + +func TestGetNewToken(t *testing.T) { + testCases := []struct { + desc string + testFunc func(*testing.T) + }{ + { + desc: "Non-200 Response", + testFunc: func(t *testing.T) { + // Setup test server + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusUnauthorized) + })) + defer ts.Close() + + tc := createTestClient(t, ts.URL) + + err := tc.GetNewToken(context.Background()) + require.EqualError(t, err, "non 200 code returned 401") + hasToken := tc.HasToken() + require.Equal(t, hasToken, false) + }, + }, + { + desc: "Bad payload returned", + testFunc: func(t *testing.T) { + // Setup test server + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + _, err := w.Write([]byte("[{}]")) + require.NoError(t, err) + })) + defer ts.Close() + + tc := createTestClient(t, ts.URL) + + err := tc.GetNewToken(context.Background()) + require.Contains(t, err.Error(), "failed to decode response payload") + hasToken := tc.HasToken() + require.Equal(t, hasToken, false) + }, + }, + { + desc: "Successful call", + testFunc: func(t *testing.T) { + data := loadAPIResponseData(t, loginResponseFile) + + // Setup test server + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + _, err := w.Write(data) + require.NoError(t, err) + })) + defer ts.Close() + + tc := createTestClient(t, ts.URL) + + err := tc.GetNewToken(context.Background()) + require.NoError(t, err) + hasToken := tc.HasToken() + require.Equal(t, hasToken, true) + }, + }, + } + + for _, tc := range testCases { + t.Run(tc.desc, tc.testFunc) + } +} + +func TestGetVirtualServers(t *testing.T) { + testCases := []struct { + desc string + testFunc func(*testing.T) + }{ + { + desc: "Non-200 Response for stats", + testFunc: func(t *testing.T) { + // Setup test server + data := loadAPIResponseData(t, virtualServersResponseFile) + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if strings.HasSuffix(r.RequestURI, "stats") { + w.WriteHeader(http.StatusUnauthorized) + } else { + _, err := w.Write(data) + require.NoError(t, err) + } + })) + defer ts.Close() + + tc := createTestClient(t, ts.URL) + + virtualServers, err := tc.GetVirtualServers(context.Background()) + require.Nil(t, virtualServers) + require.EqualError(t, err, "non 200 code returned 401") + }, + }, + { + desc: "Bad payload returned for stats", + testFunc: func(t *testing.T) { + // Setup test server + data := loadAPIResponseData(t, virtualServersResponseFile) + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + var err error + if strings.HasSuffix(r.RequestURI, "stats") { + _, err = w.Write([]byte("[{}]")) + require.NoError(t, err) + } else { + _, err = w.Write(data) + } + require.NoError(t, err) + })) + defer ts.Close() + + tc := createTestClient(t, ts.URL) + + pools, err := tc.GetPools(context.Background()) + require.Nil(t, pools) + require.Contains(t, err.Error(), "failed to decode response payload") + }, + }, + { + desc: "Successful call empty body for stats", + testFunc: func(t *testing.T) { + // Setup test server + data := loadAPIResponseData(t, virtualServersResponseFile) + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + var err error + if strings.HasSuffix(r.RequestURI, "stats") { + _, err = w.Write([]byte("{}")) + } else { + _, err = w.Write(data) + } + require.NoError(t, err) + })) + defer ts.Close() + + tc := createTestClient(t, ts.URL) + + expected := models.VirtualServers{} + virtualServers, err := tc.GetVirtualServers(context.Background()) + require.NoError(t, err) + require.Equal(t, &expected, virtualServers) + }, + }, + { + desc: "Non-200 Response for standard", + testFunc: func(t *testing.T) { + // Setup test server + statsData := loadAPIResponseData(t, virtualServersStatsResponseFile) + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if strings.HasSuffix(r.RequestURI, "stats") { + _, err := w.Write(statsData) + require.NoError(t, err) + } else { + w.WriteHeader(http.StatusUnauthorized) + } + })) + defer ts.Close() + + tc := createTestClient(t, ts.URL) + + var expected *models.VirtualServers + err := json.Unmarshal(statsData, &expected) + require.NoError(t, err) + + virtualServers, err := tc.GetVirtualServers(context.Background()) + require.NoError(t, err) + require.Equal(t, expected, virtualServers) + }, + }, + { + desc: "Bad payload returned for standard", + testFunc: func(t *testing.T) { + // Setup test server + statsData := loadAPIResponseData(t, virtualServersStatsResponseFile) + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + var err error + if strings.HasSuffix(r.RequestURI, "stats") { + _, err = w.Write(statsData) + } else { + _, err = w.Write([]byte("[{}]")) + } + require.NoError(t, err) + })) + defer ts.Close() + + tc := createTestClient(t, ts.URL) + + var expected *models.VirtualServers + err := json.Unmarshal(statsData, &expected) + require.NoError(t, err) + + virtualServers, err := tc.GetVirtualServers(context.Background()) + require.NoError(t, err) + require.Equal(t, expected, virtualServers) + }, + }, + { + desc: "Successful call empty body for stats", + testFunc: func(t *testing.T) { + // Setup test server + statsData := loadAPIResponseData(t, virtualServersStatsResponseFile) + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + var err error + if strings.HasSuffix(r.RequestURI, "stats") { + _, err = w.Write(statsData) + } else { + _, err = w.Write([]byte("{}")) + } + require.NoError(t, err) + })) + defer ts.Close() + + tc := createTestClient(t, ts.URL) + + var expected *models.VirtualServers + err := json.Unmarshal(statsData, &expected) + require.NoError(t, err) + + virtualServers, err := tc.GetVirtualServers(context.Background()) + require.NoError(t, err) + require.Equal(t, expected, virtualServers) + }, + }, + { + desc: "Successful call", + testFunc: func(t *testing.T) { + data := loadAPIResponseData(t, virtualServersResponseFile) + statsData := loadAPIResponseData(t, virtualServersStatsResponseFile) + + // Setup test server + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + var err error + if strings.HasSuffix(r.RequestURI, "stats") { + _, err = w.Write(statsData) + } else { + _, err = w.Write(data) + } + require.NoError(t, err) + })) + defer ts.Close() + + tc := createTestClient(t, ts.URL) + + // Load the valid data into a struct to compare + var expected *models.VirtualServers + combinedData := loadAPIResponseData(t, virtualServersCombinedFile) + err := json.Unmarshal(combinedData, &expected) + require.NoError(t, err) + + virtualServers, err := tc.GetVirtualServers(context.Background()) + require.NoError(t, err) + require.Equal(t, expected, virtualServers) + }, + }, + { + desc: "Successful call empty body", + testFunc: func(t *testing.T) { + // Setup test server + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + _, err := w.Write([]byte("{}")) + require.NoError(t, err) + })) + defer ts.Close() + + tc := createTestClient(t, ts.URL) + + expected := models.VirtualServers{} + virtualServers, err := tc.GetVirtualServers(context.Background()) + require.NoError(t, err) + require.Equal(t, &expected, virtualServers) + }, + }, + } + + for _, tc := range testCases { + t.Run(tc.desc, tc.testFunc) + } +} + +func TestGetPools(t *testing.T) { + testCases := []struct { + desc string + testFunc func(*testing.T) + }{ + { + desc: "Non-200 Response", + testFunc: func(t *testing.T) { + // Setup test server + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusUnauthorized) + })) + defer ts.Close() + + tc := createTestClient(t, ts.URL) + + pools, err := tc.GetPools(context.Background()) + require.Nil(t, pools) + require.EqualError(t, err, "non 200 code returned 401") + }, + }, + { + desc: "Bad payload returned", + testFunc: func(t *testing.T) { + // Setup test server + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + _, err := w.Write([]byte("[{}]")) + require.NoError(t, err) + })) + defer ts.Close() + + tc := createTestClient(t, ts.URL) + + pools, err := tc.GetPools(context.Background()) + require.Nil(t, pools) + require.Contains(t, err.Error(), "failed to decode response payload") + }, + }, + { + desc: "Successful call", + testFunc: func(t *testing.T) { + data := loadAPIResponseData(t, poolsStatsResponseFile) + + // Setup test server + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + _, err := w.Write(data) + require.NoError(t, err) + })) + defer ts.Close() + + tc := createTestClient(t, ts.URL) + + // Load the valid data into a struct to compare + var expected *models.Pools + err := json.Unmarshal(data, &expected) + require.NoError(t, err) + + pools, err := tc.GetPools(context.Background()) + require.NoError(t, err) + require.Equal(t, expected, pools) + }, + }, + { + desc: "Successful call empty body", + testFunc: func(t *testing.T) { + // Setup test server + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + _, err := w.Write([]byte("{}")) + require.NoError(t, err) + })) + defer ts.Close() + + tc := createTestClient(t, ts.URL) + + expected := models.Pools{} + pools, err := tc.GetPools(context.Background()) + require.NoError(t, err) + require.Equal(t, &expected, pools) + }, + }, + } + + for _, tc := range testCases { + t.Run(tc.desc, tc.testFunc) + } +} + +func TestGetPoolMembers(t *testing.T) { + testCases := []struct { + desc string + testFunc func(*testing.T) + }{ + { + desc: "Non-200 Response for all", + testFunc: func(t *testing.T) { + // Setup test server + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusUnauthorized) + })) + defer ts.Close() + + tc := createTestClient(t, ts.URL) + + var pools *models.Pools + err := json.Unmarshal(loadAPIResponseData(t, poolsStatsResponseFile), &pools) + require.NoError(t, err) + + poolMembers, err := tc.GetPoolMembers(context.Background(), pools) + require.Nil(t, poolMembers) + require.EqualError(t, err, "all pool member requests have failed") + }, + }, + { + desc: "Bad payload returned for all", + testFunc: func(t *testing.T) { + // Setup test server + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + _, err := w.Write([]byte("[{}]")) + require.NoError(t, err) + })) + defer ts.Close() + + tc := createTestClient(t, ts.URL) + + var pools *models.Pools + err := json.Unmarshal(loadAPIResponseData(t, poolsStatsResponseFile), &pools) + require.NoError(t, err) + + poolMembers, err := tc.GetPoolMembers(context.Background(), pools) + require.Nil(t, poolMembers) + require.EqualError(t, err, "all pool member requests have failed") + }, + }, + { + desc: "Successful call for some", + testFunc: func(t *testing.T) { + data1 := loadAPIResponseData(t, poolMembersStatsResponse1File) + + // Setup test server + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if strings.Contains(r.RequestURI, "~Common~dev") { + _, err := w.Write(data1) + require.NoError(t, err) + } else { + w.WriteHeader(http.StatusUnauthorized) + } + })) + defer ts.Close() + + tc := createTestClient(t, ts.URL) + + var pools *models.Pools + err := json.Unmarshal(loadAPIResponseData(t, poolsStatsResponseFile), &pools) + require.NoError(t, err) + + var expected *models.PoolMembers + err = json.Unmarshal(data1, &expected) + require.NoError(t, err) + + poolMembers, err := tc.GetPoolMembers(context.Background(), pools) + require.EqualError(t, err, errors.New("non 200 code returned 401").Error()) + require.Equal(t, expected, poolMembers) + }, + }, { + desc: "Successful call empty body for some", + testFunc: func(t *testing.T) { + // Setup test server + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if strings.Contains(r.RequestURI, "~Common~dev") { + _, err := w.Write([]byte("{}")) + require.NoError(t, err) + } else { + w.WriteHeader(http.StatusUnauthorized) + } + })) + defer ts.Close() + + tc := createTestClient(t, ts.URL) + + var pools *models.Pools + err := json.Unmarshal(loadAPIResponseData(t, poolsStatsResponseFile), &pools) + require.NoError(t, err) + + expected := models.PoolMembers{} + + poolMembers, err := tc.GetPoolMembers(context.Background(), pools) + require.EqualError(t, err, errors.New("non 200 code returned 401").Error()) + require.Equal(t, &expected, poolMembers) + }, + }, + { + desc: "Successful call for all", + testFunc: func(t *testing.T) { + data1 := loadAPIResponseData(t, poolMembersStatsResponse1File) + data2 := loadAPIResponseData(t, poolMembersStatsResponse2File) + + // Setup test server + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + var err error + if strings.Contains(r.RequestURI, "~Common~dev") { + _, err = w.Write(data1) + } else { + _, err = w.Write(data2) + } + require.NoError(t, err) + })) + defer ts.Close() + + tc := createTestClient(t, ts.URL) + + var pools *models.Pools + err := json.Unmarshal(loadAPIResponseData(t, poolsStatsResponseFile), &pools) + require.NoError(t, err) + + var expected *models.PoolMembers + combinedData := loadAPIResponseData(t, poolMembersCombinedFile) + err = json.Unmarshal(combinedData, &expected) + require.NoError(t, err) + + poolMembers, err := tc.GetPoolMembers(context.Background(), pools) + require.NoError(t, err) + require.Equal(t, expected, poolMembers) + }, + }, + { + desc: "Successful call empty body for all", + testFunc: func(t *testing.T) { + // Setup test server + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + _, err := w.Write([]byte("{}")) + require.NoError(t, err) + })) + defer ts.Close() + + tc := createTestClient(t, ts.URL) + + var pools *models.Pools + err := json.Unmarshal(loadAPIResponseData(t, poolsStatsResponseFile), &pools) + require.NoError(t, err) + expected := models.PoolMembers{} + + poolMembers, err := tc.GetPoolMembers(context.Background(), pools) + require.NoError(t, err) + require.Equal(t, &expected, poolMembers) + }, + }, + } + + for _, tc := range testCases { + t.Run(tc.desc, tc.testFunc) + } +} + +func TestGetNodes(t *testing.T) { + testCases := []struct { + desc string + testFunc func(*testing.T) + }{ + { + desc: "Non-200 Response", + testFunc: func(t *testing.T) { + // Setup test server + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusUnauthorized) + })) + defer ts.Close() + + tc := createTestClient(t, ts.URL) + + nodes, err := tc.GetNodes(context.Background()) + require.Nil(t, nodes) + require.EqualError(t, err, "non 200 code returned 401") + }, + }, + { + desc: "Bad payload returned", + testFunc: func(t *testing.T) { + // Setup test server + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + _, err := w.Write([]byte("[{}]")) + require.NoError(t, err) + })) + defer ts.Close() + + tc := createTestClient(t, ts.URL) + + nodes, err := tc.GetNodes(context.Background()) + require.Nil(t, nodes) + require.Contains(t, err.Error(), "failed to decode response payload") + }, + }, + { + desc: "Successful call", + testFunc: func(t *testing.T) { + data := loadAPIResponseData(t, nodesStatsResponseFile) + + // Setup test server + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + _, err := w.Write(data) + require.NoError(t, err) + })) + defer ts.Close() + + tc := createTestClient(t, ts.URL) + + // Load the valid data into a struct to compare + var expected *models.Nodes + err := json.Unmarshal(data, &expected) + require.NoError(t, err) + + nodes, err := tc.GetNodes(context.Background()) + require.NoError(t, err) + require.Equal(t, expected, nodes) + }, + }, + { + desc: "Successful call empty body", + testFunc: func(t *testing.T) { + // Setup test server + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + _, err := w.Write([]byte("{}")) + require.NoError(t, err) + })) + defer ts.Close() + + tc := createTestClient(t, ts.URL) + + expected := models.Nodes{} + nodes, err := tc.GetNodes(context.Background()) + require.NoError(t, err) + require.Equal(t, &expected, nodes) + }, + }, + } + + for _, tc := range testCases { + t.Run(tc.desc, tc.testFunc) + } +} + +func createTestClient(t *testing.T, baseEndpoint string) client { + t.Helper() + cfg := createDefaultConfig().(*Config) + cfg.Endpoint = baseEndpoint + + testClient, err := newClient(cfg, componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings(), zap.NewNop()) + require.NoError(t, err) + return testClient +} + +func loadAPIResponseData(t *testing.T, fileName string) []byte { + t.Helper() + fullPath := filepath.Join("testdata", "apiresponses", fileName) + + data, err := ioutil.ReadFile(fullPath) + require.NoError(t, err) + + return data +} diff --git a/receiver/bigipreceiver/config.go b/receiver/bigipreceiver/config.go new file mode 100644 index 000000000000..643709e35249 --- /dev/null +++ b/receiver/bigipreceiver/config.go @@ -0,0 +1,65 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package bigipreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver" + +import ( + "errors" + "fmt" + "net/url" + + "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/receiver/scraperhelper" + "go.uber.org/multierr" + + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver/internal/metadata" +) + +// Predefined error responses for configuration validation failures +var ( + errMissingUsername = errors.New(`"username" not specified in config`) + errMissingPassword = errors.New(`"password" not specified in config`) + errInvalidEndpoint = errors.New(`"endpoint" must be in the form of ://:`) +) + +const defaultEndpoint = "https://localhost:443" + +// Config defines the configuration for the various elements of the receiver agent. +type Config struct { + scraperhelper.ScraperControllerSettings `mapstructure:",squash"` + confighttp.HTTPClientSettings `mapstructure:",squash"` + Username string `mapstructure:"username"` + Password string `mapstructure:"password"` + Metrics metadata.MetricsSettings `mapstructure:"metrics"` +} + +// Validate validates the configuration by checking for missing or invalid fields +func (cfg *Config) Validate() error { + var err error + if cfg.Username == "" { + err = multierr.Append(err, errMissingUsername) + } + + if cfg.Password == "" { + err = multierr.Append(err, errMissingPassword) + } + + _, parseErr := url.Parse(cfg.Endpoint) + if parseErr != nil { + wrappedErr := fmt.Errorf("%s: %w", errInvalidEndpoint.Error(), parseErr) + err = multierr.Append(err, wrappedErr) + } + + return err +} diff --git a/receiver/bigipreceiver/config_test.go b/receiver/bigipreceiver/config_test.go new file mode 100644 index 000000000000..967508266847 --- /dev/null +++ b/receiver/bigipreceiver/config_test.go @@ -0,0 +1,126 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package bigipreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver" + +import ( + "errors" + "fmt" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/config/confighttp" + "go.uber.org/multierr" +) + +func TestValidate(t *testing.T) { + defaultConfig := createDefaultConfig().(*Config) + defaultConfig.Username = "otelu" + defaultConfig.Password = "otelp" + + testCases := []struct { + desc string + cfg *Config + expectedErr error + }{ + { + desc: "missing username, password, and invalid endpoint", + cfg: &Config{ + HTTPClientSettings: confighttp.HTTPClientSettings{ + Endpoint: "invalid://endpoint: 12efg", + }, + }, + expectedErr: multierr.Combine( + errMissingUsername, + errMissingPassword, + fmt.Errorf("%s: %w", errInvalidEndpoint, errors.New(`parse "invalid://endpoint: 12efg": invalid port ": 12efg" after host`)), + ), + }, + { + desc: "missing password and invalid endpoint", + cfg: &Config{ + Username: "otelu", + HTTPClientSettings: confighttp.HTTPClientSettings{ + Endpoint: "invalid://endpoint: 12efg", + }, + }, + expectedErr: multierr.Combine( + errMissingPassword, + fmt.Errorf("%s: %w", errInvalidEndpoint, errors.New(`parse "invalid://endpoint: 12efg": invalid port ": 12efg" after host`)), + ), + }, + { + desc: "missing username and invalid endpoint", + cfg: &Config{ + Password: "otelp", + HTTPClientSettings: confighttp.HTTPClientSettings{ + Endpoint: "invalid://endpoint: 12efg", + }, + }, + expectedErr: multierr.Combine( + errMissingUsername, + fmt.Errorf("%s: %w", errInvalidEndpoint, errors.New(`parse "invalid://endpoint: 12efg": invalid port ": 12efg" after host`)), + ), + }, + { + desc: "invalid endpoint", + cfg: &Config{ + Username: "otelu", + Password: "otelp", + HTTPClientSettings: confighttp.HTTPClientSettings{ + Endpoint: "invalid://endpoint: 12efg", + }, + }, + expectedErr: multierr.Combine( + fmt.Errorf("%s: %w", errInvalidEndpoint, errors.New(`parse "invalid://endpoint: 12efg": invalid port ": 12efg" after host`)), + ), + }, + { + desc: "valid config", + cfg: &Config{ + Username: "otelu", + Password: "otelp", + HTTPClientSettings: confighttp.HTTPClientSettings{ + Endpoint: defaultEndpoint, + }, + }, + expectedErr: nil, + }, + { + desc: "invalid default config", + cfg: createDefaultConfig().(*Config), + expectedErr: multierr.Combine( + errMissingUsername, + errMissingPassword, + ), + }, + { + desc: "valid default config with supplied username/password", + cfg: defaultConfig, + expectedErr: nil, + }, + } + + for _, tc := range testCases { + t.Run(tc.desc, func(t *testing.T) { + actualErr := tc.cfg.Validate() + if tc.expectedErr != nil { + require.EqualError(t, actualErr, tc.expectedErr.Error()) + } else { + require.NoError(t, actualErr) + } + + }) + } +} diff --git a/receiver/bigipreceiver/doc.go b/receiver/bigipreceiver/doc.go new file mode 100644 index 000000000000..e939ea545807 --- /dev/null +++ b/receiver/bigipreceiver/doc.go @@ -0,0 +1,17 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//go:generate mdatagen --experimental-gen metadata.yaml + +package bigipreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver" diff --git a/receiver/bigipreceiver/documentation.md b/receiver/bigipreceiver/documentation.md new file mode 100644 index 000000000000..385394f7f405 --- /dev/null +++ b/receiver/bigipreceiver/documentation.md @@ -0,0 +1,67 @@ +[comment]: <> (Code generated by mdatagen. DO NOT EDIT.) + +# bigipreceiver + +## Metrics + +These are the metrics available for this scraper. + +| Name | Description | Unit | Type | Attributes | +| ---- | ----------- | ---- | ---- | ---------- | +| **bigip.node.availability** | Availability of the node. | 1 | Gauge(Int) |
  • availability.status
| +| **bigip.node.connection.count** | Current number of connections to the node. | {connections} | Sum(Int) |
| +| **bigip.node.data.transmitted** | Amount of data transmitted to and from the node. | By | Sum(Int) |
  • direction
| +| **bigip.node.enabled** | Enabled state of of the node. | 1 | Gauge(Int) |
  • enabled.status
| +| **bigip.node.packet.count** | Number of packets transmitted to and from the node. | {packets} | Sum(Int) |
  • direction
| +| **bigip.node.request.count** | Number of requests to the node. | {requests} | Sum(Int) |
| +| **bigip.node.session.count** | Current number of sessions for the node. | {sessions} | Sum(Int) |
| +| **bigip.pool.availability** | Availability of the pool. | 1 | Gauge(Int) |
  • availability.status
| +| **bigip.pool.connection.count** | Current number of connections to the pool. | {connections} | Sum(Int) |
| +| **bigip.pool.data.transmitted** | Amount of data transmitted to and from the pool. | By | Sum(Int) |
  • direction
| +| **bigip.pool.enabled** | Enabled state of of the pool. | 1 | Gauge(Int) |
  • enabled.status
| +| **bigip.pool.member.count** | Total number of pool members. | {members} | Sum(Int) |
  • active.status
| +| **bigip.pool.packet.count** | Number of packets transmitted to and from the pool. | {packets} | Sum(Int) |
  • direction
| +| **bigip.pool.request.count** | Number of requests to the pool. | {requests} | Sum(Int) |
| +| **bigip.pool_member.availability** | Availability of the pool member. | 1 | Gauge(Int) |
  • availability.status
| +| **bigip.pool_member.connection.count** | Current number of connections to the pool member. | {connections} | Sum(Int) |
| +| **bigip.pool_member.data.transmitted** | Amount of data transmitted to and from the pool member. | By | Sum(Int) |
  • direction
| +| **bigip.pool_member.enabled** | Enabled state of of the pool member. | 1 | Gauge(Int) |
  • enabled.status
| +| **bigip.pool_member.packet.count** | Number of packets transmitted to and from the pool member. | {packets} | Sum(Int) |
  • direction
| +| **bigip.pool_member.request.count** | Number of requests to the pool member. | {requests} | Sum(Int) |
| +| **bigip.pool_member.session.count** | Current number of sessions for the pool member. | {sessions} | Sum(Int) |
| +| **bigip.virtual_server.availability** | Availability of the virtual server. | 1 | Gauge(Int) |
  • availability.status
| +| **bigip.virtual_server.connection.count** | Current number of connections to the virtual server. | {connections} | Sum(Int) |
| +| **bigip.virtual_server.data.transmitted** | Amount of data transmitted to and from the virtual server. | By | Sum(Int) |
  • direction
| +| **bigip.virtual_server.enabled** | Enabled state of of the virtual server. | 1 | Gauge(Int) |
  • enabled.status
| +| **bigip.virtual_server.packet.count** | Number of packets transmitted to and from the virtual server. | {packets} | Sum(Int) |
  • direction
| +| **bigip.virtual_server.request.count** | Number of requests to the virtual server. | {requests} | Sum(Int) |
| + +**Highlighted metrics** are emitted by default. Other metrics are optional and not emitted by default. +Any metric can be enabled or disabled with the following scraper configuration: + +```yaml +metrics: + : + enabled: +``` + +## Resource attributes + +| Name | Description | Type | +| ---- | ----------- | ---- | +| bigip.node.ip_address | The IP Address of the Big-IP Node. | String | +| bigip.node.name | The name of the Big-IP Node. | String | +| bigip.pool.name | The name of the Big-IP Pool. | String | +| bigip.pool_member.ip_address | The IP Address of the Big-IP Pool Member. | String | +| bigip.pool_member.name | The name of the Big-IP Pool Member. | String | +| bigip.virtual_server.destination | The destination for the Big-IP Virtual Server. | String | +| bigip.virtual_server.name | The name of the Big-IP Virtual Server. | String | + +## Metric attributes + +| Name | Description | Values | +| ---- | ----------- | ------ | +| active.status (status) | The active status. | active, inactive | +| availability.status (status) | The availability status. | offline, unknown, available | +| direction (direction) | The direction of data. | sent, received | +| enabled.status (status) | The enabled status. | disabled, enabled | diff --git a/receiver/bigipreceiver/factory.go b/receiver/bigipreceiver/factory.go new file mode 100644 index 000000000000..f2e29c575b4a --- /dev/null +++ b/receiver/bigipreceiver/factory.go @@ -0,0 +1,72 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package bigipreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver" + +import ( + "context" + "errors" + "time" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config" + "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/receiver/scraperhelper" + + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver/internal/metadata" +) + +const typeStr = "bigip" + +var errConfigNotBigip = errors.New("config was not a Big-IP receiver config") + +// NewFactory creates a new receiver factory for Big-IP +func NewFactory() component.ReceiverFactory { + return component.NewReceiverFactory( + typeStr, + createDefaultConfig, + component.WithMetricsReceiver(createMetricsReceiver)) +} + +// createDefaultConfig creates a config for Big-IP with as many default values as possible +func createDefaultConfig() config.Receiver { + return &Config{ + ScraperControllerSettings: scraperhelper.ScraperControllerSettings{ + ReceiverSettings: config.NewReceiverSettings(config.NewComponentID(typeStr)), + CollectionInterval: 10 * time.Second, + }, + HTTPClientSettings: confighttp.HTTPClientSettings{ + Endpoint: defaultEndpoint, + Timeout: 10 * time.Second, + }, + Metrics: metadata.DefaultMetricsSettings(), + } +} + +// creates the metric receiver for Big-IP +func createMetricsReceiver(_ context.Context, params component.ReceiverCreateSettings, rConf config.Receiver, consumer consumer.Metrics) (component.MetricsReceiver, error) { + cfg, ok := rConf.(*Config) + if !ok { + return nil, errConfigNotBigip + } + + bigipScraper := newScraper(params.Logger, cfg, params.TelemetrySettings) + scraper, err := scraperhelper.NewScraper(typeStr, bigipScraper.scrape, scraperhelper.WithStart(bigipScraper.start)) + if err != nil { + return nil, err + } + + return scraperhelper.NewScraperControllerReceiver(&cfg.ScraperControllerSettings, params, consumer, scraperhelper.AddScraper(scraper)) +} diff --git a/receiver/bigipreceiver/factory_test.go b/receiver/bigipreceiver/factory_test.go new file mode 100644 index 000000000000..583a61015b66 --- /dev/null +++ b/receiver/bigipreceiver/factory_test.go @@ -0,0 +1,96 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package bigipreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver" + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config" + "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/receiver/scraperhelper" + + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver/internal/metadata" +) + +func TestNewFactory(t *testing.T) { + testCases := []struct { + desc string + testFunc func(*testing.T) + }{ + { + desc: "creates a new factory with correct type", + testFunc: func(t *testing.T) { + factory := NewFactory() + require.EqualValues(t, typeStr, factory.Type()) + }, + }, + { + desc: "creates a new factory with valid default config", + testFunc: func(t *testing.T) { + factory := NewFactory() + + var expectedCfg config.Receiver = &Config{ + ScraperControllerSettings: scraperhelper.ScraperControllerSettings{ + ReceiverSettings: config.NewReceiverSettings(config.NewComponentID(typeStr)), + CollectionInterval: 10 * time.Second, + }, + HTTPClientSettings: confighttp.HTTPClientSettings{ + Endpoint: defaultEndpoint, + Timeout: 10 * time.Second, + }, + Metrics: metadata.DefaultMetricsSettings(), + } + + require.Equal(t, expectedCfg, factory.CreateDefaultConfig()) + }, + }, + { + desc: "creates a new factory and CreateMetricReceiver returns no error", + testFunc: func(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + _, err := factory.CreateMetricsReceiver( + context.Background(), + componenttest.NewNopReceiverCreateSettings(), + cfg, + consumertest.NewNop(), + ) + require.NoError(t, err) + }, + }, + { + desc: "creates a new factory and CreateMetricReceiver returns error with incorrect config", + testFunc: func(t *testing.T) { + factory := NewFactory() + _, err := factory.CreateMetricsReceiver( + context.Background(), + componenttest.NewNopReceiverCreateSettings(), + nil, + consumertest.NewNop(), + ) + require.ErrorIs(t, err, errConfigNotBigip) + }, + }, + } + + for _, tc := range testCases { + t.Run(tc.desc, tc.testFunc) + } +} diff --git a/receiver/bigipreceiver/go.mod b/receiver/bigipreceiver/go.mod new file mode 100644 index 000000000000..ebe0f02f18e4 --- /dev/null +++ b/receiver/bigipreceiver/go.mod @@ -0,0 +1,51 @@ +module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver + +go 1.17 + +require ( + github.com/stretchr/testify v1.7.1 + go.opentelemetry.io/collector v0.51.0 + go.opentelemetry.io/collector/pdata v0.51.0 + go.uber.org/multierr v1.8.0 + go.uber.org/zap v1.21.0 +) + +require github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest v0.51.0 + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/felixge/httpsnoop v1.0.2 // indirect + github.com/go-logr/logr v1.2.3 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/golang/snappy v0.0.4 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/klauspost/compress v1.15.3 // indirect + github.com/knadh/koanf v1.4.1 // indirect + github.com/kr/text v0.2.0 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/rogpeppe/go-internal v1.6.1 // indirect + github.com/rs/cors v1.8.2 // indirect + github.com/stretchr/objx v0.1.1 // indirect + go.opencensus.io v0.23.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 // indirect + go.opentelemetry.io/otel v1.7.0 // indirect + go.opentelemetry.io/otel/metric v0.30.0 // indirect + go.opentelemetry.io/otel/trace v1.7.0 // indirect + go.uber.org/atomic v1.9.0 // indirect + golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect + golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect + google.golang.org/grpc v1.46.0 // indirect + google.golang.org/protobuf v1.28.0 // indirect + gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect +) diff --git a/receiver/bigipreceiver/go.sum b/receiver/bigipreceiver/go.sum new file mode 100644 index 000000000000..5a6eb18b8948 --- /dev/null +++ b/receiver/bigipreceiver/go.sum @@ -0,0 +1,345 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aws/aws-sdk-go-v2 v1.9.2/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= +github.com/aws/aws-sdk-go-v2/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= +github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.6.0/go.mod h1:gqlclDEZp4aqJOancXK6TN24aKhT0W0Ae9MHk3wzTMM= +github.com/aws/aws-sdk-go-v2/internal/ini v1.2.4/go.mod h1:ZcBrrI3zBKlhGFNYWvju0I3TR93I7YIgAfy82Fh4lcQ= +github.com/aws/aws-sdk-go-v2/service/appconfig v1.4.2/go.mod h1:FZ3HkCe+b10uFZZkFdvf98LHW21k49W8o8J366lqVKY= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.3.2/go.mod h1:72HRZDLMtmVQiLG2tLfQcaWLCssELvGl+Zf2WVxMmR8= +github.com/aws/aws-sdk-go-v2/service/sso v1.4.2/go.mod h1:NBvT9R1MEF+Ud6ApJKM0G+IkPchKS7p7c2YPKwHmBOk= +github.com/aws/aws-sdk-go-v2/service/sts v1.7.2/go.mod h1:8EzeIqfWt2wWT4rJVu3f21TfrhJ8AEMzVybRNSb/b4g= +github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= +github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-ldap/ldap v3.0.2+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp40uXYvFoEVrNEPqRc= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= +github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= +github.com/hashicorp/go-hclog v0.8.0/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= +github.com/hashicorp/go-retryablehttp v0.5.4/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= +github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/vault/api v1.0.4/go.mod h1:gDcqh3WGcR1cpF5AJz/B1UFheUEneMoIospckxBxk6Q= +github.com/hashicorp/vault/sdk v0.1.13/go.mod h1:B+hVj7TpuQY1Y/GPbCpffmgd+tSEwvhkWnjtSYCaS2M= +github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.15.3 h1:wmfu2iqj9q22SyMINp1uQ8C2/V4M1phJdmH9fG4nba0= +github.com/klauspost/compress v1.15.3/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= +github.com/knadh/koanf v1.4.1 h1:Z0VGW/uo8NJmjd+L1Dc3S5frq6c62w5xQ9Yf4Mg3wFQ= +github.com/knadh/koanf v1.4.1/go.mod h1:1cfH5223ZeZUOs8FU2UdTmaNfHpqgtjV0+NHjRO43gs= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= +github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/npillmayer/nestext v0.1.3/go.mod h1:h2lrijH8jpicr25dFY+oAJLyzlya6jhnuG+zWp9L0Uk= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest v0.51.0 h1:0j37iyFzl/2qqnjB2hJI7eXovsRNXD9A5LwTSpibl18= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest v0.51.0/go.mod h1:AdB5sbVAg9A5VnFtKXZrNRdAd7AZAsUuSBHFEc59Gbg= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pelletier/go-toml v1.7.0 h1:7utD74fnzVc/cpcyy8sjrlFr5vYpypUixARcHIMIGuI= +github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/rhnvrm/simples3 v0.6.1/go.mod h1:Y+3vYm2V7Y4VijFoJHHTrja6OgPrJ2cBti8dPGkC3sA= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U= +github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/collector v0.51.0 h1:r4cfvLYkmdTWU+RioL2QqxD/GLJUXRNifG0NCfRmxwk= +go.opentelemetry.io/collector v0.51.0/go.mod h1:2pHwJxKDhSd4t42GkiCosU9G3szHoWUK2R0qnB6X67A= +go.opentelemetry.io/collector/pdata v0.51.0 h1:J5CCnrg1iGOA1CfFOH+wAkMlJ1vjcm677kuPp18mbko= +go.opentelemetry.io/collector/pdata v0.51.0/go.mod h1:FsowYKNmf8CgsHgOfJv8V3KjALmy6FYQRHtXAOY3fho= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= +go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= +go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= +go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= +go.opentelemetry.io/otel/metric v0.30.0/go.mod h1:/ShZ7+TS4dHzDFmfi1kSXMhMVubNoP0oIaBp70J6UXU= +go.opentelemetry.io/otel/sdk v1.7.0 h1:4OmStpcKVOfvDOgCt7UriAPtKolwIhxpnSNI/yK+1B0= +go.opentelemetry.io/otel/trace v1.7.0 h1:O37Iogk1lEkMRXewVtZ1BBTVn5JEp8GrJvP92bJqC6o= +go.opentelemetry.io/otel/trace v1.7.0/go.mod h1:fzLSB9nqR2eXzxPXb2JW9IKE+ScyXA48yyE4TNvoHqU= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= +go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= +go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= +go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= +go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27 h1:XDXtA5hveEEV8JB2l7nhMTp3t3cHp9ZpwcdjqyEWLlo= +golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa h1:I0YcKz0I7OAhddo7ya8kMnvprhcWM045PmkBdMO9zN0= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.46.0 h1:oCjezcn6g6A75TGoKYBPgKmVBLexhYLM6MebdrPApP8= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/receiver/bigipreceiver/integration_test.go b/receiver/bigipreceiver/integration_test.go new file mode 100644 index 000000000000..01a5069a5327 --- /dev/null +++ b/receiver/bigipreceiver/integration_test.go @@ -0,0 +1,159 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package bigipreceiver + +import ( + "context" + "encoding/json" + "io/ioutil" + "net/http" + "net/http/httptest" + "path/filepath" + "strings" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/consumer/consumertest" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest/golden" +) + +func TestBigIpIntegration(t *testing.T) { + mockServer := setupMockIControlServer(t) + defer mockServer.Close() + + factory := NewFactory() + cfg := factory.CreateDefaultConfig().(*Config) + // Set endpoint of config to match mocked IControl REST API server + cfg.Endpoint = mockServer.URL + // Any username/password will work with mocked server right now + cfg.Username = "otelu" + cfg.Password = "otelp" + cfg.ScraperControllerSettings.CollectionInterval = 100 * time.Millisecond + + consumer := new(consumertest.MetricsSink) + settings := componenttest.NewNopReceiverCreateSettings() + rcvr, err := factory.CreateMetricsReceiver(context.Background(), settings, cfg, consumer) + + require.NoError(t, err, "failed creating metrics receiver") + require.NoError(t, rcvr.Start(context.Background(), componenttest.NewNopHost())) + require.Eventuallyf(t, func() bool { + return consumer.DataPointCount() > 0 + }, 2*time.Minute, 1*time.Second, "failed to receive more than 0 metrics") + require.NoError(t, rcvr.Shutdown(context.Background())) + + actualMetrics := consumer.AllMetrics()[0] + + expectedFile := filepath.Join("testdata", "integration", "expected.json") + expectedMetrics, err := golden.ReadMetrics(expectedFile) + require.NoError(t, err) + + require.NoError(t, scrapertest.CompareMetrics(expectedMetrics, actualMetrics, scrapertest.IgnoreMetricValues())) +} + +const ( + authHeader = "X-F5-Auth-Token" + + loginURISuffix = "/authn/login" + getVirtualServersURISuffix = "/ltm/virtual" + getVirtualServersStatsURISuffix = "/ltm/virtual/stats" + getPoolsStatsURISuffix = "/ltm/pool/stats" + getPoolMembersStatsURISuffix = "/members/stats" + getNodesStatsURISuffix = "/ltm/node/stats" + + mockLoginResponseFile = "login_response.json" + mockVirtualServersResponseFile = "virtual_servers_response.json" + mockVirtualServersStatsResponseFile = "virtual_servers_stats_response.json" + mockPoolsStatsResponseFile = "pools_stats_response.json" + mockNodesStatsResponseFile = "nodes_stats_response.json" + poolMembersStatsResponseFileSuffix = "_pool_members_stats_response.json" +) + +func setupMockIControlServer(t *testing.T) *httptest.Server { + t.Helper() + + // Setup responses before creating the server + mockLoginResponse := createMockServerResponseData(t, mockLoginResponseFile) + mockVirtualServersResponse := createMockServerResponseData(t, mockVirtualServersResponseFile) + mockVirtualServersStatsResponse := createMockServerResponseData(t, mockVirtualServersStatsResponseFile) + mockPoolsStatsResponse := createMockServerResponseData(t, mockPoolsStatsResponseFile) + mockNodesStatsResponse := createMockServerResponseData(t, mockNodesStatsResponseFile) + + type loginBody struct { + Username string `json:"username"` + Password string `json:"password"` + } + + // Setup mock iControl REST API server + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + // Mock login responses + var err error + if strings.HasSuffix(r.RequestURI, loginURISuffix) { + var body loginBody + err = json.NewDecoder(r.Body).Decode(&body) + require.NoError(t, err) + if body.Username == "" || body.Password == "" || r.Method != "POST" { + w.WriteHeader(http.StatusUnauthorized) + } else { + _, err = w.Write(mockLoginResponse) + require.NoError(t, err) + } + + return + } + + // Mock response if no auth token header + if r.Header.Get(authHeader) == "" { + w.WriteHeader(http.StatusUnauthorized) + return + } + + if strings.HasSuffix(r.RequestURI, getVirtualServersURISuffix) { + _, err = w.Write(mockVirtualServersResponse) + } else if strings.HasSuffix(r.RequestURI, getVirtualServersStatsURISuffix) { + _, err = w.Write(mockVirtualServersStatsResponse) + } else if strings.HasSuffix(r.RequestURI, getPoolsStatsURISuffix) { + _, err = w.Write(mockPoolsStatsResponse) + } else if strings.HasSuffix(r.RequestURI, getNodesStatsURISuffix) { + _, err = w.Write(mockNodesStatsResponse) + } else if strings.HasSuffix(r.RequestURI, getPoolMembersStatsURISuffix) { + // Assume pool member response files follow a specific file pattern based of pool name + poolURI := strings.TrimSuffix(r.RequestURI, getPoolMembersStatsURISuffix) + poolURIParts := strings.Split(poolURI, "/") + poolName := strings.ReplaceAll(poolURIParts[len(poolURIParts)-1], "~", "_") + poolMembersStatsData := createMockServerResponseData(t, poolName+poolMembersStatsResponseFileSuffix) + _, err = w.Write(poolMembersStatsData) + } else { + w.WriteHeader(http.StatusBadRequest) + err = nil + } + require.NoError(t, err) + })) + + return server +} + +func createMockServerResponseData(t *testing.T, fileName string) []byte { + t.Helper() + fullPath := filepath.Join("testdata", "integration", "mock_server", fileName) + + data, err := ioutil.ReadFile(fullPath) + require.NoError(t, err) + + return data +} diff --git a/receiver/bigipreceiver/internal/metadata/generated_metrics_v2.go b/receiver/bigipreceiver/internal/metadata/generated_metrics_v2.go new file mode 100644 index 000000000000..e4ac3ba04039 --- /dev/null +++ b/receiver/bigipreceiver/internal/metadata/generated_metrics_v2.go @@ -0,0 +1,2002 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "time" + + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/pmetric" +) + +// MetricSettings provides common settings for a particular metric. +type MetricSettings struct { + Enabled bool `mapstructure:"enabled"` +} + +// MetricsSettings provides settings for bigipreceiver metrics. +type MetricsSettings struct { + BigipNodeAvailability MetricSettings `mapstructure:"bigip.node.availability"` + BigipNodeConnectionCount MetricSettings `mapstructure:"bigip.node.connection.count"` + BigipNodeDataTransmitted MetricSettings `mapstructure:"bigip.node.data.transmitted"` + BigipNodeEnabled MetricSettings `mapstructure:"bigip.node.enabled"` + BigipNodePacketCount MetricSettings `mapstructure:"bigip.node.packet.count"` + BigipNodeRequestCount MetricSettings `mapstructure:"bigip.node.request.count"` + BigipNodeSessionCount MetricSettings `mapstructure:"bigip.node.session.count"` + BigipPoolAvailability MetricSettings `mapstructure:"bigip.pool.availability"` + BigipPoolConnectionCount MetricSettings `mapstructure:"bigip.pool.connection.count"` + BigipPoolDataTransmitted MetricSettings `mapstructure:"bigip.pool.data.transmitted"` + BigipPoolEnabled MetricSettings `mapstructure:"bigip.pool.enabled"` + BigipPoolMemberCount MetricSettings `mapstructure:"bigip.pool.member.count"` + BigipPoolPacketCount MetricSettings `mapstructure:"bigip.pool.packet.count"` + BigipPoolRequestCount MetricSettings `mapstructure:"bigip.pool.request.count"` + BigipPoolMemberAvailability MetricSettings `mapstructure:"bigip.pool_member.availability"` + BigipPoolMemberConnectionCount MetricSettings `mapstructure:"bigip.pool_member.connection.count"` + BigipPoolMemberDataTransmitted MetricSettings `mapstructure:"bigip.pool_member.data.transmitted"` + BigipPoolMemberEnabled MetricSettings `mapstructure:"bigip.pool_member.enabled"` + BigipPoolMemberPacketCount MetricSettings `mapstructure:"bigip.pool_member.packet.count"` + BigipPoolMemberRequestCount MetricSettings `mapstructure:"bigip.pool_member.request.count"` + BigipPoolMemberSessionCount MetricSettings `mapstructure:"bigip.pool_member.session.count"` + BigipVirtualServerAvailability MetricSettings `mapstructure:"bigip.virtual_server.availability"` + BigipVirtualServerConnectionCount MetricSettings `mapstructure:"bigip.virtual_server.connection.count"` + BigipVirtualServerDataTransmitted MetricSettings `mapstructure:"bigip.virtual_server.data.transmitted"` + BigipVirtualServerEnabled MetricSettings `mapstructure:"bigip.virtual_server.enabled"` + BigipVirtualServerPacketCount MetricSettings `mapstructure:"bigip.virtual_server.packet.count"` + BigipVirtualServerRequestCount MetricSettings `mapstructure:"bigip.virtual_server.request.count"` +} + +func DefaultMetricsSettings() MetricsSettings { + return MetricsSettings{ + BigipNodeAvailability: MetricSettings{ + Enabled: true, + }, + BigipNodeConnectionCount: MetricSettings{ + Enabled: true, + }, + BigipNodeDataTransmitted: MetricSettings{ + Enabled: true, + }, + BigipNodeEnabled: MetricSettings{ + Enabled: true, + }, + BigipNodePacketCount: MetricSettings{ + Enabled: true, + }, + BigipNodeRequestCount: MetricSettings{ + Enabled: true, + }, + BigipNodeSessionCount: MetricSettings{ + Enabled: true, + }, + BigipPoolAvailability: MetricSettings{ + Enabled: true, + }, + BigipPoolConnectionCount: MetricSettings{ + Enabled: true, + }, + BigipPoolDataTransmitted: MetricSettings{ + Enabled: true, + }, + BigipPoolEnabled: MetricSettings{ + Enabled: true, + }, + BigipPoolMemberCount: MetricSettings{ + Enabled: true, + }, + BigipPoolPacketCount: MetricSettings{ + Enabled: true, + }, + BigipPoolRequestCount: MetricSettings{ + Enabled: true, + }, + BigipPoolMemberAvailability: MetricSettings{ + Enabled: true, + }, + BigipPoolMemberConnectionCount: MetricSettings{ + Enabled: true, + }, + BigipPoolMemberDataTransmitted: MetricSettings{ + Enabled: true, + }, + BigipPoolMemberEnabled: MetricSettings{ + Enabled: true, + }, + BigipPoolMemberPacketCount: MetricSettings{ + Enabled: true, + }, + BigipPoolMemberRequestCount: MetricSettings{ + Enabled: true, + }, + BigipPoolMemberSessionCount: MetricSettings{ + Enabled: true, + }, + BigipVirtualServerAvailability: MetricSettings{ + Enabled: true, + }, + BigipVirtualServerConnectionCount: MetricSettings{ + Enabled: true, + }, + BigipVirtualServerDataTransmitted: MetricSettings{ + Enabled: true, + }, + BigipVirtualServerEnabled: MetricSettings{ + Enabled: true, + }, + BigipVirtualServerPacketCount: MetricSettings{ + Enabled: true, + }, + BigipVirtualServerRequestCount: MetricSettings{ + Enabled: true, + }, + } +} + +// AttributeActiveStatus specifies the a value active.status attribute. +type AttributeActiveStatus int + +const ( + _ AttributeActiveStatus = iota + AttributeActiveStatusActive + AttributeActiveStatusInactive +) + +// String returns the string representation of the AttributeActiveStatus. +func (av AttributeActiveStatus) String() string { + switch av { + case AttributeActiveStatusActive: + return "active" + case AttributeActiveStatusInactive: + return "inactive" + } + return "" +} + +// MapAttributeActiveStatus is a helper map of string to AttributeActiveStatus attribute value. +var MapAttributeActiveStatus = map[string]AttributeActiveStatus{ + "active": AttributeActiveStatusActive, + "inactive": AttributeActiveStatusInactive, +} + +// AttributeAvailabilityStatus specifies the a value availability.status attribute. +type AttributeAvailabilityStatus int + +const ( + _ AttributeAvailabilityStatus = iota + AttributeAvailabilityStatusOffline + AttributeAvailabilityStatusUnknown + AttributeAvailabilityStatusAvailable +) + +// String returns the string representation of the AttributeAvailabilityStatus. +func (av AttributeAvailabilityStatus) String() string { + switch av { + case AttributeAvailabilityStatusOffline: + return "offline" + case AttributeAvailabilityStatusUnknown: + return "unknown" + case AttributeAvailabilityStatusAvailable: + return "available" + } + return "" +} + +// MapAttributeAvailabilityStatus is a helper map of string to AttributeAvailabilityStatus attribute value. +var MapAttributeAvailabilityStatus = map[string]AttributeAvailabilityStatus{ + "offline": AttributeAvailabilityStatusOffline, + "unknown": AttributeAvailabilityStatusUnknown, + "available": AttributeAvailabilityStatusAvailable, +} + +// AttributeDirection specifies the a value direction attribute. +type AttributeDirection int + +const ( + _ AttributeDirection = iota + AttributeDirectionSent + AttributeDirectionReceived +) + +// String returns the string representation of the AttributeDirection. +func (av AttributeDirection) String() string { + switch av { + case AttributeDirectionSent: + return "sent" + case AttributeDirectionReceived: + return "received" + } + return "" +} + +// MapAttributeDirection is a helper map of string to AttributeDirection attribute value. +var MapAttributeDirection = map[string]AttributeDirection{ + "sent": AttributeDirectionSent, + "received": AttributeDirectionReceived, +} + +// AttributeEnabledStatus specifies the a value enabled.status attribute. +type AttributeEnabledStatus int + +const ( + _ AttributeEnabledStatus = iota + AttributeEnabledStatusDisabled + AttributeEnabledStatusEnabled +) + +// String returns the string representation of the AttributeEnabledStatus. +func (av AttributeEnabledStatus) String() string { + switch av { + case AttributeEnabledStatusDisabled: + return "disabled" + case AttributeEnabledStatusEnabled: + return "enabled" + } + return "" +} + +// MapAttributeEnabledStatus is a helper map of string to AttributeEnabledStatus attribute value. +var MapAttributeEnabledStatus = map[string]AttributeEnabledStatus{ + "disabled": AttributeEnabledStatusDisabled, + "enabled": AttributeEnabledStatusEnabled, +} + +type metricBigipNodeAvailability struct { + data pmetric.Metric // data buffer for generated metric. + settings MetricSettings // metric settings provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills bigip.node.availability metric with initial data. +func (m *metricBigipNodeAvailability) init() { + m.data.SetName("bigip.node.availability") + m.data.SetDescription("Availability of the node.") + m.data.SetUnit("1") + m.data.SetDataType(pmetric.MetricDataTypeGauge) + m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) +} + +func (m *metricBigipNodeAvailability) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64, availabilityStatusAttributeValue string) { + if !m.settings.Enabled { + return + } + dp := m.data.Gauge().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntVal(val) + dp.Attributes().Insert("status", pcommon.NewValueString(availabilityStatusAttributeValue)) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricBigipNodeAvailability) updateCapacity() { + if m.data.Gauge().DataPoints().Len() > m.capacity { + m.capacity = m.data.Gauge().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricBigipNodeAvailability) emit(metrics pmetric.MetricSlice) { + if m.settings.Enabled && m.data.Gauge().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricBigipNodeAvailability(settings MetricSettings) metricBigipNodeAvailability { + m := metricBigipNodeAvailability{settings: settings} + if settings.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +type metricBigipNodeConnectionCount struct { + data pmetric.Metric // data buffer for generated metric. + settings MetricSettings // metric settings provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills bigip.node.connection.count metric with initial data. +func (m *metricBigipNodeConnectionCount) init() { + m.data.SetName("bigip.node.connection.count") + m.data.SetDescription("Current number of connections to the node.") + m.data.SetUnit("{connections}") + m.data.SetDataType(pmetric.MetricDataTypeSum) + m.data.Sum().SetIsMonotonic(false) + m.data.Sum().SetAggregationTemporality(pmetric.MetricAggregationTemporalityCumulative) +} + +func (m *metricBigipNodeConnectionCount) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64) { + if !m.settings.Enabled { + return + } + dp := m.data.Sum().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntVal(val) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricBigipNodeConnectionCount) updateCapacity() { + if m.data.Sum().DataPoints().Len() > m.capacity { + m.capacity = m.data.Sum().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricBigipNodeConnectionCount) emit(metrics pmetric.MetricSlice) { + if m.settings.Enabled && m.data.Sum().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricBigipNodeConnectionCount(settings MetricSettings) metricBigipNodeConnectionCount { + m := metricBigipNodeConnectionCount{settings: settings} + if settings.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +type metricBigipNodeDataTransmitted struct { + data pmetric.Metric // data buffer for generated metric. + settings MetricSettings // metric settings provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills bigip.node.data.transmitted metric with initial data. +func (m *metricBigipNodeDataTransmitted) init() { + m.data.SetName("bigip.node.data.transmitted") + m.data.SetDescription("Amount of data transmitted to and from the node.") + m.data.SetUnit("By") + m.data.SetDataType(pmetric.MetricDataTypeSum) + m.data.Sum().SetIsMonotonic(true) + m.data.Sum().SetAggregationTemporality(pmetric.MetricAggregationTemporalityCumulative) + m.data.Sum().DataPoints().EnsureCapacity(m.capacity) +} + +func (m *metricBigipNodeDataTransmitted) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64, directionAttributeValue string) { + if !m.settings.Enabled { + return + } + dp := m.data.Sum().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntVal(val) + dp.Attributes().Insert("direction", pcommon.NewValueString(directionAttributeValue)) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricBigipNodeDataTransmitted) updateCapacity() { + if m.data.Sum().DataPoints().Len() > m.capacity { + m.capacity = m.data.Sum().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricBigipNodeDataTransmitted) emit(metrics pmetric.MetricSlice) { + if m.settings.Enabled && m.data.Sum().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricBigipNodeDataTransmitted(settings MetricSettings) metricBigipNodeDataTransmitted { + m := metricBigipNodeDataTransmitted{settings: settings} + if settings.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +type metricBigipNodeEnabled struct { + data pmetric.Metric // data buffer for generated metric. + settings MetricSettings // metric settings provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills bigip.node.enabled metric with initial data. +func (m *metricBigipNodeEnabled) init() { + m.data.SetName("bigip.node.enabled") + m.data.SetDescription("Enabled state of of the node.") + m.data.SetUnit("1") + m.data.SetDataType(pmetric.MetricDataTypeGauge) + m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) +} + +func (m *metricBigipNodeEnabled) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64, enabledStatusAttributeValue string) { + if !m.settings.Enabled { + return + } + dp := m.data.Gauge().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntVal(val) + dp.Attributes().Insert("status", pcommon.NewValueString(enabledStatusAttributeValue)) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricBigipNodeEnabled) updateCapacity() { + if m.data.Gauge().DataPoints().Len() > m.capacity { + m.capacity = m.data.Gauge().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricBigipNodeEnabled) emit(metrics pmetric.MetricSlice) { + if m.settings.Enabled && m.data.Gauge().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricBigipNodeEnabled(settings MetricSettings) metricBigipNodeEnabled { + m := metricBigipNodeEnabled{settings: settings} + if settings.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +type metricBigipNodePacketCount struct { + data pmetric.Metric // data buffer for generated metric. + settings MetricSettings // metric settings provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills bigip.node.packet.count metric with initial data. +func (m *metricBigipNodePacketCount) init() { + m.data.SetName("bigip.node.packet.count") + m.data.SetDescription("Number of packets transmitted to and from the node.") + m.data.SetUnit("{packets}") + m.data.SetDataType(pmetric.MetricDataTypeSum) + m.data.Sum().SetIsMonotonic(true) + m.data.Sum().SetAggregationTemporality(pmetric.MetricAggregationTemporalityCumulative) + m.data.Sum().DataPoints().EnsureCapacity(m.capacity) +} + +func (m *metricBigipNodePacketCount) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64, directionAttributeValue string) { + if !m.settings.Enabled { + return + } + dp := m.data.Sum().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntVal(val) + dp.Attributes().Insert("direction", pcommon.NewValueString(directionAttributeValue)) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricBigipNodePacketCount) updateCapacity() { + if m.data.Sum().DataPoints().Len() > m.capacity { + m.capacity = m.data.Sum().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricBigipNodePacketCount) emit(metrics pmetric.MetricSlice) { + if m.settings.Enabled && m.data.Sum().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricBigipNodePacketCount(settings MetricSettings) metricBigipNodePacketCount { + m := metricBigipNodePacketCount{settings: settings} + if settings.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +type metricBigipNodeRequestCount struct { + data pmetric.Metric // data buffer for generated metric. + settings MetricSettings // metric settings provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills bigip.node.request.count metric with initial data. +func (m *metricBigipNodeRequestCount) init() { + m.data.SetName("bigip.node.request.count") + m.data.SetDescription("Number of requests to the node.") + m.data.SetUnit("{requests}") + m.data.SetDataType(pmetric.MetricDataTypeSum) + m.data.Sum().SetIsMonotonic(true) + m.data.Sum().SetAggregationTemporality(pmetric.MetricAggregationTemporalityCumulative) +} + +func (m *metricBigipNodeRequestCount) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64) { + if !m.settings.Enabled { + return + } + dp := m.data.Sum().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntVal(val) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricBigipNodeRequestCount) updateCapacity() { + if m.data.Sum().DataPoints().Len() > m.capacity { + m.capacity = m.data.Sum().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricBigipNodeRequestCount) emit(metrics pmetric.MetricSlice) { + if m.settings.Enabled && m.data.Sum().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricBigipNodeRequestCount(settings MetricSettings) metricBigipNodeRequestCount { + m := metricBigipNodeRequestCount{settings: settings} + if settings.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +type metricBigipNodeSessionCount struct { + data pmetric.Metric // data buffer for generated metric. + settings MetricSettings // metric settings provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills bigip.node.session.count metric with initial data. +func (m *metricBigipNodeSessionCount) init() { + m.data.SetName("bigip.node.session.count") + m.data.SetDescription("Current number of sessions for the node.") + m.data.SetUnit("{sessions}") + m.data.SetDataType(pmetric.MetricDataTypeSum) + m.data.Sum().SetIsMonotonic(false) + m.data.Sum().SetAggregationTemporality(pmetric.MetricAggregationTemporalityCumulative) +} + +func (m *metricBigipNodeSessionCount) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64) { + if !m.settings.Enabled { + return + } + dp := m.data.Sum().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntVal(val) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricBigipNodeSessionCount) updateCapacity() { + if m.data.Sum().DataPoints().Len() > m.capacity { + m.capacity = m.data.Sum().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricBigipNodeSessionCount) emit(metrics pmetric.MetricSlice) { + if m.settings.Enabled && m.data.Sum().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricBigipNodeSessionCount(settings MetricSettings) metricBigipNodeSessionCount { + m := metricBigipNodeSessionCount{settings: settings} + if settings.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +type metricBigipPoolAvailability struct { + data pmetric.Metric // data buffer for generated metric. + settings MetricSettings // metric settings provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills bigip.pool.availability metric with initial data. +func (m *metricBigipPoolAvailability) init() { + m.data.SetName("bigip.pool.availability") + m.data.SetDescription("Availability of the pool.") + m.data.SetUnit("1") + m.data.SetDataType(pmetric.MetricDataTypeGauge) + m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) +} + +func (m *metricBigipPoolAvailability) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64, availabilityStatusAttributeValue string) { + if !m.settings.Enabled { + return + } + dp := m.data.Gauge().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntVal(val) + dp.Attributes().Insert("status", pcommon.NewValueString(availabilityStatusAttributeValue)) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricBigipPoolAvailability) updateCapacity() { + if m.data.Gauge().DataPoints().Len() > m.capacity { + m.capacity = m.data.Gauge().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricBigipPoolAvailability) emit(metrics pmetric.MetricSlice) { + if m.settings.Enabled && m.data.Gauge().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricBigipPoolAvailability(settings MetricSettings) metricBigipPoolAvailability { + m := metricBigipPoolAvailability{settings: settings} + if settings.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +type metricBigipPoolConnectionCount struct { + data pmetric.Metric // data buffer for generated metric. + settings MetricSettings // metric settings provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills bigip.pool.connection.count metric with initial data. +func (m *metricBigipPoolConnectionCount) init() { + m.data.SetName("bigip.pool.connection.count") + m.data.SetDescription("Current number of connections to the pool.") + m.data.SetUnit("{connections}") + m.data.SetDataType(pmetric.MetricDataTypeSum) + m.data.Sum().SetIsMonotonic(false) + m.data.Sum().SetAggregationTemporality(pmetric.MetricAggregationTemporalityCumulative) +} + +func (m *metricBigipPoolConnectionCount) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64) { + if !m.settings.Enabled { + return + } + dp := m.data.Sum().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntVal(val) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricBigipPoolConnectionCount) updateCapacity() { + if m.data.Sum().DataPoints().Len() > m.capacity { + m.capacity = m.data.Sum().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricBigipPoolConnectionCount) emit(metrics pmetric.MetricSlice) { + if m.settings.Enabled && m.data.Sum().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricBigipPoolConnectionCount(settings MetricSettings) metricBigipPoolConnectionCount { + m := metricBigipPoolConnectionCount{settings: settings} + if settings.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +type metricBigipPoolDataTransmitted struct { + data pmetric.Metric // data buffer for generated metric. + settings MetricSettings // metric settings provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills bigip.pool.data.transmitted metric with initial data. +func (m *metricBigipPoolDataTransmitted) init() { + m.data.SetName("bigip.pool.data.transmitted") + m.data.SetDescription("Amount of data transmitted to and from the pool.") + m.data.SetUnit("By") + m.data.SetDataType(pmetric.MetricDataTypeSum) + m.data.Sum().SetIsMonotonic(true) + m.data.Sum().SetAggregationTemporality(pmetric.MetricAggregationTemporalityCumulative) + m.data.Sum().DataPoints().EnsureCapacity(m.capacity) +} + +func (m *metricBigipPoolDataTransmitted) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64, directionAttributeValue string) { + if !m.settings.Enabled { + return + } + dp := m.data.Sum().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntVal(val) + dp.Attributes().Insert("direction", pcommon.NewValueString(directionAttributeValue)) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricBigipPoolDataTransmitted) updateCapacity() { + if m.data.Sum().DataPoints().Len() > m.capacity { + m.capacity = m.data.Sum().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricBigipPoolDataTransmitted) emit(metrics pmetric.MetricSlice) { + if m.settings.Enabled && m.data.Sum().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricBigipPoolDataTransmitted(settings MetricSettings) metricBigipPoolDataTransmitted { + m := metricBigipPoolDataTransmitted{settings: settings} + if settings.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +type metricBigipPoolEnabled struct { + data pmetric.Metric // data buffer for generated metric. + settings MetricSettings // metric settings provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills bigip.pool.enabled metric with initial data. +func (m *metricBigipPoolEnabled) init() { + m.data.SetName("bigip.pool.enabled") + m.data.SetDescription("Enabled state of of the pool.") + m.data.SetUnit("1") + m.data.SetDataType(pmetric.MetricDataTypeGauge) + m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) +} + +func (m *metricBigipPoolEnabled) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64, enabledStatusAttributeValue string) { + if !m.settings.Enabled { + return + } + dp := m.data.Gauge().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntVal(val) + dp.Attributes().Insert("status", pcommon.NewValueString(enabledStatusAttributeValue)) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricBigipPoolEnabled) updateCapacity() { + if m.data.Gauge().DataPoints().Len() > m.capacity { + m.capacity = m.data.Gauge().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricBigipPoolEnabled) emit(metrics pmetric.MetricSlice) { + if m.settings.Enabled && m.data.Gauge().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricBigipPoolEnabled(settings MetricSettings) metricBigipPoolEnabled { + m := metricBigipPoolEnabled{settings: settings} + if settings.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +type metricBigipPoolMemberCount struct { + data pmetric.Metric // data buffer for generated metric. + settings MetricSettings // metric settings provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills bigip.pool.member.count metric with initial data. +func (m *metricBigipPoolMemberCount) init() { + m.data.SetName("bigip.pool.member.count") + m.data.SetDescription("Total number of pool members.") + m.data.SetUnit("{members}") + m.data.SetDataType(pmetric.MetricDataTypeSum) + m.data.Sum().SetIsMonotonic(false) + m.data.Sum().SetAggregationTemporality(pmetric.MetricAggregationTemporalityCumulative) + m.data.Sum().DataPoints().EnsureCapacity(m.capacity) +} + +func (m *metricBigipPoolMemberCount) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64, activeStatusAttributeValue string) { + if !m.settings.Enabled { + return + } + dp := m.data.Sum().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntVal(val) + dp.Attributes().Insert("status", pcommon.NewValueString(activeStatusAttributeValue)) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricBigipPoolMemberCount) updateCapacity() { + if m.data.Sum().DataPoints().Len() > m.capacity { + m.capacity = m.data.Sum().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricBigipPoolMemberCount) emit(metrics pmetric.MetricSlice) { + if m.settings.Enabled && m.data.Sum().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricBigipPoolMemberCount(settings MetricSettings) metricBigipPoolMemberCount { + m := metricBigipPoolMemberCount{settings: settings} + if settings.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +type metricBigipPoolPacketCount struct { + data pmetric.Metric // data buffer for generated metric. + settings MetricSettings // metric settings provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills bigip.pool.packet.count metric with initial data. +func (m *metricBigipPoolPacketCount) init() { + m.data.SetName("bigip.pool.packet.count") + m.data.SetDescription("Number of packets transmitted to and from the pool.") + m.data.SetUnit("{packets}") + m.data.SetDataType(pmetric.MetricDataTypeSum) + m.data.Sum().SetIsMonotonic(true) + m.data.Sum().SetAggregationTemporality(pmetric.MetricAggregationTemporalityCumulative) + m.data.Sum().DataPoints().EnsureCapacity(m.capacity) +} + +func (m *metricBigipPoolPacketCount) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64, directionAttributeValue string) { + if !m.settings.Enabled { + return + } + dp := m.data.Sum().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntVal(val) + dp.Attributes().Insert("direction", pcommon.NewValueString(directionAttributeValue)) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricBigipPoolPacketCount) updateCapacity() { + if m.data.Sum().DataPoints().Len() > m.capacity { + m.capacity = m.data.Sum().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricBigipPoolPacketCount) emit(metrics pmetric.MetricSlice) { + if m.settings.Enabled && m.data.Sum().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricBigipPoolPacketCount(settings MetricSettings) metricBigipPoolPacketCount { + m := metricBigipPoolPacketCount{settings: settings} + if settings.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +type metricBigipPoolRequestCount struct { + data pmetric.Metric // data buffer for generated metric. + settings MetricSettings // metric settings provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills bigip.pool.request.count metric with initial data. +func (m *metricBigipPoolRequestCount) init() { + m.data.SetName("bigip.pool.request.count") + m.data.SetDescription("Number of requests to the pool.") + m.data.SetUnit("{requests}") + m.data.SetDataType(pmetric.MetricDataTypeSum) + m.data.Sum().SetIsMonotonic(true) + m.data.Sum().SetAggregationTemporality(pmetric.MetricAggregationTemporalityCumulative) +} + +func (m *metricBigipPoolRequestCount) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64) { + if !m.settings.Enabled { + return + } + dp := m.data.Sum().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntVal(val) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricBigipPoolRequestCount) updateCapacity() { + if m.data.Sum().DataPoints().Len() > m.capacity { + m.capacity = m.data.Sum().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricBigipPoolRequestCount) emit(metrics pmetric.MetricSlice) { + if m.settings.Enabled && m.data.Sum().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricBigipPoolRequestCount(settings MetricSettings) metricBigipPoolRequestCount { + m := metricBigipPoolRequestCount{settings: settings} + if settings.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +type metricBigipPoolMemberAvailability struct { + data pmetric.Metric // data buffer for generated metric. + settings MetricSettings // metric settings provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills bigip.pool_member.availability metric with initial data. +func (m *metricBigipPoolMemberAvailability) init() { + m.data.SetName("bigip.pool_member.availability") + m.data.SetDescription("Availability of the pool member.") + m.data.SetUnit("1") + m.data.SetDataType(pmetric.MetricDataTypeGauge) + m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) +} + +func (m *metricBigipPoolMemberAvailability) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64, availabilityStatusAttributeValue string) { + if !m.settings.Enabled { + return + } + dp := m.data.Gauge().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntVal(val) + dp.Attributes().Insert("status", pcommon.NewValueString(availabilityStatusAttributeValue)) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricBigipPoolMemberAvailability) updateCapacity() { + if m.data.Gauge().DataPoints().Len() > m.capacity { + m.capacity = m.data.Gauge().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricBigipPoolMemberAvailability) emit(metrics pmetric.MetricSlice) { + if m.settings.Enabled && m.data.Gauge().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricBigipPoolMemberAvailability(settings MetricSettings) metricBigipPoolMemberAvailability { + m := metricBigipPoolMemberAvailability{settings: settings} + if settings.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +type metricBigipPoolMemberConnectionCount struct { + data pmetric.Metric // data buffer for generated metric. + settings MetricSettings // metric settings provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills bigip.pool_member.connection.count metric with initial data. +func (m *metricBigipPoolMemberConnectionCount) init() { + m.data.SetName("bigip.pool_member.connection.count") + m.data.SetDescription("Current number of connections to the pool member.") + m.data.SetUnit("{connections}") + m.data.SetDataType(pmetric.MetricDataTypeSum) + m.data.Sum().SetIsMonotonic(false) + m.data.Sum().SetAggregationTemporality(pmetric.MetricAggregationTemporalityCumulative) +} + +func (m *metricBigipPoolMemberConnectionCount) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64) { + if !m.settings.Enabled { + return + } + dp := m.data.Sum().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntVal(val) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricBigipPoolMemberConnectionCount) updateCapacity() { + if m.data.Sum().DataPoints().Len() > m.capacity { + m.capacity = m.data.Sum().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricBigipPoolMemberConnectionCount) emit(metrics pmetric.MetricSlice) { + if m.settings.Enabled && m.data.Sum().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricBigipPoolMemberConnectionCount(settings MetricSettings) metricBigipPoolMemberConnectionCount { + m := metricBigipPoolMemberConnectionCount{settings: settings} + if settings.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +type metricBigipPoolMemberDataTransmitted struct { + data pmetric.Metric // data buffer for generated metric. + settings MetricSettings // metric settings provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills bigip.pool_member.data.transmitted metric with initial data. +func (m *metricBigipPoolMemberDataTransmitted) init() { + m.data.SetName("bigip.pool_member.data.transmitted") + m.data.SetDescription("Amount of data transmitted to and from the pool member.") + m.data.SetUnit("By") + m.data.SetDataType(pmetric.MetricDataTypeSum) + m.data.Sum().SetIsMonotonic(true) + m.data.Sum().SetAggregationTemporality(pmetric.MetricAggregationTemporalityCumulative) + m.data.Sum().DataPoints().EnsureCapacity(m.capacity) +} + +func (m *metricBigipPoolMemberDataTransmitted) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64, directionAttributeValue string) { + if !m.settings.Enabled { + return + } + dp := m.data.Sum().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntVal(val) + dp.Attributes().Insert("direction", pcommon.NewValueString(directionAttributeValue)) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricBigipPoolMemberDataTransmitted) updateCapacity() { + if m.data.Sum().DataPoints().Len() > m.capacity { + m.capacity = m.data.Sum().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricBigipPoolMemberDataTransmitted) emit(metrics pmetric.MetricSlice) { + if m.settings.Enabled && m.data.Sum().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricBigipPoolMemberDataTransmitted(settings MetricSettings) metricBigipPoolMemberDataTransmitted { + m := metricBigipPoolMemberDataTransmitted{settings: settings} + if settings.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +type metricBigipPoolMemberEnabled struct { + data pmetric.Metric // data buffer for generated metric. + settings MetricSettings // metric settings provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills bigip.pool_member.enabled metric with initial data. +func (m *metricBigipPoolMemberEnabled) init() { + m.data.SetName("bigip.pool_member.enabled") + m.data.SetDescription("Enabled state of of the pool member.") + m.data.SetUnit("1") + m.data.SetDataType(pmetric.MetricDataTypeGauge) + m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) +} + +func (m *metricBigipPoolMemberEnabled) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64, enabledStatusAttributeValue string) { + if !m.settings.Enabled { + return + } + dp := m.data.Gauge().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntVal(val) + dp.Attributes().Insert("status", pcommon.NewValueString(enabledStatusAttributeValue)) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricBigipPoolMemberEnabled) updateCapacity() { + if m.data.Gauge().DataPoints().Len() > m.capacity { + m.capacity = m.data.Gauge().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricBigipPoolMemberEnabled) emit(metrics pmetric.MetricSlice) { + if m.settings.Enabled && m.data.Gauge().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricBigipPoolMemberEnabled(settings MetricSettings) metricBigipPoolMemberEnabled { + m := metricBigipPoolMemberEnabled{settings: settings} + if settings.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +type metricBigipPoolMemberPacketCount struct { + data pmetric.Metric // data buffer for generated metric. + settings MetricSettings // metric settings provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills bigip.pool_member.packet.count metric with initial data. +func (m *metricBigipPoolMemberPacketCount) init() { + m.data.SetName("bigip.pool_member.packet.count") + m.data.SetDescription("Number of packets transmitted to and from the pool member.") + m.data.SetUnit("{packets}") + m.data.SetDataType(pmetric.MetricDataTypeSum) + m.data.Sum().SetIsMonotonic(true) + m.data.Sum().SetAggregationTemporality(pmetric.MetricAggregationTemporalityCumulative) + m.data.Sum().DataPoints().EnsureCapacity(m.capacity) +} + +func (m *metricBigipPoolMemberPacketCount) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64, directionAttributeValue string) { + if !m.settings.Enabled { + return + } + dp := m.data.Sum().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntVal(val) + dp.Attributes().Insert("direction", pcommon.NewValueString(directionAttributeValue)) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricBigipPoolMemberPacketCount) updateCapacity() { + if m.data.Sum().DataPoints().Len() > m.capacity { + m.capacity = m.data.Sum().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricBigipPoolMemberPacketCount) emit(metrics pmetric.MetricSlice) { + if m.settings.Enabled && m.data.Sum().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricBigipPoolMemberPacketCount(settings MetricSettings) metricBigipPoolMemberPacketCount { + m := metricBigipPoolMemberPacketCount{settings: settings} + if settings.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +type metricBigipPoolMemberRequestCount struct { + data pmetric.Metric // data buffer for generated metric. + settings MetricSettings // metric settings provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills bigip.pool_member.request.count metric with initial data. +func (m *metricBigipPoolMemberRequestCount) init() { + m.data.SetName("bigip.pool_member.request.count") + m.data.SetDescription("Number of requests to the pool member.") + m.data.SetUnit("{requests}") + m.data.SetDataType(pmetric.MetricDataTypeSum) + m.data.Sum().SetIsMonotonic(true) + m.data.Sum().SetAggregationTemporality(pmetric.MetricAggregationTemporalityCumulative) +} + +func (m *metricBigipPoolMemberRequestCount) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64) { + if !m.settings.Enabled { + return + } + dp := m.data.Sum().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntVal(val) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricBigipPoolMemberRequestCount) updateCapacity() { + if m.data.Sum().DataPoints().Len() > m.capacity { + m.capacity = m.data.Sum().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricBigipPoolMemberRequestCount) emit(metrics pmetric.MetricSlice) { + if m.settings.Enabled && m.data.Sum().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricBigipPoolMemberRequestCount(settings MetricSettings) metricBigipPoolMemberRequestCount { + m := metricBigipPoolMemberRequestCount{settings: settings} + if settings.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +type metricBigipPoolMemberSessionCount struct { + data pmetric.Metric // data buffer for generated metric. + settings MetricSettings // metric settings provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills bigip.pool_member.session.count metric with initial data. +func (m *metricBigipPoolMemberSessionCount) init() { + m.data.SetName("bigip.pool_member.session.count") + m.data.SetDescription("Current number of sessions for the pool member.") + m.data.SetUnit("{sessions}") + m.data.SetDataType(pmetric.MetricDataTypeSum) + m.data.Sum().SetIsMonotonic(false) + m.data.Sum().SetAggregationTemporality(pmetric.MetricAggregationTemporalityCumulative) +} + +func (m *metricBigipPoolMemberSessionCount) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64) { + if !m.settings.Enabled { + return + } + dp := m.data.Sum().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntVal(val) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricBigipPoolMemberSessionCount) updateCapacity() { + if m.data.Sum().DataPoints().Len() > m.capacity { + m.capacity = m.data.Sum().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricBigipPoolMemberSessionCount) emit(metrics pmetric.MetricSlice) { + if m.settings.Enabled && m.data.Sum().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricBigipPoolMemberSessionCount(settings MetricSettings) metricBigipPoolMemberSessionCount { + m := metricBigipPoolMemberSessionCount{settings: settings} + if settings.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +type metricBigipVirtualServerAvailability struct { + data pmetric.Metric // data buffer for generated metric. + settings MetricSettings // metric settings provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills bigip.virtual_server.availability metric with initial data. +func (m *metricBigipVirtualServerAvailability) init() { + m.data.SetName("bigip.virtual_server.availability") + m.data.SetDescription("Availability of the virtual server.") + m.data.SetUnit("1") + m.data.SetDataType(pmetric.MetricDataTypeGauge) + m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) +} + +func (m *metricBigipVirtualServerAvailability) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64, availabilityStatusAttributeValue string) { + if !m.settings.Enabled { + return + } + dp := m.data.Gauge().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntVal(val) + dp.Attributes().Insert("status", pcommon.NewValueString(availabilityStatusAttributeValue)) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricBigipVirtualServerAvailability) updateCapacity() { + if m.data.Gauge().DataPoints().Len() > m.capacity { + m.capacity = m.data.Gauge().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricBigipVirtualServerAvailability) emit(metrics pmetric.MetricSlice) { + if m.settings.Enabled && m.data.Gauge().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricBigipVirtualServerAvailability(settings MetricSettings) metricBigipVirtualServerAvailability { + m := metricBigipVirtualServerAvailability{settings: settings} + if settings.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +type metricBigipVirtualServerConnectionCount struct { + data pmetric.Metric // data buffer for generated metric. + settings MetricSettings // metric settings provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills bigip.virtual_server.connection.count metric with initial data. +func (m *metricBigipVirtualServerConnectionCount) init() { + m.data.SetName("bigip.virtual_server.connection.count") + m.data.SetDescription("Current number of connections to the virtual server.") + m.data.SetUnit("{connections}") + m.data.SetDataType(pmetric.MetricDataTypeSum) + m.data.Sum().SetIsMonotonic(false) + m.data.Sum().SetAggregationTemporality(pmetric.MetricAggregationTemporalityCumulative) +} + +func (m *metricBigipVirtualServerConnectionCount) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64) { + if !m.settings.Enabled { + return + } + dp := m.data.Sum().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntVal(val) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricBigipVirtualServerConnectionCount) updateCapacity() { + if m.data.Sum().DataPoints().Len() > m.capacity { + m.capacity = m.data.Sum().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricBigipVirtualServerConnectionCount) emit(metrics pmetric.MetricSlice) { + if m.settings.Enabled && m.data.Sum().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricBigipVirtualServerConnectionCount(settings MetricSettings) metricBigipVirtualServerConnectionCount { + m := metricBigipVirtualServerConnectionCount{settings: settings} + if settings.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +type metricBigipVirtualServerDataTransmitted struct { + data pmetric.Metric // data buffer for generated metric. + settings MetricSettings // metric settings provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills bigip.virtual_server.data.transmitted metric with initial data. +func (m *metricBigipVirtualServerDataTransmitted) init() { + m.data.SetName("bigip.virtual_server.data.transmitted") + m.data.SetDescription("Amount of data transmitted to and from the virtual server.") + m.data.SetUnit("By") + m.data.SetDataType(pmetric.MetricDataTypeSum) + m.data.Sum().SetIsMonotonic(true) + m.data.Sum().SetAggregationTemporality(pmetric.MetricAggregationTemporalityCumulative) + m.data.Sum().DataPoints().EnsureCapacity(m.capacity) +} + +func (m *metricBigipVirtualServerDataTransmitted) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64, directionAttributeValue string) { + if !m.settings.Enabled { + return + } + dp := m.data.Sum().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntVal(val) + dp.Attributes().Insert("direction", pcommon.NewValueString(directionAttributeValue)) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricBigipVirtualServerDataTransmitted) updateCapacity() { + if m.data.Sum().DataPoints().Len() > m.capacity { + m.capacity = m.data.Sum().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricBigipVirtualServerDataTransmitted) emit(metrics pmetric.MetricSlice) { + if m.settings.Enabled && m.data.Sum().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricBigipVirtualServerDataTransmitted(settings MetricSettings) metricBigipVirtualServerDataTransmitted { + m := metricBigipVirtualServerDataTransmitted{settings: settings} + if settings.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +type metricBigipVirtualServerEnabled struct { + data pmetric.Metric // data buffer for generated metric. + settings MetricSettings // metric settings provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills bigip.virtual_server.enabled metric with initial data. +func (m *metricBigipVirtualServerEnabled) init() { + m.data.SetName("bigip.virtual_server.enabled") + m.data.SetDescription("Enabled state of of the virtual server.") + m.data.SetUnit("1") + m.data.SetDataType(pmetric.MetricDataTypeGauge) + m.data.Gauge().DataPoints().EnsureCapacity(m.capacity) +} + +func (m *metricBigipVirtualServerEnabled) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64, enabledStatusAttributeValue string) { + if !m.settings.Enabled { + return + } + dp := m.data.Gauge().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntVal(val) + dp.Attributes().Insert("status", pcommon.NewValueString(enabledStatusAttributeValue)) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricBigipVirtualServerEnabled) updateCapacity() { + if m.data.Gauge().DataPoints().Len() > m.capacity { + m.capacity = m.data.Gauge().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricBigipVirtualServerEnabled) emit(metrics pmetric.MetricSlice) { + if m.settings.Enabled && m.data.Gauge().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricBigipVirtualServerEnabled(settings MetricSettings) metricBigipVirtualServerEnabled { + m := metricBigipVirtualServerEnabled{settings: settings} + if settings.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +type metricBigipVirtualServerPacketCount struct { + data pmetric.Metric // data buffer for generated metric. + settings MetricSettings // metric settings provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills bigip.virtual_server.packet.count metric with initial data. +func (m *metricBigipVirtualServerPacketCount) init() { + m.data.SetName("bigip.virtual_server.packet.count") + m.data.SetDescription("Number of packets transmitted to and from the virtual server.") + m.data.SetUnit("{packets}") + m.data.SetDataType(pmetric.MetricDataTypeSum) + m.data.Sum().SetIsMonotonic(true) + m.data.Sum().SetAggregationTemporality(pmetric.MetricAggregationTemporalityCumulative) + m.data.Sum().DataPoints().EnsureCapacity(m.capacity) +} + +func (m *metricBigipVirtualServerPacketCount) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64, directionAttributeValue string) { + if !m.settings.Enabled { + return + } + dp := m.data.Sum().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntVal(val) + dp.Attributes().Insert("direction", pcommon.NewValueString(directionAttributeValue)) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricBigipVirtualServerPacketCount) updateCapacity() { + if m.data.Sum().DataPoints().Len() > m.capacity { + m.capacity = m.data.Sum().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricBigipVirtualServerPacketCount) emit(metrics pmetric.MetricSlice) { + if m.settings.Enabled && m.data.Sum().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricBigipVirtualServerPacketCount(settings MetricSettings) metricBigipVirtualServerPacketCount { + m := metricBigipVirtualServerPacketCount{settings: settings} + if settings.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +type metricBigipVirtualServerRequestCount struct { + data pmetric.Metric // data buffer for generated metric. + settings MetricSettings // metric settings provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills bigip.virtual_server.request.count metric with initial data. +func (m *metricBigipVirtualServerRequestCount) init() { + m.data.SetName("bigip.virtual_server.request.count") + m.data.SetDescription("Number of requests to the virtual server.") + m.data.SetUnit("{requests}") + m.data.SetDataType(pmetric.MetricDataTypeSum) + m.data.Sum().SetIsMonotonic(true) + m.data.Sum().SetAggregationTemporality(pmetric.MetricAggregationTemporalityCumulative) +} + +func (m *metricBigipVirtualServerRequestCount) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64) { + if !m.settings.Enabled { + return + } + dp := m.data.Sum().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntVal(val) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricBigipVirtualServerRequestCount) updateCapacity() { + if m.data.Sum().DataPoints().Len() > m.capacity { + m.capacity = m.data.Sum().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricBigipVirtualServerRequestCount) emit(metrics pmetric.MetricSlice) { + if m.settings.Enabled && m.data.Sum().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricBigipVirtualServerRequestCount(settings MetricSettings) metricBigipVirtualServerRequestCount { + m := metricBigipVirtualServerRequestCount{settings: settings} + if settings.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +// MetricsBuilder provides an interface for scrapers to report metrics while taking care of all the transformations +// required to produce metric representation defined in metadata and user settings. +type MetricsBuilder struct { + startTime pcommon.Timestamp // start time that will be applied to all recorded data points. + metricsCapacity int // maximum observed number of metrics per resource. + resourceCapacity int // maximum observed number of resource attributes. + metricsBuffer pmetric.Metrics // accumulates metrics data before emitting. + metricBigipNodeAvailability metricBigipNodeAvailability + metricBigipNodeConnectionCount metricBigipNodeConnectionCount + metricBigipNodeDataTransmitted metricBigipNodeDataTransmitted + metricBigipNodeEnabled metricBigipNodeEnabled + metricBigipNodePacketCount metricBigipNodePacketCount + metricBigipNodeRequestCount metricBigipNodeRequestCount + metricBigipNodeSessionCount metricBigipNodeSessionCount + metricBigipPoolAvailability metricBigipPoolAvailability + metricBigipPoolConnectionCount metricBigipPoolConnectionCount + metricBigipPoolDataTransmitted metricBigipPoolDataTransmitted + metricBigipPoolEnabled metricBigipPoolEnabled + metricBigipPoolMemberCount metricBigipPoolMemberCount + metricBigipPoolPacketCount metricBigipPoolPacketCount + metricBigipPoolRequestCount metricBigipPoolRequestCount + metricBigipPoolMemberAvailability metricBigipPoolMemberAvailability + metricBigipPoolMemberConnectionCount metricBigipPoolMemberConnectionCount + metricBigipPoolMemberDataTransmitted metricBigipPoolMemberDataTransmitted + metricBigipPoolMemberEnabled metricBigipPoolMemberEnabled + metricBigipPoolMemberPacketCount metricBigipPoolMemberPacketCount + metricBigipPoolMemberRequestCount metricBigipPoolMemberRequestCount + metricBigipPoolMemberSessionCount metricBigipPoolMemberSessionCount + metricBigipVirtualServerAvailability metricBigipVirtualServerAvailability + metricBigipVirtualServerConnectionCount metricBigipVirtualServerConnectionCount + metricBigipVirtualServerDataTransmitted metricBigipVirtualServerDataTransmitted + metricBigipVirtualServerEnabled metricBigipVirtualServerEnabled + metricBigipVirtualServerPacketCount metricBigipVirtualServerPacketCount + metricBigipVirtualServerRequestCount metricBigipVirtualServerRequestCount +} + +// metricBuilderOption applies changes to default metrics builder. +type metricBuilderOption func(*MetricsBuilder) + +// WithStartTime sets startTime on the metrics builder. +func WithStartTime(startTime pcommon.Timestamp) metricBuilderOption { + return func(mb *MetricsBuilder) { + mb.startTime = startTime + } +} + +func NewMetricsBuilder(settings MetricsSettings, options ...metricBuilderOption) *MetricsBuilder { + mb := &MetricsBuilder{ + startTime: pcommon.NewTimestampFromTime(time.Now()), + metricsBuffer: pmetric.NewMetrics(), + metricBigipNodeAvailability: newMetricBigipNodeAvailability(settings.BigipNodeAvailability), + metricBigipNodeConnectionCount: newMetricBigipNodeConnectionCount(settings.BigipNodeConnectionCount), + metricBigipNodeDataTransmitted: newMetricBigipNodeDataTransmitted(settings.BigipNodeDataTransmitted), + metricBigipNodeEnabled: newMetricBigipNodeEnabled(settings.BigipNodeEnabled), + metricBigipNodePacketCount: newMetricBigipNodePacketCount(settings.BigipNodePacketCount), + metricBigipNodeRequestCount: newMetricBigipNodeRequestCount(settings.BigipNodeRequestCount), + metricBigipNodeSessionCount: newMetricBigipNodeSessionCount(settings.BigipNodeSessionCount), + metricBigipPoolAvailability: newMetricBigipPoolAvailability(settings.BigipPoolAvailability), + metricBigipPoolConnectionCount: newMetricBigipPoolConnectionCount(settings.BigipPoolConnectionCount), + metricBigipPoolDataTransmitted: newMetricBigipPoolDataTransmitted(settings.BigipPoolDataTransmitted), + metricBigipPoolEnabled: newMetricBigipPoolEnabled(settings.BigipPoolEnabled), + metricBigipPoolMemberCount: newMetricBigipPoolMemberCount(settings.BigipPoolMemberCount), + metricBigipPoolPacketCount: newMetricBigipPoolPacketCount(settings.BigipPoolPacketCount), + metricBigipPoolRequestCount: newMetricBigipPoolRequestCount(settings.BigipPoolRequestCount), + metricBigipPoolMemberAvailability: newMetricBigipPoolMemberAvailability(settings.BigipPoolMemberAvailability), + metricBigipPoolMemberConnectionCount: newMetricBigipPoolMemberConnectionCount(settings.BigipPoolMemberConnectionCount), + metricBigipPoolMemberDataTransmitted: newMetricBigipPoolMemberDataTransmitted(settings.BigipPoolMemberDataTransmitted), + metricBigipPoolMemberEnabled: newMetricBigipPoolMemberEnabled(settings.BigipPoolMemberEnabled), + metricBigipPoolMemberPacketCount: newMetricBigipPoolMemberPacketCount(settings.BigipPoolMemberPacketCount), + metricBigipPoolMemberRequestCount: newMetricBigipPoolMemberRequestCount(settings.BigipPoolMemberRequestCount), + metricBigipPoolMemberSessionCount: newMetricBigipPoolMemberSessionCount(settings.BigipPoolMemberSessionCount), + metricBigipVirtualServerAvailability: newMetricBigipVirtualServerAvailability(settings.BigipVirtualServerAvailability), + metricBigipVirtualServerConnectionCount: newMetricBigipVirtualServerConnectionCount(settings.BigipVirtualServerConnectionCount), + metricBigipVirtualServerDataTransmitted: newMetricBigipVirtualServerDataTransmitted(settings.BigipVirtualServerDataTransmitted), + metricBigipVirtualServerEnabled: newMetricBigipVirtualServerEnabled(settings.BigipVirtualServerEnabled), + metricBigipVirtualServerPacketCount: newMetricBigipVirtualServerPacketCount(settings.BigipVirtualServerPacketCount), + metricBigipVirtualServerRequestCount: newMetricBigipVirtualServerRequestCount(settings.BigipVirtualServerRequestCount), + } + for _, op := range options { + op(mb) + } + return mb +} + +// updateCapacity updates max length of metrics and resource attributes that will be used for the slice capacity. +func (mb *MetricsBuilder) updateCapacity(rm pmetric.ResourceMetrics) { + if mb.metricsCapacity < rm.ScopeMetrics().At(0).Metrics().Len() { + mb.metricsCapacity = rm.ScopeMetrics().At(0).Metrics().Len() + } + if mb.resourceCapacity < rm.Resource().Attributes().Len() { + mb.resourceCapacity = rm.Resource().Attributes().Len() + } +} + +// ResourceMetricsOption applies changes to provided resource metrics. +type ResourceMetricsOption func(pmetric.ResourceMetrics) + +// WithBigipNodeIPAddress sets provided value as "bigip.node.ip_address" attribute for current resource. +func WithBigipNodeIPAddress(val string) ResourceMetricsOption { + return func(rm pmetric.ResourceMetrics) { + rm.Resource().Attributes().UpsertString("bigip.node.ip_address", val) + } +} + +// WithBigipNodeName sets provided value as "bigip.node.name" attribute for current resource. +func WithBigipNodeName(val string) ResourceMetricsOption { + return func(rm pmetric.ResourceMetrics) { + rm.Resource().Attributes().UpsertString("bigip.node.name", val) + } +} + +// WithBigipPoolName sets provided value as "bigip.pool.name" attribute for current resource. +func WithBigipPoolName(val string) ResourceMetricsOption { + return func(rm pmetric.ResourceMetrics) { + rm.Resource().Attributes().UpsertString("bigip.pool.name", val) + } +} + +// WithBigipPoolMemberIPAddress sets provided value as "bigip.pool_member.ip_address" attribute for current resource. +func WithBigipPoolMemberIPAddress(val string) ResourceMetricsOption { + return func(rm pmetric.ResourceMetrics) { + rm.Resource().Attributes().UpsertString("bigip.pool_member.ip_address", val) + } +} + +// WithBigipPoolMemberName sets provided value as "bigip.pool_member.name" attribute for current resource. +func WithBigipPoolMemberName(val string) ResourceMetricsOption { + return func(rm pmetric.ResourceMetrics) { + rm.Resource().Attributes().UpsertString("bigip.pool_member.name", val) + } +} + +// WithBigipVirtualServerDestination sets provided value as "bigip.virtual_server.destination" attribute for current resource. +func WithBigipVirtualServerDestination(val string) ResourceMetricsOption { + return func(rm pmetric.ResourceMetrics) { + rm.Resource().Attributes().UpsertString("bigip.virtual_server.destination", val) + } +} + +// WithBigipVirtualServerName sets provided value as "bigip.virtual_server.name" attribute for current resource. +func WithBigipVirtualServerName(val string) ResourceMetricsOption { + return func(rm pmetric.ResourceMetrics) { + rm.Resource().Attributes().UpsertString("bigip.virtual_server.name", val) + } +} + +// WithStartTimeOverride overrides start time for all the resource metrics data points. +// This option should be only used if different start time has to be set on metrics coming from different resources. +func WithStartTimeOverride(start pcommon.Timestamp) ResourceMetricsOption { + return func(rm pmetric.ResourceMetrics) { + metrics := rm.ScopeMetrics().At(0).Metrics() + for i := 0; i < metrics.Len(); i++ { + dps := pmetric.NewNumberDataPointSlice() + switch metrics.At(i).DataType() { + case pmetric.MetricDataTypeGauge: + dps = metrics.At(i).Gauge().DataPoints() + case pmetric.MetricDataTypeSum: + dps = metrics.At(i).Sum().DataPoints() + } + for j := 0; j < dps.Len(); j++ { + dps.At(j).SetStartTimestamp(start) + } + } + } +} + +// EmitForResource saves all the generated metrics under a new resource and updates the internal state to be ready for +// recording another set of data points as part of another resource. This function can be helpful when one scraper +// needs to emit metrics from several resources. Otherwise calling this function is not required, +// just `Emit` function can be called instead. +// Resource attributes should be provided as ResourceMetricsOption arguments. +func (mb *MetricsBuilder) EmitForResource(rmo ...ResourceMetricsOption) { + rm := pmetric.NewResourceMetrics() + rm.Resource().Attributes().EnsureCapacity(mb.resourceCapacity) + ils := rm.ScopeMetrics().AppendEmpty() + ils.Scope().SetName("otelcol/bigipreceiver") + ils.Metrics().EnsureCapacity(mb.metricsCapacity) + mb.metricBigipNodeAvailability.emit(ils.Metrics()) + mb.metricBigipNodeConnectionCount.emit(ils.Metrics()) + mb.metricBigipNodeDataTransmitted.emit(ils.Metrics()) + mb.metricBigipNodeEnabled.emit(ils.Metrics()) + mb.metricBigipNodePacketCount.emit(ils.Metrics()) + mb.metricBigipNodeRequestCount.emit(ils.Metrics()) + mb.metricBigipNodeSessionCount.emit(ils.Metrics()) + mb.metricBigipPoolAvailability.emit(ils.Metrics()) + mb.metricBigipPoolConnectionCount.emit(ils.Metrics()) + mb.metricBigipPoolDataTransmitted.emit(ils.Metrics()) + mb.metricBigipPoolEnabled.emit(ils.Metrics()) + mb.metricBigipPoolMemberCount.emit(ils.Metrics()) + mb.metricBigipPoolPacketCount.emit(ils.Metrics()) + mb.metricBigipPoolRequestCount.emit(ils.Metrics()) + mb.metricBigipPoolMemberAvailability.emit(ils.Metrics()) + mb.metricBigipPoolMemberConnectionCount.emit(ils.Metrics()) + mb.metricBigipPoolMemberDataTransmitted.emit(ils.Metrics()) + mb.metricBigipPoolMemberEnabled.emit(ils.Metrics()) + mb.metricBigipPoolMemberPacketCount.emit(ils.Metrics()) + mb.metricBigipPoolMemberRequestCount.emit(ils.Metrics()) + mb.metricBigipPoolMemberSessionCount.emit(ils.Metrics()) + mb.metricBigipVirtualServerAvailability.emit(ils.Metrics()) + mb.metricBigipVirtualServerConnectionCount.emit(ils.Metrics()) + mb.metricBigipVirtualServerDataTransmitted.emit(ils.Metrics()) + mb.metricBigipVirtualServerEnabled.emit(ils.Metrics()) + mb.metricBigipVirtualServerPacketCount.emit(ils.Metrics()) + mb.metricBigipVirtualServerRequestCount.emit(ils.Metrics()) + for _, op := range rmo { + op(rm) + } + if ils.Metrics().Len() > 0 { + mb.updateCapacity(rm) + rm.MoveTo(mb.metricsBuffer.ResourceMetrics().AppendEmpty()) + } +} + +// Emit returns all the metrics accumulated by the metrics builder and updates the internal state to be ready for +// recording another set of metrics. This function will be responsible for applying all the transformations required to +// produce metric representation defined in metadata and user settings, e.g. delta or cumulative. +func (mb *MetricsBuilder) Emit(rmo ...ResourceMetricsOption) pmetric.Metrics { + mb.EmitForResource(rmo...) + metrics := pmetric.NewMetrics() + mb.metricsBuffer.MoveTo(metrics) + return metrics +} + +// RecordBigipNodeAvailabilityDataPoint adds a data point to bigip.node.availability metric. +func (mb *MetricsBuilder) RecordBigipNodeAvailabilityDataPoint(ts pcommon.Timestamp, val int64, availabilityStatusAttributeValue AttributeAvailabilityStatus) { + mb.metricBigipNodeAvailability.recordDataPoint(mb.startTime, ts, val, availabilityStatusAttributeValue.String()) +} + +// RecordBigipNodeConnectionCountDataPoint adds a data point to bigip.node.connection.count metric. +func (mb *MetricsBuilder) RecordBigipNodeConnectionCountDataPoint(ts pcommon.Timestamp, val int64) { + mb.metricBigipNodeConnectionCount.recordDataPoint(mb.startTime, ts, val) +} + +// RecordBigipNodeDataTransmittedDataPoint adds a data point to bigip.node.data.transmitted metric. +func (mb *MetricsBuilder) RecordBigipNodeDataTransmittedDataPoint(ts pcommon.Timestamp, val int64, directionAttributeValue AttributeDirection) { + mb.metricBigipNodeDataTransmitted.recordDataPoint(mb.startTime, ts, val, directionAttributeValue.String()) +} + +// RecordBigipNodeEnabledDataPoint adds a data point to bigip.node.enabled metric. +func (mb *MetricsBuilder) RecordBigipNodeEnabledDataPoint(ts pcommon.Timestamp, val int64, enabledStatusAttributeValue AttributeEnabledStatus) { + mb.metricBigipNodeEnabled.recordDataPoint(mb.startTime, ts, val, enabledStatusAttributeValue.String()) +} + +// RecordBigipNodePacketCountDataPoint adds a data point to bigip.node.packet.count metric. +func (mb *MetricsBuilder) RecordBigipNodePacketCountDataPoint(ts pcommon.Timestamp, val int64, directionAttributeValue AttributeDirection) { + mb.metricBigipNodePacketCount.recordDataPoint(mb.startTime, ts, val, directionAttributeValue.String()) +} + +// RecordBigipNodeRequestCountDataPoint adds a data point to bigip.node.request.count metric. +func (mb *MetricsBuilder) RecordBigipNodeRequestCountDataPoint(ts pcommon.Timestamp, val int64) { + mb.metricBigipNodeRequestCount.recordDataPoint(mb.startTime, ts, val) +} + +// RecordBigipNodeSessionCountDataPoint adds a data point to bigip.node.session.count metric. +func (mb *MetricsBuilder) RecordBigipNodeSessionCountDataPoint(ts pcommon.Timestamp, val int64) { + mb.metricBigipNodeSessionCount.recordDataPoint(mb.startTime, ts, val) +} + +// RecordBigipPoolAvailabilityDataPoint adds a data point to bigip.pool.availability metric. +func (mb *MetricsBuilder) RecordBigipPoolAvailabilityDataPoint(ts pcommon.Timestamp, val int64, availabilityStatusAttributeValue AttributeAvailabilityStatus) { + mb.metricBigipPoolAvailability.recordDataPoint(mb.startTime, ts, val, availabilityStatusAttributeValue.String()) +} + +// RecordBigipPoolConnectionCountDataPoint adds a data point to bigip.pool.connection.count metric. +func (mb *MetricsBuilder) RecordBigipPoolConnectionCountDataPoint(ts pcommon.Timestamp, val int64) { + mb.metricBigipPoolConnectionCount.recordDataPoint(mb.startTime, ts, val) +} + +// RecordBigipPoolDataTransmittedDataPoint adds a data point to bigip.pool.data.transmitted metric. +func (mb *MetricsBuilder) RecordBigipPoolDataTransmittedDataPoint(ts pcommon.Timestamp, val int64, directionAttributeValue AttributeDirection) { + mb.metricBigipPoolDataTransmitted.recordDataPoint(mb.startTime, ts, val, directionAttributeValue.String()) +} + +// RecordBigipPoolEnabledDataPoint adds a data point to bigip.pool.enabled metric. +func (mb *MetricsBuilder) RecordBigipPoolEnabledDataPoint(ts pcommon.Timestamp, val int64, enabledStatusAttributeValue AttributeEnabledStatus) { + mb.metricBigipPoolEnabled.recordDataPoint(mb.startTime, ts, val, enabledStatusAttributeValue.String()) +} + +// RecordBigipPoolMemberCountDataPoint adds a data point to bigip.pool.member.count metric. +func (mb *MetricsBuilder) RecordBigipPoolMemberCountDataPoint(ts pcommon.Timestamp, val int64, activeStatusAttributeValue AttributeActiveStatus) { + mb.metricBigipPoolMemberCount.recordDataPoint(mb.startTime, ts, val, activeStatusAttributeValue.String()) +} + +// RecordBigipPoolPacketCountDataPoint adds a data point to bigip.pool.packet.count metric. +func (mb *MetricsBuilder) RecordBigipPoolPacketCountDataPoint(ts pcommon.Timestamp, val int64, directionAttributeValue AttributeDirection) { + mb.metricBigipPoolPacketCount.recordDataPoint(mb.startTime, ts, val, directionAttributeValue.String()) +} + +// RecordBigipPoolRequestCountDataPoint adds a data point to bigip.pool.request.count metric. +func (mb *MetricsBuilder) RecordBigipPoolRequestCountDataPoint(ts pcommon.Timestamp, val int64) { + mb.metricBigipPoolRequestCount.recordDataPoint(mb.startTime, ts, val) +} + +// RecordBigipPoolMemberAvailabilityDataPoint adds a data point to bigip.pool_member.availability metric. +func (mb *MetricsBuilder) RecordBigipPoolMemberAvailabilityDataPoint(ts pcommon.Timestamp, val int64, availabilityStatusAttributeValue AttributeAvailabilityStatus) { + mb.metricBigipPoolMemberAvailability.recordDataPoint(mb.startTime, ts, val, availabilityStatusAttributeValue.String()) +} + +// RecordBigipPoolMemberConnectionCountDataPoint adds a data point to bigip.pool_member.connection.count metric. +func (mb *MetricsBuilder) RecordBigipPoolMemberConnectionCountDataPoint(ts pcommon.Timestamp, val int64) { + mb.metricBigipPoolMemberConnectionCount.recordDataPoint(mb.startTime, ts, val) +} + +// RecordBigipPoolMemberDataTransmittedDataPoint adds a data point to bigip.pool_member.data.transmitted metric. +func (mb *MetricsBuilder) RecordBigipPoolMemberDataTransmittedDataPoint(ts pcommon.Timestamp, val int64, directionAttributeValue AttributeDirection) { + mb.metricBigipPoolMemberDataTransmitted.recordDataPoint(mb.startTime, ts, val, directionAttributeValue.String()) +} + +// RecordBigipPoolMemberEnabledDataPoint adds a data point to bigip.pool_member.enabled metric. +func (mb *MetricsBuilder) RecordBigipPoolMemberEnabledDataPoint(ts pcommon.Timestamp, val int64, enabledStatusAttributeValue AttributeEnabledStatus) { + mb.metricBigipPoolMemberEnabled.recordDataPoint(mb.startTime, ts, val, enabledStatusAttributeValue.String()) +} + +// RecordBigipPoolMemberPacketCountDataPoint adds a data point to bigip.pool_member.packet.count metric. +func (mb *MetricsBuilder) RecordBigipPoolMemberPacketCountDataPoint(ts pcommon.Timestamp, val int64, directionAttributeValue AttributeDirection) { + mb.metricBigipPoolMemberPacketCount.recordDataPoint(mb.startTime, ts, val, directionAttributeValue.String()) +} + +// RecordBigipPoolMemberRequestCountDataPoint adds a data point to bigip.pool_member.request.count metric. +func (mb *MetricsBuilder) RecordBigipPoolMemberRequestCountDataPoint(ts pcommon.Timestamp, val int64) { + mb.metricBigipPoolMemberRequestCount.recordDataPoint(mb.startTime, ts, val) +} + +// RecordBigipPoolMemberSessionCountDataPoint adds a data point to bigip.pool_member.session.count metric. +func (mb *MetricsBuilder) RecordBigipPoolMemberSessionCountDataPoint(ts pcommon.Timestamp, val int64) { + mb.metricBigipPoolMemberSessionCount.recordDataPoint(mb.startTime, ts, val) +} + +// RecordBigipVirtualServerAvailabilityDataPoint adds a data point to bigip.virtual_server.availability metric. +func (mb *MetricsBuilder) RecordBigipVirtualServerAvailabilityDataPoint(ts pcommon.Timestamp, val int64, availabilityStatusAttributeValue AttributeAvailabilityStatus) { + mb.metricBigipVirtualServerAvailability.recordDataPoint(mb.startTime, ts, val, availabilityStatusAttributeValue.String()) +} + +// RecordBigipVirtualServerConnectionCountDataPoint adds a data point to bigip.virtual_server.connection.count metric. +func (mb *MetricsBuilder) RecordBigipVirtualServerConnectionCountDataPoint(ts pcommon.Timestamp, val int64) { + mb.metricBigipVirtualServerConnectionCount.recordDataPoint(mb.startTime, ts, val) +} + +// RecordBigipVirtualServerDataTransmittedDataPoint adds a data point to bigip.virtual_server.data.transmitted metric. +func (mb *MetricsBuilder) RecordBigipVirtualServerDataTransmittedDataPoint(ts pcommon.Timestamp, val int64, directionAttributeValue AttributeDirection) { + mb.metricBigipVirtualServerDataTransmitted.recordDataPoint(mb.startTime, ts, val, directionAttributeValue.String()) +} + +// RecordBigipVirtualServerEnabledDataPoint adds a data point to bigip.virtual_server.enabled metric. +func (mb *MetricsBuilder) RecordBigipVirtualServerEnabledDataPoint(ts pcommon.Timestamp, val int64, enabledStatusAttributeValue AttributeEnabledStatus) { + mb.metricBigipVirtualServerEnabled.recordDataPoint(mb.startTime, ts, val, enabledStatusAttributeValue.String()) +} + +// RecordBigipVirtualServerPacketCountDataPoint adds a data point to bigip.virtual_server.packet.count metric. +func (mb *MetricsBuilder) RecordBigipVirtualServerPacketCountDataPoint(ts pcommon.Timestamp, val int64, directionAttributeValue AttributeDirection) { + mb.metricBigipVirtualServerPacketCount.recordDataPoint(mb.startTime, ts, val, directionAttributeValue.String()) +} + +// RecordBigipVirtualServerRequestCountDataPoint adds a data point to bigip.virtual_server.request.count metric. +func (mb *MetricsBuilder) RecordBigipVirtualServerRequestCountDataPoint(ts pcommon.Timestamp, val int64) { + mb.metricBigipVirtualServerRequestCount.recordDataPoint(mb.startTime, ts, val) +} + +// Reset resets metrics builder to its initial state. It should be used when external metrics source is restarted, +// and metrics builder should update its startTime and reset it's internal state accordingly. +func (mb *MetricsBuilder) Reset(options ...metricBuilderOption) { + mb.startTime = pcommon.NewTimestampFromTime(time.Now()) + for _, op := range options { + op(mb) + } +} diff --git a/receiver/bigipreceiver/internal/mocks/client.go b/receiver/bigipreceiver/internal/mocks/client.go new file mode 100644 index 000000000000..c1446a33ea08 --- /dev/null +++ b/receiver/bigipreceiver/internal/mocks/client.go @@ -0,0 +1,136 @@ +// Code generated by mockery v2.10.0. DO NOT EDIT. + +package mocks + +import ( + context "context" + + mock "github.com/stretchr/testify/mock" + + models "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver/internal/models" +) + +// client is an autogenerated mock type for the client type +type MockClient struct { + mock.Mock +} + +// GetNewToken provides a mock function with given fields: ctx +func (_m *MockClient) GetNewToken(ctx context.Context) error { + ret := _m.Called(ctx) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context) error); ok { + r0 = rf(ctx) + } else { + r0 = ret.Error(0) + } + + return r0 +} + +// GetNodes provides a mock function with given fields: ctx +func (_m *MockClient) GetNodes(ctx context.Context) (*models.Nodes, error) { + ret := _m.Called(ctx) + + var r0 *models.Nodes + if rf, ok := ret.Get(0).(func(context.Context) *models.Nodes); ok { + r0 = rf(ctx) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*models.Nodes) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = rf(ctx) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetPoolMembers provides a mock function with given fields: ctx, pools +func (_m *MockClient) GetPoolMembers(ctx context.Context, pools *models.Pools) (*models.PoolMembers, error) { + ret := _m.Called(ctx, pools) + + var r0 *models.PoolMembers + if rf, ok := ret.Get(0).(func(context.Context, *models.Pools) *models.PoolMembers); ok { + r0 = rf(ctx, pools) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*models.PoolMembers) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context, *models.Pools) error); ok { + r1 = rf(ctx, pools) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetPools provides a mock function with given fields: ctx +func (_m *MockClient) GetPools(ctx context.Context) (*models.Pools, error) { + ret := _m.Called(ctx) + + var r0 *models.Pools + if rf, ok := ret.Get(0).(func(context.Context) *models.Pools); ok { + r0 = rf(ctx) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*models.Pools) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = rf(ctx) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetVirtualServers provides a mock function with given fields: ctx +func (_m *MockClient) GetVirtualServers(ctx context.Context) (*models.VirtualServers, error) { + ret := _m.Called(ctx) + + var r0 *models.VirtualServers + if rf, ok := ret.Get(0).(func(context.Context) *models.VirtualServers); ok { + r0 = rf(ctx) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*models.VirtualServers) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(context.Context) error); ok { + r1 = rf(ctx) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// HasToken provides a mock function with given fields: +func (_m *MockClient) HasToken() bool { + ret := _m.Called() + + var r0 bool + if rf, ok := ret.Get(0).(func() bool); ok { + r0 = rf() + } else { + r0 = ret.Get(0).(bool) + } + + return r0 +} diff --git a/receiver/bigipreceiver/internal/models/nodes.go b/receiver/bigipreceiver/internal/models/nodes.go new file mode 100644 index 000000000000..86613fa92c28 --- /dev/null +++ b/receiver/bigipreceiver/internal/models/nodes.go @@ -0,0 +1,61 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package models // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver/internal/models" + +// Nodes represents the top level json returned by the node/stats endpoint +type Nodes struct { + Entries map[string]NodeStats `json:"entries"` +} + +// NodeStats represents the statistics returned for a single node +type NodeStats struct { + NestedStats struct { + Entries struct { + Name struct { + Description string `json:"description,omitempty"` + } `json:"tmName,omitempty"` + IPAddress struct { + Description string `json:"description,omitempty"` + } `json:"addr,omitempty"` + ServersideBitsIn struct { + Value int64 `json:"value"` + } `json:"serverside.bitsIn,omitempty"` + ServersideBitsOut struct { + Value int64 `json:"value"` + } `json:"serverside.bitsOut,omitempty"` + ServersideCurConns struct { + Value int64 `json:"value"` + } `json:"serverside.curConns,omitempty"` + ServersidePktsIn struct { + Value int64 `json:"value"` + } `json:"serverside.pktsIn,omitempty"` + ServersidePktsOut struct { + Value int64 `json:"value"` + } `json:"serverside.pktsOut,omitempty"` + AvailabilityState struct { + Description string `json:"description,omitempty"` + } `json:"status.availabilityState,omitempty"` + EnabledState struct { + Description string `json:"description,omitempty"` + } `json:"status.enabledState,omitempty"` + TotalRequests struct { + Value int64 `json:"value"` + } `json:"totRequests,omitempty"` + CurSessions struct { + Value int64 `json:"value"` + } `json:"curSessions,omitempty"` + } `json:"entries,omitempty"` + } `json:"nestedStats,omitempty"` +} diff --git a/receiver/bigipreceiver/internal/models/pool_members.go b/receiver/bigipreceiver/internal/models/pool_members.go new file mode 100644 index 000000000000..63bb6b69b824 --- /dev/null +++ b/receiver/bigipreceiver/internal/models/pool_members.go @@ -0,0 +1,67 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package models // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver/internal/models" + +// PoolMembers represents the top level json returned by the members/stats endpoint +type PoolMembers struct { + Entries map[string]PoolMemberStats `json:"entries"` +} + +// PoolMemberStats represents the statistics returned for a single pool member +type PoolMemberStats struct { + NestedStats struct { + Entries struct { + Name struct { + Description string `json:"description,omitempty"` + } `json:"nodeName,omitempty"` + PoolName struct { + Description string `json:"description,omitempty"` + } `json:"poolName,omitempty"` + IPAddress struct { + Description string `json:"description,omitempty"` + } `json:"addr,omitempty"` + Port struct { + Value int64 `json:"value,omitempty"` + } `json:"port,omitempty"` + ServersideBitsIn struct { + Value int64 `json:"value"` + } `json:"serverside.bitsIn,omitempty"` + ServersideBitsOut struct { + Value int64 `json:"value"` + } `json:"serverside.bitsOut,omitempty"` + ServersideCurConns struct { + Value int64 `json:"value"` + } `json:"serverside.curConns,omitempty"` + ServersidePktsIn struct { + Value int64 `json:"value"` + } `json:"serverside.pktsIn,omitempty"` + ServersidePktsOut struct { + Value int64 `json:"value"` + } `json:"serverside.pktsOut,omitempty"` + AvailabilityState struct { + Description string `json:"description,omitempty"` + } `json:"status.availabilityState,omitempty"` + EnabledState struct { + Description string `json:"description,omitempty"` + } `json:"status.enabledState,omitempty"` + TotalRequests struct { + Value int64 `json:"value"` + } `json:"totRequests,omitempty"` + CurSessions struct { + Value int64 `json:"value"` + } `json:"curSessions,omitempty"` + } `json:"entries,omitempty"` + } `json:"nestedStats,omitempty"` +} diff --git a/receiver/bigipreceiver/internal/models/pools.go b/receiver/bigipreceiver/internal/models/pools.go new file mode 100644 index 000000000000..647785870938 --- /dev/null +++ b/receiver/bigipreceiver/internal/models/pools.go @@ -0,0 +1,64 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package models // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver/internal/models" + +// Pools represents the top level json returned by the pool/stats endpoint +type Pools struct { + Entries map[string]PoolStats `json:"entries"` +} + +// PoolStats represents the statistics returned for a single pool +type PoolStats struct { + NestedStats struct { + Entries struct { + Name struct { + Description string `json:"description,omitempty"` + } `json:"tmName,omitempty"` + ServersideBitsIn struct { + Value int64 `json:"value"` + } `json:"serverside.bitsIn,omitempty"` + ServersideBitsOut struct { + Value int64 `json:"value"` + } `json:"serverside.bitsOut,omitempty"` + ServersideCurConns struct { + Value int64 `json:"value"` + } `json:"serverside.curConns,omitempty"` + ServersidePktsIn struct { + Value int64 `json:"value"` + } `json:"serverside.pktsIn,omitempty"` + ServersidePktsOut struct { + Value int64 `json:"value"` + } `json:"serverside.pktsOut,omitempty"` + AvailabilityState struct { + Description string `json:"description,omitempty"` + } `json:"status.availabilityState,omitempty"` + EnabledState struct { + Description string `json:"description,omitempty"` + } `json:"status.enabledState,omitempty"` + TotalRequests struct { + Value int64 `json:"value"` + } `json:"totRequests,omitempty"` + TotalMemberCount struct { + Value int64 `json:"value"` + } `json:"memberCnt,omitempty"` + ActiveMemberCount struct { + Value int64 `json:"value"` + } `json:"activeMemberCnt,omitempty"` + AvailableMemberCount struct { + Value int64 `json:"value"` + } `json:"availableMemberCnt,omitempty"` + } `json:"entries,omitempty"` + } `json:"nestedStats,omitempty"` +} diff --git a/receiver/bigipreceiver/internal/models/tokens.go b/receiver/bigipreceiver/internal/models/tokens.go new file mode 100644 index 000000000000..b2af5f98b074 --- /dev/null +++ b/receiver/bigipreceiver/internal/models/tokens.go @@ -0,0 +1,25 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package models // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver/internal/models" + +// TokenDetails represents the top level json returned by the authn/login endpoint +type TokenDetails struct { + Token Token `json:"token"` +} + +// Token represents where the actual token data is stored +type Token struct { + Token string `json:"token,omitempty"` +} diff --git a/receiver/bigipreceiver/internal/models/virtual_servers.go b/receiver/bigipreceiver/internal/models/virtual_servers.go new file mode 100644 index 000000000000..09935ca3dafc --- /dev/null +++ b/receiver/bigipreceiver/internal/models/virtual_servers.go @@ -0,0 +1,73 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package models // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver/internal/models" + +// VirtualServersDetails represents the top level json returned by the /virtual endpoint +type VirtualServersDetails struct { + Items []VirtualServerProperties `json:"items"` +} + +// VirtualServerProperties represents the properties returned for a single virtual server +type VirtualServerProperties struct { + SelfLink string `json:"selfLink"` + PoolName string `json:"pool"` +} + +// VirtualServers represents the top level json returned by the virtual/stats endpoint +type VirtualServers struct { + Entries map[string]VirtualServerStats `json:"entries"` +} + +// VirtualServerStats represents the statistics returned for a single virtual server +type VirtualServerStats struct { + NestedStats struct { + Entries struct { + Name struct { + Description string `json:"description,omitempty"` + } `json:"tmName,omitempty"` + // PoolName is not actually in the /stats response and will be pulled from the normal /virtual response + PoolName struct { + Description string `json:"description,omitempty"` + } `json:"poolName,omitempty"` + Destination struct { + Description string `json:"description,omitempty"` + } `json:"destination,omitempty"` + ClientsideBitsIn struct { + Value int64 `json:"value"` + } `json:"clientside.bitsIn,omitempty"` + ClientsideBitsOut struct { + Value int64 `json:"value"` + } `json:"clientside.bitsOut,omitempty"` + ClientsideCurConns struct { + Value int64 `json:"value"` + } `json:"clientside.curConns,omitempty"` + ClientsidePktsIn struct { + Value int64 `json:"value"` + } `json:"clientside.pktsIn,omitempty"` + ClientsidePktsOut struct { + Value int64 `json:"value"` + } `json:"clientside.pktsOut,omitempty"` + AvailabilityState struct { + Description string `json:"description,omitempty"` + } `json:"status.availabilityState,omitempty"` + EnabledState struct { + Description string `json:"description,omitempty"` + } `json:"status.enabledState,omitempty"` + TotalRequests struct { + Value int64 `json:"value"` + } `json:"totRequests,omitempty"` + } `json:"entries,omitempty"` + } `json:"nestedStats,omitempty"` +} diff --git a/receiver/bigipreceiver/metadata.yaml b/receiver/bigipreceiver/metadata.yaml new file mode 100644 index 000000000000..c7470daa0609 --- /dev/null +++ b/receiver/bigipreceiver/metadata.yaml @@ -0,0 +1,269 @@ +name: bigipreceiver + +resource_attributes: + bigip.virtual_server.name: + description: The name of the Big-IP Virtual Server. + type: string + bigip.virtual_server.destination: + description: The destination for the Big-IP Virtual Server. + type: string + bigip.pool.name: + description: The name of the Big-IP Pool. + type: string + bigip.pool_member.name: + description: The name of the Big-IP Pool Member. + type: string + bigip.pool_member.ip_address: + description: The IP Address of the Big-IP Pool Member. + type: string + bigip.node.name: + description: The name of the Big-IP Node. + type: string + bigip.node.ip_address: + description: The IP Address of the Big-IP Node. + type: string + +attributes: + direction: + value: direction + description: The direction of data. + enum: + - sent + - received + availability.status: + value: status + description: The availability status. + enum: + - offline + - unknown + - available + enabled.status: + value: status + description: The enabled status. + enum: + - disabled + - enabled + active.status: + value: status + description: The active status. + enum: + - active + - inactive +metrics: + bigip.virtual_server.data.transmitted: + description: Amount of data transmitted to and from the virtual server. + unit: "By" + sum: + monotonic: true + aggregation: cumulative + value_type: int + attributes: [direction] + enabled: true + bigip.virtual_server.connection.count: + description: Current number of connections to the virtual server. + unit: "{connections}" + sum: + monotonic: false + aggregation: cumulative + value_type: int + enabled: true + bigip.virtual_server.request.count: + description: Number of requests to the virtual server. + unit: "{requests}" + sum: + monotonic: true + aggregation: cumulative + value_type: int + enabled: true + bigip.virtual_server.packet.count: + description: Number of packets transmitted to and from the virtual server. + unit: "{packets}" + sum: + monotonic: true + aggregation: cumulative + value_type: int + attributes: [direction] + enabled: true + bigip.virtual_server.availability: + description: Availability of the virtual server. + unit: 1 + gauge: + value_type: int + attributes: [availability.status] + enabled: true + bigip.virtual_server.enabled: + description: Enabled state of of the virtual server. + unit: 1 + gauge: + value_type: int + attributes: [enabled.status] + enabled: true + bigip.pool.data.transmitted: + description: Amount of data transmitted to and from the pool. + unit: "By" + sum: + monotonic: true + aggregation: cumulative + value_type: int + attributes: [direction] + enabled: true + bigip.pool.connection.count: + description: Current number of connections to the pool. + unit: "{connections}" + sum: + monotonic: false + aggregation: cumulative + value_type: int + enabled: true + bigip.pool.request.count: + description: Number of requests to the pool. + unit: "{requests}" + sum: + monotonic: true + aggregation: cumulative + value_type: int + enabled: true + bigip.pool.packet.count: + description: Number of packets transmitted to and from the pool. + unit: "{packets}" + sum: + monotonic: true + aggregation: cumulative + value_type: int + attributes: [direction] + enabled: true + bigip.pool.member.count: + description: Total number of pool members. + unit: "{members}" + sum: + monotonic: false + aggregation: cumulative + value_type: int + attributes: [active.status] + enabled: true + bigip.pool.availability: + description: Availability of the pool. + unit: 1 + gauge: + value_type: int + attributes: [availability.status] + enabled: true + bigip.pool.enabled: + description: Enabled state of of the pool. + unit: 1 + gauge: + value_type: int + attributes: [enabled.status] + enabled: true + bigip.pool_member.data.transmitted: + description: Amount of data transmitted to and from the pool member. + unit: "By" + sum: + monotonic: true + aggregation: cumulative + value_type: int + attributes: [direction] + enabled: true + bigip.pool_member.connection.count: + description: Current number of connections to the pool member. + unit: "{connections}" + sum: + monotonic: false + aggregation: cumulative + value_type: int + enabled: true + bigip.pool_member.request.count: + description: Number of requests to the pool member. + unit: "{requests}" + sum: + monotonic: true + aggregation: cumulative + value_type: int + enabled: true + bigip.pool_member.packet.count: + description: Number of packets transmitted to and from the pool member. + unit: "{packets}" + sum: + monotonic: true + aggregation: cumulative + value_type: int + attributes: [direction] + enabled: true + bigip.pool_member.session.count: + description: Current number of sessions for the pool member. + unit: "{sessions}" + sum: + monotonic: false + aggregation: cumulative + value_type: int + enabled: true + bigip.pool_member.availability: + description: Availability of the pool member. + unit: 1 + gauge: + value_type: int + attributes: [availability.status] + enabled: true + bigip.pool_member.enabled: + description: Enabled state of of the pool member. + unit: 1 + gauge: + value_type: int + attributes: [enabled.status] + enabled: true + bigip.node.data.transmitted: + description: Amount of data transmitted to and from the node. + unit: "By" + sum: + monotonic: true + aggregation: cumulative + value_type: int + attributes: [direction] + enabled: true + bigip.node.connection.count: + description: Current number of connections to the node. + unit: "{connections}" + sum: + monotonic: false + aggregation: cumulative + value_type: int + enabled: true + bigip.node.request.count: + description: Number of requests to the node. + unit: "{requests}" + sum: + monotonic: true + aggregation: cumulative + value_type: int + enabled: true + bigip.node.packet.count: + description: Number of packets transmitted to and from the node. + unit: "{packets}" + sum: + monotonic: true + aggregation: cumulative + value_type: int + attributes: [direction] + enabled: true + bigip.node.session.count: + description: Current number of sessions for the node. + unit: "{sessions}" + sum: + monotonic: false + aggregation: cumulative + value_type: int + enabled: true + bigip.node.availability: + description: Availability of the node. + unit: 1 + gauge: + value_type: int + attributes: [availability.status] + enabled: true + bigip.node.enabled: + description: Enabled state of of the node. + unit: 1 + gauge: + value_type: int + attributes: [enabled.status] + enabled: true diff --git a/receiver/bigipreceiver/scraper.go b/receiver/bigipreceiver/scraper.go new file mode 100644 index 000000000000..f299a6939763 --- /dev/null +++ b/receiver/bigipreceiver/scraper.go @@ -0,0 +1,299 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package bigipreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver" + +import ( + "context" + "errors" + "fmt" + "strings" + "time" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/receiver/scrapererror" + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver/internal/metadata" + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver/internal/models" +) + +// custom errors +var ( + errClientNotInit = errors.New("client not initialized") + errScrapedNoMetrics = errors.New("failed to scrape any metrics") +) + +// bigipScraper handles scraping of Big-IP metrics +type bigipScraper struct { + client client + logger *zap.Logger + cfg *Config + settings component.TelemetrySettings + mb *metadata.MetricsBuilder +} + +// newScraper creates an initialized bigipScraper +func newScraper(logger *zap.Logger, cfg *Config, settings component.TelemetrySettings) *bigipScraper { + return &bigipScraper{ + logger: logger, + cfg: cfg, + settings: settings, + mb: metadata.NewMetricsBuilder(cfg.Metrics), + } +} + +// start initializes a new big-ip client for the scraper +func (s *bigipScraper) start(_ context.Context, host component.Host) (err error) { + s.client, err = newClient(s.cfg, host, s.settings, s.logger) + return +} + +// scrape collects and creates OTEL metrics from a Big-IP environment +func (s *bigipScraper) scrape(ctx context.Context) (pmetric.Metrics, error) { + now := pcommon.NewTimestampFromTime(time.Now()) + + // validate we don't attempt to scrape without initializing the client + if s.client == nil { + return pmetric.NewMetrics(), errClientNotInit + } + + collectedMetrics := false + + // initialize auth token + err := s.client.GetNewToken(ctx) + if err != nil { + return pmetric.NewMetrics(), err + } + + var scrapeErrors scrapererror.ScrapeErrors + // scrape metrics for virtual servers + virtualServers, err := s.client.GetVirtualServers(ctx) + if err != nil { + scrapeErrors.AddPartial(1, err) + s.logger.Warn("Failed to scrape virtual server metrics", zap.Error(err)) + } else { + collectedMetrics = true + for key := range virtualServers.Entries { + virtualServerStats := virtualServers.Entries[key] + s.collectVirtualServers(&virtualServerStats, now) + } + } + + // scrape metrics for pools + pools, err := s.client.GetPools(ctx) + if err != nil { + scrapeErrors.AddPartial(1, err) + s.logger.Warn("Failed to scrape pool metrics", zap.Error(err)) + } else { + collectedMetrics = true + for key := range pools.Entries { + poolStats := pools.Entries[key] + s.collectPools(&poolStats, now) + } + } + + // scrape metrics for pool members + poolMembers, err := s.client.GetPoolMembers(ctx, pools) + if err == errCollectedNoPoolMembers { + scrapeErrors.AddPartial(1, err) + s.logger.Warn("Failed to scrape pool member metrics", zap.Error(err)) + } else { + if err != nil { + scrapeErrors.AddPartial(1, err) + s.logger.Warn("Failed to scrape some pool member metrics", zap.Error(err)) + } + + collectedMetrics = true + for key := range poolMembers.Entries { + poolMemberStats := poolMembers.Entries[key] + s.collectPoolMembers(&poolMemberStats, now) + } + } + + // scrape metrics for nodes + nodes, err := s.client.GetNodes(ctx) + if err != nil { + scrapeErrors.AddPartial(1, err) + s.logger.Warn("Failed to scrape node metrics", zap.Error(err)) + } else { + collectedMetrics = true + for key := range nodes.Entries { + nodeStats := nodes.Entries[key] + s.collectNodes(&nodeStats, now) + } + } + + if !collectedMetrics { + return pmetric.NewMetrics(), errScrapedNoMetrics + } + + return s.mb.Emit(), scrapeErrors.Combine() +} + +// collectVirtualServers collects virtual server metrics +func (s *bigipScraper) collectVirtualServers(virtualServerStats *models.VirtualServerStats, now pcommon.Timestamp) { + s.mb.RecordBigipVirtualServerDataTransmittedDataPoint(now, virtualServerStats.NestedStats.Entries.ClientsideBitsIn.Value, metadata.AttributeDirectionReceived) + s.mb.RecordBigipVirtualServerDataTransmittedDataPoint(now, virtualServerStats.NestedStats.Entries.ClientsideBitsOut.Value, metadata.AttributeDirectionSent) + s.mb.RecordBigipVirtualServerConnectionCountDataPoint(now, virtualServerStats.NestedStats.Entries.ClientsideCurConns.Value) + s.mb.RecordBigipVirtualServerPacketCountDataPoint(now, virtualServerStats.NestedStats.Entries.ClientsidePktsIn.Value, metadata.AttributeDirectionReceived) + s.mb.RecordBigipVirtualServerPacketCountDataPoint(now, virtualServerStats.NestedStats.Entries.ClientsidePktsOut.Value, metadata.AttributeDirectionSent) + s.mb.RecordBigipVirtualServerRequestCountDataPoint(now, virtualServerStats.NestedStats.Entries.TotalRequests.Value) + availability := virtualServerStats.NestedStats.Entries.AvailabilityState.Description + if strings.HasPrefix(availability, "available") { + s.mb.RecordBigipVirtualServerAvailabilityDataPoint(now, 0, metadata.AttributeAvailabilityStatusOffline) + s.mb.RecordBigipVirtualServerAvailabilityDataPoint(now, 0, metadata.AttributeAvailabilityStatusUnknown) + s.mb.RecordBigipVirtualServerAvailabilityDataPoint(now, 1, metadata.AttributeAvailabilityStatusAvailable) + } else if strings.HasPrefix(availability, "offline") { + s.mb.RecordBigipVirtualServerAvailabilityDataPoint(now, 1, metadata.AttributeAvailabilityStatusOffline) + s.mb.RecordBigipVirtualServerAvailabilityDataPoint(now, 0, metadata.AttributeAvailabilityStatusUnknown) + s.mb.RecordBigipVirtualServerAvailabilityDataPoint(now, 0, metadata.AttributeAvailabilityStatusAvailable) + } else { + s.mb.RecordBigipVirtualServerAvailabilityDataPoint(now, 0, metadata.AttributeAvailabilityStatusOffline) + s.mb.RecordBigipVirtualServerAvailabilityDataPoint(now, 1, metadata.AttributeAvailabilityStatusUnknown) + s.mb.RecordBigipVirtualServerAvailabilityDataPoint(now, 0, metadata.AttributeAvailabilityStatusAvailable) + } + enabled := virtualServerStats.NestedStats.Entries.EnabledState.Description + if strings.HasPrefix(enabled, "enabled") { + s.mb.RecordBigipVirtualServerEnabledDataPoint(now, 0, metadata.AttributeEnabledStatusDisabled) + s.mb.RecordBigipVirtualServerEnabledDataPoint(now, 1, metadata.AttributeEnabledStatusEnabled) + } else { + s.mb.RecordBigipVirtualServerEnabledDataPoint(now, 1, metadata.AttributeEnabledStatusDisabled) + s.mb.RecordBigipVirtualServerEnabledDataPoint(now, 0, metadata.AttributeEnabledStatusEnabled) + } + + s.mb.EmitForResource( + metadata.WithBigipVirtualServerName(virtualServerStats.NestedStats.Entries.Name.Description), + metadata.WithBigipVirtualServerDestination(virtualServerStats.NestedStats.Entries.Destination.Description), + metadata.WithBigipPoolName(virtualServerStats.NestedStats.Entries.PoolName.Description), + ) +} + +// collectPools collects pool metrics +func (s *bigipScraper) collectPools(poolStats *models.PoolStats, now pcommon.Timestamp) { + s.mb.RecordBigipPoolDataTransmittedDataPoint(now, poolStats.NestedStats.Entries.ServersideBitsIn.Value, metadata.AttributeDirectionReceived) + s.mb.RecordBigipPoolDataTransmittedDataPoint(now, poolStats.NestedStats.Entries.ServersideBitsOut.Value, metadata.AttributeDirectionSent) + s.mb.RecordBigipPoolConnectionCountDataPoint(now, poolStats.NestedStats.Entries.ServersideCurConns.Value) + s.mb.RecordBigipPoolPacketCountDataPoint(now, poolStats.NestedStats.Entries.ServersidePktsIn.Value, metadata.AttributeDirectionReceived) + s.mb.RecordBigipPoolPacketCountDataPoint(now, poolStats.NestedStats.Entries.ServersidePktsOut.Value, metadata.AttributeDirectionSent) + s.mb.RecordBigipPoolRequestCountDataPoint(now, poolStats.NestedStats.Entries.TotalRequests.Value) + s.mb.RecordBigipPoolMemberCountDataPoint(now, poolStats.NestedStats.Entries.ActiveMemberCount.Value, metadata.AttributeActiveStatusActive) + inactiveCount := poolStats.NestedStats.Entries.TotalMemberCount.Value - poolStats.NestedStats.Entries.ActiveMemberCount.Value + s.mb.RecordBigipPoolMemberCountDataPoint(now, inactiveCount, metadata.AttributeActiveStatusInactive) + availability := poolStats.NestedStats.Entries.AvailabilityState.Description + if strings.HasPrefix(availability, "available") { + s.mb.RecordBigipPoolAvailabilityDataPoint(now, 0, metadata.AttributeAvailabilityStatusOffline) + s.mb.RecordBigipPoolAvailabilityDataPoint(now, 0, metadata.AttributeAvailabilityStatusUnknown) + s.mb.RecordBigipPoolAvailabilityDataPoint(now, 1, metadata.AttributeAvailabilityStatusAvailable) + } else if strings.HasPrefix(availability, "offline") { + s.mb.RecordBigipPoolAvailabilityDataPoint(now, 1, metadata.AttributeAvailabilityStatusOffline) + s.mb.RecordBigipPoolAvailabilityDataPoint(now, 0, metadata.AttributeAvailabilityStatusUnknown) + s.mb.RecordBigipPoolAvailabilityDataPoint(now, 0, metadata.AttributeAvailabilityStatusAvailable) + } else { + s.mb.RecordBigipPoolAvailabilityDataPoint(now, 0, metadata.AttributeAvailabilityStatusOffline) + s.mb.RecordBigipPoolAvailabilityDataPoint(now, 1, metadata.AttributeAvailabilityStatusUnknown) + s.mb.RecordBigipPoolAvailabilityDataPoint(now, 0, metadata.AttributeAvailabilityStatusAvailable) + } + enabled := poolStats.NestedStats.Entries.EnabledState.Description + if strings.HasPrefix(enabled, "enabled") { + s.mb.RecordBigipPoolEnabledDataPoint(now, 0, metadata.AttributeEnabledStatusDisabled) + s.mb.RecordBigipPoolEnabledDataPoint(now, 1, metadata.AttributeEnabledStatusEnabled) + } else { + s.mb.RecordBigipPoolEnabledDataPoint(now, 1, metadata.AttributeEnabledStatusDisabled) + s.mb.RecordBigipPoolEnabledDataPoint(now, 0, metadata.AttributeEnabledStatusEnabled) + } + + s.mb.EmitForResource( + metadata.WithBigipPoolName(poolStats.NestedStats.Entries.Name.Description), + ) +} + +// collectPoolMembers collects pool member metrics +func (s *bigipScraper) collectPoolMembers(poolMemberStats *models.PoolMemberStats, now pcommon.Timestamp) { + s.mb.RecordBigipPoolMemberDataTransmittedDataPoint(now, poolMemberStats.NestedStats.Entries.ServersideBitsIn.Value, metadata.AttributeDirectionReceived) + s.mb.RecordBigipPoolMemberDataTransmittedDataPoint(now, poolMemberStats.NestedStats.Entries.ServersideBitsOut.Value, metadata.AttributeDirectionSent) + s.mb.RecordBigipPoolMemberConnectionCountDataPoint(now, poolMemberStats.NestedStats.Entries.ServersideCurConns.Value) + s.mb.RecordBigipPoolMemberPacketCountDataPoint(now, poolMemberStats.NestedStats.Entries.ServersidePktsIn.Value, metadata.AttributeDirectionReceived) + s.mb.RecordBigipPoolMemberPacketCountDataPoint(now, poolMemberStats.NestedStats.Entries.ServersidePktsOut.Value, metadata.AttributeDirectionSent) + s.mb.RecordBigipPoolMemberRequestCountDataPoint(now, poolMemberStats.NestedStats.Entries.TotalRequests.Value) + s.mb.RecordBigipPoolMemberSessionCountDataPoint(now, poolMemberStats.NestedStats.Entries.CurSessions.Value) + availability := poolMemberStats.NestedStats.Entries.AvailabilityState.Description + if strings.HasPrefix(availability, "available") { + s.mb.RecordBigipPoolMemberAvailabilityDataPoint(now, 0, metadata.AttributeAvailabilityStatusOffline) + s.mb.RecordBigipPoolMemberAvailabilityDataPoint(now, 0, metadata.AttributeAvailabilityStatusUnknown) + s.mb.RecordBigipPoolMemberAvailabilityDataPoint(now, 1, metadata.AttributeAvailabilityStatusAvailable) + } else if strings.HasPrefix(availability, "offline") { + s.mb.RecordBigipPoolMemberAvailabilityDataPoint(now, 1, metadata.AttributeAvailabilityStatusOffline) + s.mb.RecordBigipPoolMemberAvailabilityDataPoint(now, 0, metadata.AttributeAvailabilityStatusUnknown) + s.mb.RecordBigipPoolMemberAvailabilityDataPoint(now, 0, metadata.AttributeAvailabilityStatusAvailable) + } else { + s.mb.RecordBigipPoolMemberAvailabilityDataPoint(now, 0, metadata.AttributeAvailabilityStatusOffline) + s.mb.RecordBigipPoolMemberAvailabilityDataPoint(now, 1, metadata.AttributeAvailabilityStatusUnknown) + s.mb.RecordBigipPoolMemberAvailabilityDataPoint(now, 0, metadata.AttributeAvailabilityStatusAvailable) + } + enabled := poolMemberStats.NestedStats.Entries.EnabledState.Description + if strings.HasPrefix(enabled, "enabled") { + s.mb.RecordBigipPoolMemberEnabledDataPoint(now, 0, metadata.AttributeEnabledStatusDisabled) + s.mb.RecordBigipPoolMemberEnabledDataPoint(now, 1, metadata.AttributeEnabledStatusEnabled) + } else { + s.mb.RecordBigipPoolMemberEnabledDataPoint(now, 1, metadata.AttributeEnabledStatusDisabled) + s.mb.RecordBigipPoolMemberEnabledDataPoint(now, 0, metadata.AttributeEnabledStatusEnabled) + } + + s.mb.EmitForResource( + metadata.WithBigipPoolMemberName(fmt.Sprintf("%s:%d", poolMemberStats.NestedStats.Entries.Name.Description, poolMemberStats.NestedStats.Entries.Port.Value)), + metadata.WithBigipPoolMemberIPAddress(poolMemberStats.NestedStats.Entries.IPAddress.Description), + metadata.WithBigipPoolName(poolMemberStats.NestedStats.Entries.PoolName.Description), + ) +} + +// collectNodes collects node metrics +func (s *bigipScraper) collectNodes(nodeStats *models.NodeStats, now pcommon.Timestamp) { + s.mb.RecordBigipNodeDataTransmittedDataPoint(now, nodeStats.NestedStats.Entries.ServersideBitsIn.Value, metadata.AttributeDirectionReceived) + s.mb.RecordBigipNodeDataTransmittedDataPoint(now, nodeStats.NestedStats.Entries.ServersideBitsOut.Value, metadata.AttributeDirectionSent) + s.mb.RecordBigipNodeConnectionCountDataPoint(now, nodeStats.NestedStats.Entries.ServersideCurConns.Value) + s.mb.RecordBigipNodePacketCountDataPoint(now, nodeStats.NestedStats.Entries.ServersidePktsIn.Value, metadata.AttributeDirectionReceived) + s.mb.RecordBigipNodePacketCountDataPoint(now, nodeStats.NestedStats.Entries.ServersidePktsOut.Value, metadata.AttributeDirectionSent) + s.mb.RecordBigipNodeRequestCountDataPoint(now, nodeStats.NestedStats.Entries.TotalRequests.Value) + s.mb.RecordBigipNodeSessionCountDataPoint(now, nodeStats.NestedStats.Entries.CurSessions.Value) + availability := nodeStats.NestedStats.Entries.AvailabilityState.Description + if strings.HasPrefix(availability, "available") { + s.mb.RecordBigipNodeAvailabilityDataPoint(now, 0, metadata.AttributeAvailabilityStatusOffline) + s.mb.RecordBigipNodeAvailabilityDataPoint(now, 0, metadata.AttributeAvailabilityStatusUnknown) + s.mb.RecordBigipNodeAvailabilityDataPoint(now, 1, metadata.AttributeAvailabilityStatusAvailable) + } else if strings.HasPrefix(availability, "offline") { + s.mb.RecordBigipNodeAvailabilityDataPoint(now, 1, metadata.AttributeAvailabilityStatusOffline) + s.mb.RecordBigipNodeAvailabilityDataPoint(now, 0, metadata.AttributeAvailabilityStatusUnknown) + s.mb.RecordBigipNodeAvailabilityDataPoint(now, 0, metadata.AttributeAvailabilityStatusAvailable) + } else { + s.mb.RecordBigipNodeAvailabilityDataPoint(now, 0, metadata.AttributeAvailabilityStatusOffline) + s.mb.RecordBigipNodeAvailabilityDataPoint(now, 1, metadata.AttributeAvailabilityStatusUnknown) + s.mb.RecordBigipNodeAvailabilityDataPoint(now, 0, metadata.AttributeAvailabilityStatusAvailable) + } + enabled := nodeStats.NestedStats.Entries.EnabledState.Description + if strings.HasPrefix(enabled, "enabled") { + s.mb.RecordBigipNodeEnabledDataPoint(now, 0, metadata.AttributeEnabledStatusDisabled) + s.mb.RecordBigipNodeEnabledDataPoint(now, 1, metadata.AttributeEnabledStatusEnabled) + } else { + s.mb.RecordBigipNodeEnabledDataPoint(now, 1, metadata.AttributeEnabledStatusDisabled) + s.mb.RecordBigipNodeEnabledDataPoint(now, 0, metadata.AttributeEnabledStatusEnabled) + } + + s.mb.EmitForResource( + metadata.WithBigipNodeName(nodeStats.NestedStats.Entries.Name.Description), + metadata.WithBigipNodeIPAddress(nodeStats.NestedStats.Entries.IPAddress.Description), + ) +} diff --git a/receiver/bigipreceiver/scraper_test.go b/receiver/bigipreceiver/scraper_test.go new file mode 100644 index 000000000000..9baf5d45508c --- /dev/null +++ b/receiver/bigipreceiver/scraper_test.go @@ -0,0 +1,278 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package bigipreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver" + +import ( + "context" + "encoding/json" + "errors" + "path/filepath" + "testing" + + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/config/configtls" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/receiver/scrapererror" + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest/golden" + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver/internal/mocks" + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver/internal/models" +) + +func TestScraperStart(t *testing.T) { + testcases := []struct { + desc string + scraper *bigipScraper + expectError bool + }{ + { + desc: "Bad Config", + scraper: &bigipScraper{ + cfg: &Config{ + HTTPClientSettings: confighttp.HTTPClientSettings{ + Endpoint: defaultEndpoint, + TLSSetting: configtls.TLSClientSetting{ + TLSSetting: configtls.TLSSetting{ + CAFile: "/non/existent", + }, + }, + }, + }, + settings: componenttest.NewNopTelemetrySettings(), + }, + expectError: true, + }, + { + desc: "Valid Config", + scraper: &bigipScraper{ + cfg: &Config{ + HTTPClientSettings: confighttp.HTTPClientSettings{ + TLSSetting: configtls.TLSClientSetting{}, + Endpoint: defaultEndpoint, + }, + }, + settings: componenttest.NewNopTelemetrySettings(), + }, + expectError: false, + }, + } + + for _, tc := range testcases { + t.Run(tc.desc, func(t *testing.T) { + err := tc.scraper.start(context.Background(), componenttest.NewNopHost()) + if tc.expectError { + require.Error(t, err) + } else { + require.NoError(t, err) + } + }) + } +} + +func TestScaperScrape(t *testing.T) { + testCases := []struct { + desc string + setupMockClient func(t *testing.T) client + expectedMetricGen func(t *testing.T) pmetric.Metrics + expectedErr error + }{ + { + desc: "Nil client", + setupMockClient: func(t *testing.T) client { + return nil + }, + expectedMetricGen: func(t *testing.T) pmetric.Metrics { + return pmetric.NewMetrics() + }, + expectedErr: errClientNotInit, + }, + { + desc: "Login API Call Failure", + setupMockClient: func(t *testing.T) client { + mockClient := mocks.MockClient{} + mockClient.On("GetNewToken", mock.Anything).Return(errors.New("some api error")) + return &mockClient + }, + expectedMetricGen: func(t *testing.T) pmetric.Metrics { + return pmetric.NewMetrics() + }, + expectedErr: errors.New("some api error"), + }, + { + desc: "Get API Calls All Failure", + setupMockClient: func(t *testing.T) client { + mockClient := mocks.MockClient{} + mockClient.On("GetNewToken", mock.Anything).Return(nil) + mockClient.On("GetVirtualServers", mock.Anything).Return(nil, errors.New("some virtual api error")) + mockClient.On("GetPools", mock.Anything).Return(nil, errors.New("some pool api error")) + mockClient.On("GetPoolMembers", mock.Anything, mock.Anything).Return(nil, errCollectedNoPoolMembers) + mockClient.On("GetNodes", mock.Anything).Return(nil, errors.New("some node api error")) + return &mockClient + }, + expectedMetricGen: func(t *testing.T) pmetric.Metrics { + return pmetric.NewMetrics() + }, + expectedErr: errors.New("failed to scrape any metrics"), + }, + { + desc: "Successful Full Empty Collection", + setupMockClient: func(t *testing.T) client { + mockClient := mocks.MockClient{} + mockClient.On("GetNewToken", mock.Anything).Return(nil) + mockClient.On("GetVirtualServers", mock.Anything).Return(&models.VirtualServers{}, nil) + mockClient.On("GetPools", mock.Anything).Return(&models.Pools{}, nil) + mockClient.On("GetPoolMembers", mock.Anything, mock.Anything).Return(&models.PoolMembers{}, nil) + mockClient.On("GetNodes", mock.Anything).Return(&models.Nodes{}, nil) + return &mockClient + }, + expectedMetricGen: func(t *testing.T) pmetric.Metrics { + goldenPath := filepath.Join("testdata", "expected_metrics", "metrics_empty_golden.json") + expectedMetrics, err := golden.ReadMetrics(goldenPath) + require.NoError(t, err) + return expectedMetrics + }, + expectedErr: nil, + }, + { + desc: "Successful Partial Collection", + setupMockClient: func(t *testing.T) client { + mockClient := mocks.MockClient{} + mockClient.On("GetNewToken", mock.Anything).Return(nil) + + // use helper function from client tests + data := loadAPIResponseData(t, virtualServersCombinedFile) + var virtualServers *models.VirtualServers + err := json.Unmarshal(data, &virtualServers) + require.NoError(t, err) + mockClient.On("GetVirtualServers", mock.Anything).Return(virtualServers, nil) + + mockClient.On("GetPools", mock.Anything).Return(nil, errors.New("some pool api error")) + mockClient.On("GetPoolMembers", mock.Anything, mock.Anything).Return(nil, errCollectedNoPoolMembers) + mockClient.On("GetNodes", mock.Anything).Return(nil, errors.New("some node api error")) + + return &mockClient + }, + expectedMetricGen: func(t *testing.T) pmetric.Metrics { + goldenPath := filepath.Join("testdata", "expected_metrics", "metrics_partial_golden.json") + expectedMetrics, err := golden.ReadMetrics(goldenPath) + require.NoError(t, err) + return expectedMetrics + }, + expectedErr: scrapererror.NewPartialScrapeError(errors.New("some pool api error; all pool member requests have failed; some node api error"), 0), + }, + { + desc: "Successful Partial Collection With Partial Members", + setupMockClient: func(t *testing.T) client { + mockClient := mocks.MockClient{} + mockClient.On("GetNewToken", mock.Anything).Return(nil) + + // use helper function from client tests + data := loadAPIResponseData(t, virtualServersCombinedFile) + var virtualServers *models.VirtualServers + err := json.Unmarshal(data, &virtualServers) + require.NoError(t, err) + mockClient.On("GetVirtualServers", mock.Anything).Return(virtualServers, nil) + + // use helper function from client tests + data = loadAPIResponseData(t, poolMembersCombinedFile) + var poolMembers *models.PoolMembers + err = json.Unmarshal(data, &poolMembers) + require.NoError(t, err) + mockClient.On("GetPoolMembers", mock.Anything, mock.Anything).Return(poolMembers, errors.New("some member api error")) + + mockClient.On("GetPools", mock.Anything).Return(nil, errors.New("some pool api error")) + mockClient.On("GetNodes", mock.Anything).Return(nil, errors.New("some node api error")) + + return &mockClient + }, + expectedMetricGen: func(t *testing.T) pmetric.Metrics { + goldenPath := filepath.Join("testdata", "expected_metrics", "metrics_partial_with_members_golden.json") + expectedMetrics, err := golden.ReadMetrics(goldenPath) + require.NoError(t, err) + return expectedMetrics + }, + expectedErr: scrapererror.NewPartialScrapeError(errors.New("some pool api error; some member api error; some node api error"), 0), + }, + { + desc: "Successful Full Collection", + setupMockClient: func(t *testing.T) client { + mockClient := mocks.MockClient{} + mockClient.On("GetNewToken", mock.Anything).Return(nil) + + // use helper function from client tests + data := loadAPIResponseData(t, virtualServersCombinedFile) + var virtualServers *models.VirtualServers + err := json.Unmarshal(data, &virtualServers) + require.NoError(t, err) + mockClient.On("GetVirtualServers", mock.Anything).Return(virtualServers, nil) + + // use helper function from client tests + data = loadAPIResponseData(t, poolsStatsResponseFile) + var pools *models.Pools + err = json.Unmarshal(data, &pools) + require.NoError(t, err) + mockClient.On("GetPools", mock.Anything).Return(pools, nil) + + // use helper function from client tests + data = loadAPIResponseData(t, poolMembersCombinedFile) + var poolMembers *models.PoolMembers + err = json.Unmarshal(data, &poolMembers) + require.NoError(t, err) + mockClient.On("GetPoolMembers", mock.Anything, mock.Anything).Return(poolMembers, nil) + + // use helper function from client tests + data = loadAPIResponseData(t, nodesStatsResponseFile) + var nodes *models.Nodes + err = json.Unmarshal(data, &nodes) + require.NoError(t, err) + mockClient.On("GetNodes", mock.Anything).Return(nodes, nil) + + return &mockClient + }, + expectedMetricGen: func(t *testing.T) pmetric.Metrics { + goldenPath := filepath.Join("testdata", "expected_metrics", "metrics_golden.json") + expectedMetrics, err := golden.ReadMetrics(goldenPath) + require.NoError(t, err) + return expectedMetrics + }, + expectedErr: nil, + }, + } + + for _, tc := range testCases { + t.Run(tc.desc, func(t *testing.T) { + scraper := newScraper(zap.NewNop(), createDefaultConfig().(*Config), componenttest.NewNopTelemetrySettings()) + scraper.client = tc.setupMockClient(t) + + actualMetrics, err := scraper.scrape(context.Background()) + + if tc.expectedErr == nil { + require.NoError(t, err) + } else { + require.EqualError(t, err, tc.expectedErr.Error()) + } + + expectedMetrics := tc.expectedMetricGen(t) + + err = scrapertest.CompareMetrics(expectedMetrics, actualMetrics) + require.NoError(t, err) + }) + } +} diff --git a/receiver/bigipreceiver/testdata/apiresponses/get_nodes_stats_response.json b/receiver/bigipreceiver/testdata/apiresponses/get_nodes_stats_response.json new file mode 100644 index 000000000000..ff15a04d2121 --- /dev/null +++ b/receiver/bigipreceiver/testdata/apiresponses/get_nodes_stats_response.json @@ -0,0 +1,301 @@ +{ + "kind": "tm:ltm:node:nodecollectionstats", + "selfLink": "https://localhost/mgmt/tm/ltm/node/stats?ver=16.1.2", + "entries": { + "https://localhost/mgmt/tm/ltm/node/~Common~dev/stats": { + "nestedStats": { + "kind": "tm:ltm:node:nodestats", + "selfLink": "https://localhost/mgmt/tm/ltm/node/~Common~dev/stats?ver=16.1.2", + "entries": { + "addr": { + "description": "10.33.104.2" + }, + "curSessions": { + "value": 0 + }, + "monitorRule": { + "description": "none" + }, + "monitorStatus": { + "description": "unchecked" + }, + "tmName": { + "description": "/Common/dev" + }, + "serverside.bitsIn": { + "value": 0 + }, + "serverside.bitsOut": { + "value": 0 + }, + "serverside.curConns": { + "value": 0 + }, + "serverside.maxConns": { + "value": 0 + }, + "serverside.pktsIn": { + "value": 0 + }, + "serverside.pktsOut": { + "value": 0 + }, + "serverside.totConns": { + "value": 0 + }, + "sessionStatus": { + "description": "enabled" + }, + "status.availabilityState": { + "description": "unknown" + }, + "status.enabledState": { + "description": "enabled" + }, + "status.statusReason": { + "description": "Node address does not have service checking enabled" + }, + "totRequests": { + "value": 0 + } + } + } + }, + "https://localhost/mgmt/tm/ltm/node/~Common~nginx/stats": { + "nestedStats": { + "kind": "tm:ltm:node:nodestats", + "selfLink": "https://localhost/mgmt/tm/ltm/node/~Common~nginx/stats?ver=16.1.2", + "entries": { + "addr": { + "description": "10.33.121.108" + }, + "curSessions": { + "value": 0 + }, + "monitorRule": { + "description": "/Common/real_server" + }, + "monitorStatus": { + "description": "up" + }, + "tmName": { + "description": "/Common/nginx" + }, + "serverside.bitsIn": { + "value": 0 + }, + "serverside.bitsOut": { + "value": 0 + }, + "serverside.curConns": { + "value": 0 + }, + "serverside.maxConns": { + "value": 0 + }, + "serverside.pktsIn": { + "value": 0 + }, + "serverside.pktsOut": { + "value": 0 + }, + "serverside.totConns": { + "value": 0 + }, + "sessionStatus": { + "description": "enabled" + }, + "status.availabilityState": { + "description": "available" + }, + "status.enabledState": { + "description": "enabled" + }, + "status.statusReason": { + "description": "Node address is available" + }, + "totRequests": { + "value": 0 + } + } + } + }, + "https://localhost/mgmt/tm/ltm/node/~Common~test-node-1/stats": { + "nestedStats": { + "kind": "tm:ltm:node:nodestats", + "selfLink": "https://localhost/mgmt/tm/ltm/node/~Common~test-node-1/stats?ver=16.1.2", + "entries": { + "addr": { + "description": "10.0.0.1" + }, + "curSessions": { + "value": 0 + }, + "monitorRule": { + "description": "none" + }, + "monitorStatus": { + "description": "unchecked" + }, + "tmName": { + "description": "/Common/test-node-1" + }, + "serverside.bitsIn": { + "value": 0 + }, + "serverside.bitsOut": { + "value": 0 + }, + "serverside.curConns": { + "value": 0 + }, + "serverside.maxConns": { + "value": 0 + }, + "serverside.pktsIn": { + "value": 0 + }, + "serverside.pktsOut": { + "value": 0 + }, + "serverside.totConns": { + "value": 0 + }, + "sessionStatus": { + "description": "enabled" + }, + "status.availabilityState": { + "description": "unknown" + }, + "status.enabledState": { + "description": "enabled" + }, + "status.statusReason": { + "description": "Node address does not have service checking enabled" + }, + "totRequests": { + "value": 0 + } + } + } + }, + "https://localhost/mgmt/tm/ltm/node/~Common~test-node-2/stats": { + "nestedStats": { + "kind": "tm:ltm:node:nodestats", + "selfLink": "https://localhost/mgmt/tm/ltm/node/~Common~test-node-2/stats?ver=16.1.2", + "entries": { + "addr": { + "description": "10.0.0.2" + }, + "curSessions": { + "value": 0 + }, + "monitorRule": { + "description": "none" + }, + "monitorStatus": { + "description": "unchecked" + }, + "tmName": { + "description": "/Common/test-node-2" + }, + "serverside.bitsIn": { + "value": 0 + }, + "serverside.bitsOut": { + "value": 0 + }, + "serverside.curConns": { + "value": 0 + }, + "serverside.maxConns": { + "value": 0 + }, + "serverside.pktsIn": { + "value": 0 + }, + "serverside.pktsOut": { + "value": 0 + }, + "serverside.totConns": { + "value": 0 + }, + "sessionStatus": { + "description": "enabled" + }, + "status.availabilityState": { + "description": "unknown" + }, + "status.enabledState": { + "description": "enabled" + }, + "status.statusReason": { + "description": "Node address does not have service checking enabled" + }, + "totRequests": { + "value": 0 + } + } + } + }, + "https://localhost/mgmt/tm/ltm/node/~Common~test-node-3/stats": { + "nestedStats": { + "kind": "tm:ltm:node:nodestats", + "selfLink": "https://localhost/mgmt/tm/ltm/node/~Common~test-node-3/stats?ver=16.1.2", + "entries": { + "addr": { + "description": "10.0.0.3" + }, + "curSessions": { + "value": 0 + }, + "monitorRule": { + "description": "none" + }, + "monitorStatus": { + "description": "unchecked" + }, + "tmName": { + "description": "/Common/test-node-3" + }, + "serverside.bitsIn": { + "value": 0 + }, + "serverside.bitsOut": { + "value": 0 + }, + "serverside.curConns": { + "value": 0 + }, + "serverside.maxConns": { + "value": 0 + }, + "serverside.pktsIn": { + "value": 0 + }, + "serverside.pktsOut": { + "value": 0 + }, + "serverside.totConns": { + "value": 0 + }, + "sessionStatus": { + "description": "enabled" + }, + "status.availabilityState": { + "description": "unknown" + }, + "status.enabledState": { + "description": "enabled" + }, + "status.statusReason": { + "description": "Node address does not have service checking enabled" + }, + "totRequests": { + "value": 0 + } + } + } + } + } +} diff --git a/receiver/bigipreceiver/testdata/apiresponses/get_pool_members_stats_response_1.json b/receiver/bigipreceiver/testdata/apiresponses/get_pool_members_stats_response_1.json new file mode 100644 index 000000000000..f3e2b8c35b4a --- /dev/null +++ b/receiver/bigipreceiver/testdata/apiresponses/get_pool_members_stats_response_1.json @@ -0,0 +1,107 @@ +{ + "kind": "tm:ltm:pool:members:memberscollectionstats", + "selfLink": "https://localhost/mgmt/tm/ltm/pool/~Common~dev/members/stats?ver=16.1.2", + "entries": { + "https://localhost/mgmt/tm/ltm/pool/~Common~dev/members/~Common~dev:80/stats": { + "nestedStats": { + "kind": "tm:ltm:pool:members:membersstats", + "selfLink": "https://localhost/mgmt/tm/ltm/pool/~Common~dev/members/~Common~dev:80/stats?ver=16.1.2", + "entries": { + "addr": { + "description": "10.33.104.2" + }, + "connq.ageEdm": { + "value": 0 + }, + "connq.ageEma": { + "value": 0 + }, + "connq.ageHead": { + "value": 0 + }, + "connq.ageMax": { + "value": 0 + }, + "connq.depth": { + "value": 0 + }, + "connq.serviced": { + "value": 0 + }, + "curSessions": { + "value": 0 + }, + "monitorRule": { + "description": "/Common/http (pool monitor)" + }, + "monitorStatus": { + "description": "down" + }, + "mr.msgIn": { + "value": 0 + }, + "mr.msgOut": { + "value": 0 + }, + "mr.reqIn": { + "value": 0 + }, + "mr.reqOut": { + "value": 0 + }, + "mr.respIn": { + "value": 0 + }, + "mr.respOut": { + "value": 0 + }, + "nodeName": { + "description": "/Common/dev" + }, + "poolName": { + "description": "/Common/dev" + }, + "port": { + "value": 80 + }, + "serverside.bitsIn": { + "value": 0 + }, + "serverside.bitsOut": { + "value": 0 + }, + "serverside.curConns": { + "value": 0 + }, + "serverside.maxConns": { + "value": 0 + }, + "serverside.pktsIn": { + "value": 0 + }, + "serverside.pktsOut": { + "value": 0 + }, + "serverside.totConns": { + "value": 0 + }, + "sessionStatus": { + "description": "enabled" + }, + "status.availabilityState": { + "description": "offline" + }, + "status.enabledState": { + "description": "enabled" + }, + "status.statusReason": { + "description": "/Common/http: No successful responses received before deadline. @2022/04/29 08:33:56. " + }, + "totRequests": { + "value": 0 + } + } + } + } + } +} diff --git a/receiver/bigipreceiver/testdata/apiresponses/get_pool_members_stats_response_2.json b/receiver/bigipreceiver/testdata/apiresponses/get_pool_members_stats_response_2.json new file mode 100644 index 000000000000..182a6d09ae61 --- /dev/null +++ b/receiver/bigipreceiver/testdata/apiresponses/get_pool_members_stats_response_2.json @@ -0,0 +1,410 @@ +{ + "kind": "tm:ltm:pool:members:memberscollectionstats", + "selfLink": "https://localhost/mgmt/tm/ltm/pool/~Common~test-pool-1/members/stats?ver=16.1.2", + "entries": { + "https://localhost/mgmt/tm/ltm/pool/~Common~test-pool-1/members/~Common~nginx:80/stats": { + "nestedStats": { + "kind": "tm:ltm:pool:members:membersstats", + "selfLink": "https://localhost/mgmt/tm/ltm/pool/~Common~test-pool-1/members/~Common~nginx:80/stats?ver=16.1.2", + "entries": { + "addr": { + "description": "10.33.121.108" + }, + "connq.ageEdm": { + "value": 0 + }, + "connq.ageEma": { + "value": 0 + }, + "connq.ageHead": { + "value": 0 + }, + "connq.ageMax": { + "value": 0 + }, + "connq.depth": { + "value": 0 + }, + "connq.serviced": { + "value": 0 + }, + "curSessions": { + "value": 0 + }, + "monitorRule": { + "description": "/Common/http (pool monitor)" + }, + "monitorStatus": { + "description": "up" + }, + "mr.msgIn": { + "value": 0 + }, + "mr.msgOut": { + "value": 0 + }, + "mr.reqIn": { + "value": 0 + }, + "mr.reqOut": { + "value": 0 + }, + "mr.respIn": { + "value": 0 + }, + "mr.respOut": { + "value": 0 + }, + "nodeName": { + "description": "/Common/nginx" + }, + "poolName": { + "description": "/Common/test-pool-1" + }, + "port": { + "value": 80 + }, + "serverside.bitsIn": { + "value": 0 + }, + "serverside.bitsOut": { + "value": 0 + }, + "serverside.curConns": { + "value": 0 + }, + "serverside.maxConns": { + "value": 0 + }, + "serverside.pktsIn": { + "value": 0 + }, + "serverside.pktsOut": { + "value": 0 + }, + "serverside.totConns": { + "value": 0 + }, + "sessionStatus": { + "description": "user-disabled" + }, + "status.availabilityState": { + "description": "available" + }, + "status.enabledState": { + "description": "disabled" + }, + "status.statusReason": { + "description": "Pool member is available, user disabled" + }, + "totRequests": { + "value": 0 + } + } + } + }, + "https://localhost/mgmt/tm/ltm/pool/~Common~test-pool-1/members/~Common~test-node-1:80/stats": { + "nestedStats": { + "kind": "tm:ltm:pool:members:membersstats", + "selfLink": "https://localhost/mgmt/tm/ltm/pool/~Common~test-pool-1/members/~Common~test-node-1:80/stats?ver=16.1.2", + "entries": { + "addr": { + "description": "10.0.0.1" + }, + "connq.ageEdm": { + "value": 0 + }, + "connq.ageEma": { + "value": 0 + }, + "connq.ageHead": { + "value": 0 + }, + "connq.ageMax": { + "value": 0 + }, + "connq.depth": { + "value": 0 + }, + "connq.serviced": { + "value": 0 + }, + "curSessions": { + "value": 0 + }, + "monitorRule": { + "description": "/Common/http (pool monitor)" + }, + "monitorStatus": { + "description": "down" + }, + "mr.msgIn": { + "value": 0 + }, + "mr.msgOut": { + "value": 0 + }, + "mr.reqIn": { + "value": 0 + }, + "mr.reqOut": { + "value": 0 + }, + "mr.respIn": { + "value": 0 + }, + "mr.respOut": { + "value": 0 + }, + "nodeName": { + "description": "/Common/test-node-1" + }, + "poolName": { + "description": "/Common/test-pool-1" + }, + "port": { + "value": 80 + }, + "serverside.bitsIn": { + "value": 0 + }, + "serverside.bitsOut": { + "value": 0 + }, + "serverside.curConns": { + "value": 0 + }, + "serverside.maxConns": { + "value": 0 + }, + "serverside.pktsIn": { + "value": 0 + }, + "serverside.pktsOut": { + "value": 0 + }, + "serverside.totConns": { + "value": 0 + }, + "sessionStatus": { + "description": "user-disabled" + }, + "status.availabilityState": { + "description": "offline" + }, + "status.enabledState": { + "description": "disabled" + }, + "status.statusReason": { + "description": "/Common/http: No successful responses received before deadline. @2022/04/29 08:13:38. " + }, + "totRequests": { + "value": 0 + } + } + } + }, + "https://localhost/mgmt/tm/ltm/pool/~Common~test-pool-1/members/~Common~test-node-2:80/stats": { + "nestedStats": { + "kind": "tm:ltm:pool:members:membersstats", + "selfLink": "https://localhost/mgmt/tm/ltm/pool/~Common~test-pool-1/members/~Common~test-node-2:80/stats?ver=16.1.2", + "entries": { + "addr": { + "description": "10.0.0.2" + }, + "connq.ageEdm": { + "value": 0 + }, + "connq.ageEma": { + "value": 0 + }, + "connq.ageHead": { + "value": 0 + }, + "connq.ageMax": { + "value": 0 + }, + "connq.depth": { + "value": 0 + }, + "connq.serviced": { + "value": 0 + }, + "curSessions": { + "value": 0 + }, + "monitorRule": { + "description": "/Common/http (pool monitor)" + }, + "monitorStatus": { + "description": "down" + }, + "mr.msgIn": { + "value": 0 + }, + "mr.msgOut": { + "value": 0 + }, + "mr.reqIn": { + "value": 0 + }, + "mr.reqOut": { + "value": 0 + }, + "mr.respIn": { + "value": 0 + }, + "mr.respOut": { + "value": 0 + }, + "nodeName": { + "description": "/Common/test-node-2" + }, + "poolName": { + "description": "/Common/test-pool-1" + }, + "port": { + "value": 80 + }, + "serverside.bitsIn": { + "value": 0 + }, + "serverside.bitsOut": { + "value": 0 + }, + "serverside.curConns": { + "value": 0 + }, + "serverside.maxConns": { + "value": 0 + }, + "serverside.pktsIn": { + "value": 0 + }, + "serverside.pktsOut": { + "value": 0 + }, + "serverside.totConns": { + "value": 0 + }, + "sessionStatus": { + "description": "user-disabled" + }, + "status.availabilityState": { + "description": "offline" + }, + "status.enabledState": { + "description": "disabled" + }, + "status.statusReason": { + "description": "/Common/http: No successful responses received before deadline. @2022/04/29 08:13:38. " + }, + "totRequests": { + "value": 0 + } + } + } + }, + "https://localhost/mgmt/tm/ltm/pool/~Common~test-pool-1/members/~Common~test-node-3:80/stats": { + "nestedStats": { + "kind": "tm:ltm:pool:members:membersstats", + "selfLink": "https://localhost/mgmt/tm/ltm/pool/~Common~test-pool-1/members/~Common~test-node-3:80/stats?ver=16.1.2", + "entries": { + "addr": { + "description": "10.0.0.3" + }, + "connq.ageEdm": { + "value": 0 + }, + "connq.ageEma": { + "value": 0 + }, + "connq.ageHead": { + "value": 0 + }, + "connq.ageMax": { + "value": 0 + }, + "connq.depth": { + "value": 0 + }, + "connq.serviced": { + "value": 0 + }, + "curSessions": { + "value": 0 + }, + "monitorRule": { + "description": "/Common/http (pool monitor)" + }, + "monitorStatus": { + "description": "down" + }, + "mr.msgIn": { + "value": 0 + }, + "mr.msgOut": { + "value": 0 + }, + "mr.reqIn": { + "value": 0 + }, + "mr.reqOut": { + "value": 0 + }, + "mr.respIn": { + "value": 0 + }, + "mr.respOut": { + "value": 0 + }, + "nodeName": { + "description": "/Common/test-node-3" + }, + "poolName": { + "description": "/Common/test-pool-1" + }, + "port": { + "value": 80 + }, + "serverside.bitsIn": { + "value": 0 + }, + "serverside.bitsOut": { + "value": 0 + }, + "serverside.curConns": { + "value": 0 + }, + "serverside.maxConns": { + "value": 0 + }, + "serverside.pktsIn": { + "value": 0 + }, + "serverside.pktsOut": { + "value": 0 + }, + "serverside.totConns": { + "value": 0 + }, + "sessionStatus": { + "description": "user-disabled" + }, + "status.availabilityState": { + "description": "offline" + }, + "status.enabledState": { + "description": "disabled" + }, + "status.statusReason": { + "description": "/Common/http: No successful responses received before deadline. @2022/04/29 08:13:38. " + }, + "totRequests": { + "value": 0 + } + } + } + } + } +} diff --git a/receiver/bigipreceiver/testdata/apiresponses/get_pools_stats_response.json b/receiver/bigipreceiver/testdata/apiresponses/get_pools_stats_response.json new file mode 100644 index 000000000000..b26efc09d5aa --- /dev/null +++ b/receiver/bigipreceiver/testdata/apiresponses/get_pools_stats_response.json @@ -0,0 +1,256 @@ +{ + "kind": "tm:ltm:pool:poolcollectionstats", + "selfLink": "https://localhost/mgmt/tm/ltm/pool/stats?ver=16.1.2", + "entries": { + "https://localhost/mgmt/tm/ltm/pool/~Common~dev/stats": { + "nestedStats": { + "kind": "tm:ltm:pool:poolstats", + "selfLink": "https://localhost/mgmt/tm/ltm/pool/~Common~dev/stats?ver=16.1.2", + "entries": { + "activeMemberCnt": { + "value": 0 + }, + "availableMemberCnt": { + "value": 0 + }, + "connqAll.ageEdm": { + "value": 0 + }, + "connqAll.ageEma": { + "value": 0 + }, + "connqAll.ageHead": { + "value": 0 + }, + "connqAll.ageMax": { + "value": 0 + }, + "connqAll.depth": { + "value": 0 + }, + "connqAll.serviced": { + "value": 0 + }, + "connq.ageEdm": { + "value": 0 + }, + "connq.ageEma": { + "value": 0 + }, + "connq.ageHead": { + "value": 0 + }, + "connq.ageMax": { + "value": 0 + }, + "connq.depth": { + "value": 0 + }, + "connq.serviced": { + "value": 0 + }, + "curPriogrp": { + "value": 0 + }, + "curSessions": { + "value": 0 + }, + "highestPriogrp": { + "value": 0 + }, + "lowestPriogrp": { + "value": 0 + }, + "memberCnt": { + "value": 1 + }, + "minActiveMembers": { + "value": 0 + }, + "monitorRule": { + "description": "/Common/http" + }, + "mr.msgIn": { + "value": 0 + }, + "mr.msgOut": { + "value": 0 + }, + "mr.reqIn": { + "value": 0 + }, + "mr.reqOut": { + "value": 0 + }, + "mr.respIn": { + "value": 0 + }, + "mr.respOut": { + "value": 0 + }, + "tmName": { + "description": "/Common/dev" + }, + "serverside.bitsIn": { + "value": 0 + }, + "serverside.bitsOut": { + "value": 0 + }, + "serverside.curConns": { + "value": 0 + }, + "serverside.maxConns": { + "value": 0 + }, + "serverside.pktsIn": { + "value": 0 + }, + "serverside.pktsOut": { + "value": 0 + }, + "serverside.totConns": { + "value": 0 + }, + "status.availabilityState": { + "description": "offline" + }, + "status.enabledState": { + "description": "enabled" + }, + "status.statusReason": { + "description": "The children pool member(s) are down" + }, + "totRequests": { + "value": 0 + } + } + } + }, + "https://localhost/mgmt/tm/ltm/pool/~Common~test-pool-1/stats": { + "nestedStats": { + "kind": "tm:ltm:pool:poolstats", + "selfLink": "https://localhost/mgmt/tm/ltm/pool/~Common~test-pool-1/stats?ver=16.1.2", + "entries": { + "activeMemberCnt": { + "value": 1 + }, + "availableMemberCnt": { + "value": 1 + }, + "connqAll.ageEdm": { + "value": 0 + }, + "connqAll.ageEma": { + "value": 0 + }, + "connqAll.ageHead": { + "value": 0 + }, + "connqAll.ageMax": { + "value": 0 + }, + "connqAll.depth": { + "value": 0 + }, + "connqAll.serviced": { + "value": 0 + }, + "connq.ageEdm": { + "value": 0 + }, + "connq.ageEma": { + "value": 0 + }, + "connq.ageHead": { + "value": 0 + }, + "connq.ageMax": { + "value": 0 + }, + "connq.depth": { + "value": 0 + }, + "connq.serviced": { + "value": 0 + }, + "curPriogrp": { + "value": 0 + }, + "curSessions": { + "value": 0 + }, + "highestPriogrp": { + "value": 0 + }, + "lowestPriogrp": { + "value": 0 + }, + "memberCnt": { + "value": 4 + }, + "minActiveMembers": { + "value": 0 + }, + "monitorRule": { + "description": "/Common/http" + }, + "mr.msgIn": { + "value": 0 + }, + "mr.msgOut": { + "value": 0 + }, + "mr.reqIn": { + "value": 0 + }, + "mr.reqOut": { + "value": 0 + }, + "mr.respIn": { + "value": 0 + }, + "mr.respOut": { + "value": 0 + }, + "tmName": { + "description": "/Common/test-pool-1" + }, + "serverside.bitsIn": { + "value": 0 + }, + "serverside.bitsOut": { + "value": 0 + }, + "serverside.curConns": { + "value": 0 + }, + "serverside.maxConns": { + "value": 0 + }, + "serverside.pktsIn": { + "value": 0 + }, + "serverside.pktsOut": { + "value": 0 + }, + "serverside.totConns": { + "value": 0 + }, + "status.availabilityState": { + "description": "available" + }, + "status.enabledState": { + "description": "enabled" + }, + "status.statusReason": { + "description": "The pool is available" + }, + "totRequests": { + "value": 0 + } + } + } + } + } +} diff --git a/receiver/bigipreceiver/testdata/apiresponses/get_virtual_servers_response.json b/receiver/bigipreceiver/testdata/apiresponses/get_virtual_servers_response.json new file mode 100644 index 000000000000..ef4ad82f13d0 --- /dev/null +++ b/receiver/bigipreceiver/testdata/apiresponses/get_virtual_servers_response.json @@ -0,0 +1,207 @@ +{ + "kind": "tm:ltm:virtual:virtualcollectionstate", + "selfLink": "https://localhost/mgmt/tm/ltm/virtual?ver=16.1.2", + "items": [ + { + "kind": "tm:ltm:virtual:virtualstate", + "name": "test-virtual-server1", + "partition": "Common", + "fullPath": "/Common/test-virtual-server1", + "generation": 203, + "selfLink": "https://localhost/mgmt/tm/ltm/virtual/~Common~test-virtual-server1?ver=16.1.2", + "addressStatus": "yes", + "autoLasthop": "default", + "cmpEnabled": "yes", + "connectionLimit": 0, + "creationTime": "2022-04-19T19:10:23Z", + "description": "Test Virtual Server 1", + "destination": "/Common/10.1.10.100:80", + "enabled": true, + "evictionProtected": "disabled", + "gtmScore": 0, + "ipProtocol": "tcp", + "lastModifiedTime": "2022-04-29T15:33:12Z", + "mask": "255.255.255.255", + "mirror": "disabled", + "mobileAppTunnel": "disabled", + "nat64": "disabled", + "pool": "/Common/dev", + "poolReference": { + "link": "https://localhost/mgmt/tm/ltm/pool/~Common~dev?ver=16.1.2" + }, + "rateLimit": "disabled", + "rateLimitDstMask": 0, + "rateLimitMode": "object", + "rateLimitSrcMask": 0, + "serversslUseSni": "disabled", + "serviceDownImmediateAction": "none", + "source": "0.0.0.0/0", + "sourceAddressTranslation": { + "type": "none" + }, + "sourcePort": "preserve", + "synCookieStatus": "not-activated", + "translateAddress": "enabled", + "translatePort": "enabled", + "vlansDisabled": true, + "vsIndex": 2, + "policiesReference": { + "link": "https://localhost/mgmt/tm/ltm/virtual/~Common~test-virtual-server1/policies?ver=16.1.2", + "isSubcollection": true + }, + "profilesReference": { + "link": "https://localhost/mgmt/tm/ltm/virtual/~Common~test-virtual-server1/profiles?ver=16.1.2", + "isSubcollection": true + } + }, + { + "kind": "tm:ltm:virtual:virtualstate", + "name": "test-virtual-server2", + "partition": "Common", + "fullPath": "/Common/test-virtual-server2", + "generation": 538, + "selfLink": "https://localhost/mgmt/tm/ltm/virtual/~Common~test-virtual-server2?ver=16.1.2", + "addressStatus": "yes", + "autoLasthop": "default", + "cmpEnabled": "yes", + "connectionLimit": 0, + "creationTime": "2022-04-19T19:11:50Z", + "destination": "/Common/10.1.10.100:21", + "disabled": true, + "evictionProtected": "disabled", + "gtmScore": 0, + "ipProtocol": "tcp", + "lastModifiedTime": "2022-05-04T13:50:58Z", + "mask": "255.255.255.255", + "mirror": "disabled", + "mobileAppTunnel": "disabled", + "nat64": "disabled", + "pool": "/Common/test-pool-1", + "poolReference": { + "link": "https://localhost/mgmt/tm/ltm/pool/~Common~test-pool-1?ver=16.1.2" + }, + "rateLimit": "disabled", + "rateLimitDstMask": 0, + "rateLimitMode": "object", + "rateLimitSrcMask": 0, + "serversslUseSni": "disabled", + "serviceDownImmediateAction": "none", + "source": "0.0.0.0/0", + "sourceAddressTranslation": { + "type": "none" + }, + "sourcePort": "preserve", + "synCookieStatus": "not-activated", + "translateAddress": "enabled", + "translatePort": "enabled", + "vlansDisabled": true, + "vsIndex": 3, + "policiesReference": { + "link": "https://localhost/mgmt/tm/ltm/virtual/~Common~test-virtual-server2/policies?ver=16.1.2", + "isSubcollection": true + }, + "profilesReference": { + "link": "https://localhost/mgmt/tm/ltm/virtual/~Common~test-virtual-server2/profiles?ver=16.1.2", + "isSubcollection": true + } + }, + { + "kind": "tm:ltm:virtual:virtualstate", + "name": "test-virtual-server3", + "partition": "Common", + "fullPath": "/Common/test-virtual-server3", + "generation": 220, + "selfLink": "https://localhost/mgmt/tm/ltm/virtual/~Common~test-virtual-server3?ver=16.1.2", + "addressStatus": "yes", + "autoLasthop": "default", + "cmpEnabled": "yes", + "connectionLimit": 0, + "creationTime": "2022-04-19T19:12:42Z", + "destination": "/Common/10.1.10.101:80", + "enabled": true, + "evictionProtected": "disabled", + "gtmScore": 0, + "ipProtocol": "tcp", + "lastModifiedTime": "2022-04-29T16:24:26Z", + "mask": "255.255.255.255", + "mirror": "disabled", + "mobileAppTunnel": "disabled", + "nat64": "disabled", + "pool": "/Common/test-pool-1", + "poolReference": { + "link": "https://localhost/mgmt/tm/ltm/pool/~Common~test-pool-1?ver=16.1.2" + }, + "rateLimit": "disabled", + "rateLimitDstMask": 0, + "rateLimitMode": "object", + "rateLimitSrcMask": 0, + "serversslUseSni": "disabled", + "serviceDownImmediateAction": "none", + "source": "0.0.0.0/0", + "sourceAddressTranslation": { + "type": "none" + }, + "sourcePort": "preserve", + "synCookieStatus": "not-activated", + "translateAddress": "enabled", + "translatePort": "enabled", + "vlansDisabled": true, + "vsIndex": 4, + "policiesReference": { + "link": "https://localhost/mgmt/tm/ltm/virtual/~Common~test-virtual-server3/policies?ver=16.1.2", + "isSubcollection": true + }, + "profilesReference": { + "link": "https://localhost/mgmt/tm/ltm/virtual/~Common~test-virtual-server3/profiles?ver=16.1.2", + "isSubcollection": true + } + }, + { + "kind": "tm:ltm:virtual:virtualstate", + "name": "stage", + "partition": "stage", + "fullPath": "/stage/stage", + "generation": 190, + "selfLink": "https://localhost/mgmt/tm/ltm/virtual/~stage~stage?ver=16.1.2", + "addressStatus": "yes", + "autoLasthop": "default", + "cmpEnabled": "yes", + "connectionLimit": 0, + "creationTime": "2022-04-29T13:37:21Z", + "destination": "/stage/10.1.2.1:21", + "enabled": true, + "evictionProtected": "disabled", + "gtmScore": 0, + "ipProtocol": "tcp", + "lastModifiedTime": "2022-04-29T13:37:21Z", + "mask": "255.255.255.255", + "mirror": "disabled", + "mobileAppTunnel": "disabled", + "nat64": "disabled", + "rateLimit": "disabled", + "rateLimitDstMask": 0, + "rateLimitMode": "object", + "rateLimitSrcMask": 0, + "serversslUseSni": "disabled", + "serviceDownImmediateAction": "none", + "source": "8.8.8.8/32", + "sourceAddressTranslation": { + "type": "none" + }, + "sourcePort": "preserve", + "synCookieStatus": "not-activated", + "translateAddress": "enabled", + "translatePort": "enabled", + "vlansDisabled": true, + "vsIndex": 6, + "policiesReference": { + "link": "https://localhost/mgmt/tm/ltm/virtual/~stage~stage/policies?ver=16.1.2", + "isSubcollection": true + }, + "profilesReference": { + "link": "https://localhost/mgmt/tm/ltm/virtual/~stage~stage/profiles?ver=16.1.2", + "isSubcollection": true + } + } + ] +} diff --git a/receiver/bigipreceiver/testdata/apiresponses/get_virtual_servers_stats_response.json b/receiver/bigipreceiver/testdata/apiresponses/get_virtual_servers_stats_response.json new file mode 100644 index 000000000000..9d656d35b3cb --- /dev/null +++ b/receiver/bigipreceiver/testdata/apiresponses/get_virtual_servers_stats_response.json @@ -0,0 +1,614 @@ +{ + "kind": "tm:ltm:virtual:virtualcollectionstats", + "selfLink": "https://localhost/mgmt/tm/ltm/virtual/stats?ver=16.1.2", + "entries": { + "https://localhost/mgmt/tm/ltm/virtual/~Common~test-virtual-server1/stats": { + "nestedStats": { + "kind": "tm:ltm:virtual:virtualstats", + "selfLink": "https://localhost/mgmt/tm/ltm/virtual/~Common~test-virtual-server1/stats?ver=16.1.2", + "entries": { + "clientside.bitsIn": { + "value": 0 + }, + "clientside.bitsOut": { + "value": 0 + }, + "clientside.curConns": { + "value": 0 + }, + "clientside.evictedConns": { + "value": 0 + }, + "clientside.maxConns": { + "value": 0 + }, + "clientside.pktsIn": { + "value": 0 + }, + "clientside.pktsOut": { + "value": 0 + }, + "clientside.slowKilled": { + "value": 0 + }, + "clientside.totConns": { + "value": 0 + }, + "cmpEnableMode": { + "description": "all-cpus" + }, + "cmpEnabled": { + "description": "enabled" + }, + "csMaxConnDur": { + "value": 0 + }, + "csMeanConnDur": { + "value": 0 + }, + "csMinConnDur": { + "value": 0 + }, + "destination": { + "description": "10.1.10.100:80" + }, + "ephemeral.bitsIn": { + "value": 0 + }, + "ephemeral.bitsOut": { + "value": 0 + }, + "ephemeral.curConns": { + "value": 0 + }, + "ephemeral.evictedConns": { + "value": 0 + }, + "ephemeral.maxConns": { + "value": 0 + }, + "ephemeral.pktsIn": { + "value": 0 + }, + "ephemeral.pktsOut": { + "value": 0 + }, + "ephemeral.slowKilled": { + "value": 0 + }, + "ephemeral.totConns": { + "value": 0 + }, + "fiveMinAvgUsageRatio": { + "value": 0 + }, + "fiveSecAvgUsageRatio": { + "value": 0 + }, + "mr.msgIn": { + "value": 0 + }, + "mr.msgOut": { + "value": 0 + }, + "mr.reqIn": { + "value": 0 + }, + "mr.reqOut": { + "value": 0 + }, + "mr.respIn": { + "value": 0 + }, + "mr.respOut": { + "value": 0 + }, + "tmName": { + "description": "/Common/test-virtual-server1" + }, + "oneMinAvgUsageRatio": { + "value": 0 + }, + "status.availabilityState": { + "description": "offline" + }, + "status.enabledState": { + "description": "enabled" + }, + "status.statusReason": { + "description": "The children pool member(s) are down" + }, + "syncookieStatus": { + "description": "not-activated" + }, + "syncookie.accepts": { + "value": 0 + }, + "syncookie.hwAccepts": { + "value": 0 + }, + "syncookie.hwSyncookies": { + "value": 0 + }, + "syncookie.hwsyncookieInstance": { + "value": 0 + }, + "syncookie.rejects": { + "value": 0 + }, + "syncookie.swsyncookieInstance": { + "value": 0 + }, + "syncookie.syncacheCurr": { + "value": 0 + }, + "syncookie.syncacheOver": { + "value": 0 + }, + "syncookie.syncookies": { + "value": 0 + }, + "totRequests": { + "value": 0 + } + } + } + }, + "https://localhost/mgmt/tm/ltm/virtual/~Common~test-virtual-server2/stats": { + "nestedStats": { + "kind": "tm:ltm:virtual:virtualstats", + "selfLink": "https://localhost/mgmt/tm/ltm/virtual/~Common~test-virtual-server2/stats?ver=16.1.2", + "entries": { + "clientside.bitsIn": { + "value": 0 + }, + "clientside.bitsOut": { + "value": 0 + }, + "clientside.curConns": { + "value": 0 + }, + "clientside.evictedConns": { + "value": 0 + }, + "clientside.maxConns": { + "value": 0 + }, + "clientside.pktsIn": { + "value": 0 + }, + "clientside.pktsOut": { + "value": 0 + }, + "clientside.slowKilled": { + "value": 0 + }, + "clientside.totConns": { + "value": 0 + }, + "cmpEnableMode": { + "description": "all-cpus" + }, + "cmpEnabled": { + "description": "enabled" + }, + "csMaxConnDur": { + "value": 0 + }, + "csMeanConnDur": { + "value": 0 + }, + "csMinConnDur": { + "value": 0 + }, + "destination": { + "description": "10.1.10.100:21" + }, + "ephemeral.bitsIn": { + "value": 0 + }, + "ephemeral.bitsOut": { + "value": 0 + }, + "ephemeral.curConns": { + "value": 0 + }, + "ephemeral.evictedConns": { + "value": 0 + }, + "ephemeral.maxConns": { + "value": 0 + }, + "ephemeral.pktsIn": { + "value": 0 + }, + "ephemeral.pktsOut": { + "value": 0 + }, + "ephemeral.slowKilled": { + "value": 0 + }, + "ephemeral.totConns": { + "value": 0 + }, + "fiveMinAvgUsageRatio": { + "value": 0 + }, + "fiveSecAvgUsageRatio": { + "value": 0 + }, + "mr.msgIn": { + "value": 0 + }, + "mr.msgOut": { + "value": 0 + }, + "mr.reqIn": { + "value": 0 + }, + "mr.reqOut": { + "value": 0 + }, + "mr.respIn": { + "value": 0 + }, + "mr.respOut": { + "value": 0 + }, + "tmName": { + "description": "/Common/test-virtual-server2" + }, + "oneMinAvgUsageRatio": { + "value": 0 + }, + "status.availabilityState": { + "description": "available" + }, + "status.enabledState": { + "description": "disabled-by-parent" + }, + "status.statusReason": { + "description": "The children pool member(s) might be disabled" + }, + "syncookieStatus": { + "description": "not-activated" + }, + "syncookie.accepts": { + "value": 0 + }, + "syncookie.hwAccepts": { + "value": 0 + }, + "syncookie.hwSyncookies": { + "value": 0 + }, + "syncookie.hwsyncookieInstance": { + "value": 0 + }, + "syncookie.rejects": { + "value": 0 + }, + "syncookie.swsyncookieInstance": { + "value": 0 + }, + "syncookie.syncacheCurr": { + "value": 0 + }, + "syncookie.syncacheOver": { + "value": 0 + }, + "syncookie.syncookies": { + "value": 0 + }, + "totRequests": { + "value": 0 + } + } + } + }, + "https://localhost/mgmt/tm/ltm/virtual/~Common~test-virtual-server3/stats": { + "nestedStats": { + "kind": "tm:ltm:virtual:virtualstats", + "selfLink": "https://localhost/mgmt/tm/ltm/virtual/~Common~test-virtual-server3/stats?ver=16.1.2", + "entries": { + "clientside.bitsIn": { + "value": 0 + }, + "clientside.bitsOut": { + "value": 0 + }, + "clientside.curConns": { + "value": 0 + }, + "clientside.evictedConns": { + "value": 0 + }, + "clientside.maxConns": { + "value": 0 + }, + "clientside.pktsIn": { + "value": 0 + }, + "clientside.pktsOut": { + "value": 0 + }, + "clientside.slowKilled": { + "value": 0 + }, + "clientside.totConns": { + "value": 0 + }, + "cmpEnableMode": { + "description": "all-cpus" + }, + "cmpEnabled": { + "description": "enabled" + }, + "csMaxConnDur": { + "value": 0 + }, + "csMeanConnDur": { + "value": 0 + }, + "csMinConnDur": { + "value": 0 + }, + "destination": { + "description": "10.1.10.101:80" + }, + "ephemeral.bitsIn": { + "value": 0 + }, + "ephemeral.bitsOut": { + "value": 0 + }, + "ephemeral.curConns": { + "value": 0 + }, + "ephemeral.evictedConns": { + "value": 0 + }, + "ephemeral.maxConns": { + "value": 0 + }, + "ephemeral.pktsIn": { + "value": 0 + }, + "ephemeral.pktsOut": { + "value": 0 + }, + "ephemeral.slowKilled": { + "value": 0 + }, + "ephemeral.totConns": { + "value": 0 + }, + "fiveMinAvgUsageRatio": { + "value": 0 + }, + "fiveSecAvgUsageRatio": { + "value": 0 + }, + "mr.msgIn": { + "value": 0 + }, + "mr.msgOut": { + "value": 0 + }, + "mr.reqIn": { + "value": 0 + }, + "mr.reqOut": { + "value": 0 + }, + "mr.respIn": { + "value": 0 + }, + "mr.respOut": { + "value": 0 + }, + "tmName": { + "description": "/Common/test-virtual-server3" + }, + "oneMinAvgUsageRatio": { + "value": 0 + }, + "status.availabilityState": { + "description": "available" + }, + "status.enabledState": { + "description": "disabled-by-parent" + }, + "status.statusReason": { + "description": "The children pool member(s) might be disabled" + }, + "syncookieStatus": { + "description": "not-activated" + }, + "syncookie.accepts": { + "value": 0 + }, + "syncookie.hwAccepts": { + "value": 0 + }, + "syncookie.hwSyncookies": { + "value": 0 + }, + "syncookie.hwsyncookieInstance": { + "value": 0 + }, + "syncookie.rejects": { + "value": 0 + }, + "syncookie.swsyncookieInstance": { + "value": 0 + }, + "syncookie.syncacheCurr": { + "value": 0 + }, + "syncookie.syncacheOver": { + "value": 0 + }, + "syncookie.syncookies": { + "value": 0 + }, + "totRequests": { + "value": 0 + } + } + } + }, + "https://localhost/mgmt/tm/ltm/virtual/~stage~stage/stats": { + "nestedStats": { + "kind": "tm:ltm:virtual:virtualstats", + "selfLink": "https://localhost/mgmt/tm/ltm/virtual/~stage~stage/stats?ver=16.1.2", + "entries": { + "clientside.bitsIn": { + "value": 0 + }, + "clientside.bitsOut": { + "value": 0 + }, + "clientside.curConns": { + "value": 0 + }, + "clientside.evictedConns": { + "value": 0 + }, + "clientside.maxConns": { + "value": 0 + }, + "clientside.pktsIn": { + "value": 0 + }, + "clientside.pktsOut": { + "value": 0 + }, + "clientside.slowKilled": { + "value": 0 + }, + "clientside.totConns": { + "value": 0 + }, + "cmpEnableMode": { + "description": "all-cpus" + }, + "cmpEnabled": { + "description": "enabled" + }, + "csMaxConnDur": { + "value": 0 + }, + "csMeanConnDur": { + "value": 0 + }, + "csMinConnDur": { + "value": 0 + }, + "destination": { + "description": "10.1.2.1:21" + }, + "ephemeral.bitsIn": { + "value": 0 + }, + "ephemeral.bitsOut": { + "value": 0 + }, + "ephemeral.curConns": { + "value": 0 + }, + "ephemeral.evictedConns": { + "value": 0 + }, + "ephemeral.maxConns": { + "value": 0 + }, + "ephemeral.pktsIn": { + "value": 0 + }, + "ephemeral.pktsOut": { + "value": 0 + }, + "ephemeral.slowKilled": { + "value": 0 + }, + "ephemeral.totConns": { + "value": 0 + }, + "fiveMinAvgUsageRatio": { + "value": 0 + }, + "fiveSecAvgUsageRatio": { + "value": 0 + }, + "mr.msgIn": { + "value": 0 + }, + "mr.msgOut": { + "value": 0 + }, + "mr.reqIn": { + "value": 0 + }, + "mr.reqOut": { + "value": 0 + }, + "mr.respIn": { + "value": 0 + }, + "mr.respOut": { + "value": 0 + }, + "tmName": { + "description": "/stage/stage" + }, + "oneMinAvgUsageRatio": { + "value": 0 + }, + "status.availabilityState": { + "description": "unknown" + }, + "status.enabledState": { + "description": "enabled" + }, + "status.statusReason": { + "description": "The children pool member(s) either don't have service checking enabled, or service check results are not available yet" + }, + "syncookieStatus": { + "description": "not-activated" + }, + "syncookie.accepts": { + "value": 0 + }, + "syncookie.hwAccepts": { + "value": 0 + }, + "syncookie.hwSyncookies": { + "value": 0 + }, + "syncookie.hwsyncookieInstance": { + "value": 0 + }, + "syncookie.rejects": { + "value": 0 + }, + "syncookie.swsyncookieInstance": { + "value": 0 + }, + "syncookie.syncacheCurr": { + "value": 0 + }, + "syncookie.syncacheOver": { + "value": 0 + }, + "syncookie.syncookies": { + "value": 0 + }, + "totRequests": { + "value": 0 + } + } + } + } + } +} diff --git a/receiver/bigipreceiver/testdata/apiresponses/pool_members_combined.json b/receiver/bigipreceiver/testdata/apiresponses/pool_members_combined.json new file mode 100644 index 000000000000..f81308b73540 --- /dev/null +++ b/receiver/bigipreceiver/testdata/apiresponses/pool_members_combined.json @@ -0,0 +1,511 @@ +{ + "kind": "tm:ltm:pool:members:memberscollectionstats", + "selfLink": "https://localhost/mgmt/tm/ltm/pool/~Common~dev/members/stats?ver=16.1.2", + "entries": { + "https://localhost/mgmt/tm/ltm/pool/~Common~dev/members/~Common~dev:80/stats": { + "nestedStats": { + "kind": "tm:ltm:pool:members:membersstats", + "selfLink": "https://localhost/mgmt/tm/ltm/pool/~Common~dev/members/~Common~dev:80/stats?ver=16.1.2", + "entries": { + "addr": { + "description": "10.33.104.2" + }, + "connq.ageEdm": { + "value": 0 + }, + "connq.ageEma": { + "value": 0 + }, + "connq.ageHead": { + "value": 0 + }, + "connq.ageMax": { + "value": 0 + }, + "connq.depth": { + "value": 0 + }, + "connq.serviced": { + "value": 0 + }, + "curSessions": { + "value": 0 + }, + "monitorRule": { + "description": "/Common/http (pool monitor)" + }, + "monitorStatus": { + "description": "down" + }, + "mr.msgIn": { + "value": 0 + }, + "mr.msgOut": { + "value": 0 + }, + "mr.reqIn": { + "value": 0 + }, + "mr.reqOut": { + "value": 0 + }, + "mr.respIn": { + "value": 0 + }, + "mr.respOut": { + "value": 0 + }, + "nodeName": { + "description": "/Common/dev" + }, + "poolName": { + "description": "/Common/dev" + }, + "port": { + "value": 80 + }, + "serverside.bitsIn": { + "value": 0 + }, + "serverside.bitsOut": { + "value": 0 + }, + "serverside.curConns": { + "value": 0 + }, + "serverside.maxConns": { + "value": 0 + }, + "serverside.pktsIn": { + "value": 0 + }, + "serverside.pktsOut": { + "value": 0 + }, + "serverside.totConns": { + "value": 0 + }, + "sessionStatus": { + "description": "enabled" + }, + "status.availabilityState": { + "description": "offline" + }, + "status.enabledState": { + "description": "enabled" + }, + "status.statusReason": { + "description": "/Common/http: No successful responses received before deadline. @2022/04/29 08:33:56. " + }, + "totRequests": { + "value": 0 + } + } + } + }, + "https://localhost/mgmt/tm/ltm/pool/~Common~test-pool-1/members/~Common~nginx:80/stats": { + "nestedStats": { + "kind": "tm:ltm:pool:members:membersstats", + "selfLink": "https://localhost/mgmt/tm/ltm/pool/~Common~test-pool-1/members/~Common~nginx:80/stats?ver=16.1.2", + "entries": { + "addr": { + "description": "10.33.121.108" + }, + "connq.ageEdm": { + "value": 0 + }, + "connq.ageEma": { + "value": 0 + }, + "connq.ageHead": { + "value": 0 + }, + "connq.ageMax": { + "value": 0 + }, + "connq.depth": { + "value": 0 + }, + "connq.serviced": { + "value": 0 + }, + "curSessions": { + "value": 0 + }, + "monitorRule": { + "description": "/Common/http (pool monitor)" + }, + "monitorStatus": { + "description": "up" + }, + "mr.msgIn": { + "value": 0 + }, + "mr.msgOut": { + "value": 0 + }, + "mr.reqIn": { + "value": 0 + }, + "mr.reqOut": { + "value": 0 + }, + "mr.respIn": { + "value": 0 + }, + "mr.respOut": { + "value": 0 + }, + "nodeName": { + "description": "/Common/nginx" + }, + "poolName": { + "description": "/Common/test-pool-1" + }, + "port": { + "value": 80 + }, + "serverside.bitsIn": { + "value": 0 + }, + "serverside.bitsOut": { + "value": 0 + }, + "serverside.curConns": { + "value": 0 + }, + "serverside.maxConns": { + "value": 0 + }, + "serverside.pktsIn": { + "value": 0 + }, + "serverside.pktsOut": { + "value": 0 + }, + "serverside.totConns": { + "value": 0 + }, + "sessionStatus": { + "description": "user-disabled" + }, + "status.availabilityState": { + "description": "available" + }, + "status.enabledState": { + "description": "disabled" + }, + "status.statusReason": { + "description": "Pool member is available, user disabled" + }, + "totRequests": { + "value": 0 + } + } + } + }, + "https://localhost/mgmt/tm/ltm/pool/~Common~test-pool-1/members/~Common~test-node-1:80/stats": { + "nestedStats": { + "kind": "tm:ltm:pool:members:membersstats", + "selfLink": "https://localhost/mgmt/tm/ltm/pool/~Common~test-pool-1/members/~Common~test-node-1:80/stats?ver=16.1.2", + "entries": { + "addr": { + "description": "10.0.0.1" + }, + "connq.ageEdm": { + "value": 0 + }, + "connq.ageEma": { + "value": 0 + }, + "connq.ageHead": { + "value": 0 + }, + "connq.ageMax": { + "value": 0 + }, + "connq.depth": { + "value": 0 + }, + "connq.serviced": { + "value": 0 + }, + "curSessions": { + "value": 0 + }, + "monitorRule": { + "description": "/Common/http (pool monitor)" + }, + "monitorStatus": { + "description": "down" + }, + "mr.msgIn": { + "value": 0 + }, + "mr.msgOut": { + "value": 0 + }, + "mr.reqIn": { + "value": 0 + }, + "mr.reqOut": { + "value": 0 + }, + "mr.respIn": { + "value": 0 + }, + "mr.respOut": { + "value": 0 + }, + "nodeName": { + "description": "/Common/test-node-1" + }, + "poolName": { + "description": "/Common/test-pool-1" + }, + "port": { + "value": 80 + }, + "serverside.bitsIn": { + "value": 0 + }, + "serverside.bitsOut": { + "value": 0 + }, + "serverside.curConns": { + "value": 0 + }, + "serverside.maxConns": { + "value": 0 + }, + "serverside.pktsIn": { + "value": 0 + }, + "serverside.pktsOut": { + "value": 0 + }, + "serverside.totConns": { + "value": 0 + }, + "sessionStatus": { + "description": "user-disabled" + }, + "status.availabilityState": { + "description": "offline" + }, + "status.enabledState": { + "description": "disabled" + }, + "status.statusReason": { + "description": "/Common/http: No successful responses received before deadline. @2022/04/29 08:13:38. " + }, + "totRequests": { + "value": 0 + } + } + } + }, + "https://localhost/mgmt/tm/ltm/pool/~Common~test-pool-1/members/~Common~test-node-2:80/stats": { + "nestedStats": { + "kind": "tm:ltm:pool:members:membersstats", + "selfLink": "https://localhost/mgmt/tm/ltm/pool/~Common~test-pool-1/members/~Common~test-node-2:80/stats?ver=16.1.2", + "entries": { + "addr": { + "description": "10.0.0.2" + }, + "connq.ageEdm": { + "value": 0 + }, + "connq.ageEma": { + "value": 0 + }, + "connq.ageHead": { + "value": 0 + }, + "connq.ageMax": { + "value": 0 + }, + "connq.depth": { + "value": 0 + }, + "connq.serviced": { + "value": 0 + }, + "curSessions": { + "value": 0 + }, + "monitorRule": { + "description": "/Common/http (pool monitor)" + }, + "monitorStatus": { + "description": "down" + }, + "mr.msgIn": { + "value": 0 + }, + "mr.msgOut": { + "value": 0 + }, + "mr.reqIn": { + "value": 0 + }, + "mr.reqOut": { + "value": 0 + }, + "mr.respIn": { + "value": 0 + }, + "mr.respOut": { + "value": 0 + }, + "nodeName": { + "description": "/Common/test-node-2" + }, + "poolName": { + "description": "/Common/test-pool-1" + }, + "port": { + "value": 80 + }, + "serverside.bitsIn": { + "value": 0 + }, + "serverside.bitsOut": { + "value": 0 + }, + "serverside.curConns": { + "value": 0 + }, + "serverside.maxConns": { + "value": 0 + }, + "serverside.pktsIn": { + "value": 0 + }, + "serverside.pktsOut": { + "value": 0 + }, + "serverside.totConns": { + "value": 0 + }, + "sessionStatus": { + "description": "user-disabled" + }, + "status.availabilityState": { + "description": "offline" + }, + "status.enabledState": { + "description": "disabled" + }, + "status.statusReason": { + "description": "/Common/http: No successful responses received before deadline. @2022/04/29 08:13:38. " + }, + "totRequests": { + "value": 0 + } + } + } + }, + "https://localhost/mgmt/tm/ltm/pool/~Common~test-pool-1/members/~Common~test-node-3:80/stats": { + "nestedStats": { + "kind": "tm:ltm:pool:members:membersstats", + "selfLink": "https://localhost/mgmt/tm/ltm/pool/~Common~test-pool-1/members/~Common~test-node-3:80/stats?ver=16.1.2", + "entries": { + "addr": { + "description": "10.0.0.3" + }, + "connq.ageEdm": { + "value": 0 + }, + "connq.ageEma": { + "value": 0 + }, + "connq.ageHead": { + "value": 0 + }, + "connq.ageMax": { + "value": 0 + }, + "connq.depth": { + "value": 0 + }, + "connq.serviced": { + "value": 0 + }, + "curSessions": { + "value": 0 + }, + "monitorRule": { + "description": "/Common/http (pool monitor)" + }, + "monitorStatus": { + "description": "down" + }, + "mr.msgIn": { + "value": 0 + }, + "mr.msgOut": { + "value": 0 + }, + "mr.reqIn": { + "value": 0 + }, + "mr.reqOut": { + "value": 0 + }, + "mr.respIn": { + "value": 0 + }, + "mr.respOut": { + "value": 0 + }, + "nodeName": { + "description": "/Common/test-node-3" + }, + "poolName": { + "description": "/Common/test-pool-1" + }, + "port": { + "value": 80 + }, + "serverside.bitsIn": { + "value": 0 + }, + "serverside.bitsOut": { + "value": 0 + }, + "serverside.curConns": { + "value": 0 + }, + "serverside.maxConns": { + "value": 0 + }, + "serverside.pktsIn": { + "value": 0 + }, + "serverside.pktsOut": { + "value": 0 + }, + "serverside.totConns": { + "value": 0 + }, + "sessionStatus": { + "description": "user-disabled" + }, + "status.availabilityState": { + "description": "offline" + }, + "status.enabledState": { + "description": "disabled" + }, + "status.statusReason": { + "description": "/Common/http: No successful responses received before deadline. @2022/04/29 08:13:38. " + }, + "totRequests": { + "value": 0 + } + } + } + } + } +} diff --git a/receiver/bigipreceiver/testdata/apiresponses/post_login_response.json b/receiver/bigipreceiver/testdata/apiresponses/post_login_response.json new file mode 100644 index 000000000000..46776529f8f9 --- /dev/null +++ b/receiver/bigipreceiver/testdata/apiresponses/post_login_response.json @@ -0,0 +1,27 @@ +{ + "username": "otelu", + "loginReference": { + "link": "https://localhost/mgmt/cm/system/authn/providers/tmos/1f44a60e-11a7-3c51-a49f-82983026b41b/login" + }, + "loginProviderName": "tmos", + "token": { + "token": "B4AVPABIMSBSOH4CAQAKU64KGD", + "name": "B4AVPABIMSBSOH4CAQAKU64KGD", + "userName": "otelu", + "authProviderName": "tmos", + "user": { + "link": "https://localhost/mgmt/shared/authz/users/otelu" + }, + "timeout": 1200, + "startTime": "2022-05-04T10:38:22.523-0700", + "address": "10.66.8.2", + "partition": "[All]", + "generation": 1, + "lastUpdateMicros": 1651685902523302, + "expirationMicros": 1651687102523000, + "kind": "shared:authz:tokens:authtokenitemstate", + "selfLink": "https://localhost/mgmt/shared/authz/tokens/B4AVPABIMSBSOH4CAQAKU64KGD" + }, + "generation": 0, + "lastUpdateMicros": 0 +} diff --git a/receiver/bigipreceiver/testdata/apiresponses/virtual_servers_combined.json b/receiver/bigipreceiver/testdata/apiresponses/virtual_servers_combined.json new file mode 100644 index 000000000000..b63db63f86bd --- /dev/null +++ b/receiver/bigipreceiver/testdata/apiresponses/virtual_servers_combined.json @@ -0,0 +1,623 @@ +{ + "kind": "tm:ltm:virtual:virtualcollectionstats", + "selfLink": "https://localhost/mgmt/tm/ltm/virtual/stats?ver=16.1.2", + "entries": { + "https://localhost/mgmt/tm/ltm/virtual/~Common~test-virtual-server1/stats": { + "nestedStats": { + "kind": "tm:ltm:virtual:virtualstats", + "selfLink": "https://localhost/mgmt/tm/ltm/virtual/~Common~test-virtual-server1/stats?ver=16.1.2", + "entries": { + "poolName": { + "description": "/Common/dev" + }, + "clientside.bitsIn": { + "value": 0 + }, + "clientside.bitsOut": { + "value": 0 + }, + "clientside.curConns": { + "value": 0 + }, + "clientside.evictedConns": { + "value": 0 + }, + "clientside.maxConns": { + "value": 0 + }, + "clientside.pktsIn": { + "value": 0 + }, + "clientside.pktsOut": { + "value": 0 + }, + "clientside.slowKilled": { + "value": 0 + }, + "clientside.totConns": { + "value": 0 + }, + "cmpEnableMode": { + "description": "all-cpus" + }, + "cmpEnabled": { + "description": "enabled" + }, + "csMaxConnDur": { + "value": 0 + }, + "csMeanConnDur": { + "value": 0 + }, + "csMinConnDur": { + "value": 0 + }, + "destination": { + "description": "10.1.10.100:80" + }, + "ephemeral.bitsIn": { + "value": 0 + }, + "ephemeral.bitsOut": { + "value": 0 + }, + "ephemeral.curConns": { + "value": 0 + }, + "ephemeral.evictedConns": { + "value": 0 + }, + "ephemeral.maxConns": { + "value": 0 + }, + "ephemeral.pktsIn": { + "value": 0 + }, + "ephemeral.pktsOut": { + "value": 0 + }, + "ephemeral.slowKilled": { + "value": 0 + }, + "ephemeral.totConns": { + "value": 0 + }, + "fiveMinAvgUsageRatio": { + "value": 0 + }, + "fiveSecAvgUsageRatio": { + "value": 0 + }, + "mr.msgIn": { + "value": 0 + }, + "mr.msgOut": { + "value": 0 + }, + "mr.reqIn": { + "value": 0 + }, + "mr.reqOut": { + "value": 0 + }, + "mr.respIn": { + "value": 0 + }, + "mr.respOut": { + "value": 0 + }, + "tmName": { + "description": "/Common/test-virtual-server1" + }, + "oneMinAvgUsageRatio": { + "value": 0 + }, + "status.availabilityState": { + "description": "offline" + }, + "status.enabledState": { + "description": "enabled" + }, + "status.statusReason": { + "description": "The children pool member(s) are down" + }, + "syncookieStatus": { + "description": "not-activated" + }, + "syncookie.accepts": { + "value": 0 + }, + "syncookie.hwAccepts": { + "value": 0 + }, + "syncookie.hwSyncookies": { + "value": 0 + }, + "syncookie.hwsyncookieInstance": { + "value": 0 + }, + "syncookie.rejects": { + "value": 0 + }, + "syncookie.swsyncookieInstance": { + "value": 0 + }, + "syncookie.syncacheCurr": { + "value": 0 + }, + "syncookie.syncacheOver": { + "value": 0 + }, + "syncookie.syncookies": { + "value": 0 + }, + "totRequests": { + "value": 0 + } + } + } + }, + "https://localhost/mgmt/tm/ltm/virtual/~Common~test-virtual-server2/stats": { + "nestedStats": { + "kind": "tm:ltm:virtual:virtualstats", + "selfLink": "https://localhost/mgmt/tm/ltm/virtual/~Common~test-virtual-server2/stats?ver=16.1.2", + "entries": { + "poolName": { + "description": "/Common/test-pool-1" + }, + "clientside.bitsIn": { + "value": 0 + }, + "clientside.bitsOut": { + "value": 0 + }, + "clientside.curConns": { + "value": 0 + }, + "clientside.evictedConns": { + "value": 0 + }, + "clientside.maxConns": { + "value": 0 + }, + "clientside.pktsIn": { + "value": 0 + }, + "clientside.pktsOut": { + "value": 0 + }, + "clientside.slowKilled": { + "value": 0 + }, + "clientside.totConns": { + "value": 0 + }, + "cmpEnableMode": { + "description": "all-cpus" + }, + "cmpEnabled": { + "description": "enabled" + }, + "csMaxConnDur": { + "value": 0 + }, + "csMeanConnDur": { + "value": 0 + }, + "csMinConnDur": { + "value": 0 + }, + "destination": { + "description": "10.1.10.100:21" + }, + "ephemeral.bitsIn": { + "value": 0 + }, + "ephemeral.bitsOut": { + "value": 0 + }, + "ephemeral.curConns": { + "value": 0 + }, + "ephemeral.evictedConns": { + "value": 0 + }, + "ephemeral.maxConns": { + "value": 0 + }, + "ephemeral.pktsIn": { + "value": 0 + }, + "ephemeral.pktsOut": { + "value": 0 + }, + "ephemeral.slowKilled": { + "value": 0 + }, + "ephemeral.totConns": { + "value": 0 + }, + "fiveMinAvgUsageRatio": { + "value": 0 + }, + "fiveSecAvgUsageRatio": { + "value": 0 + }, + "mr.msgIn": { + "value": 0 + }, + "mr.msgOut": { + "value": 0 + }, + "mr.reqIn": { + "value": 0 + }, + "mr.reqOut": { + "value": 0 + }, + "mr.respIn": { + "value": 0 + }, + "mr.respOut": { + "value": 0 + }, + "tmName": { + "description": "/Common/test-virtual-server2" + }, + "oneMinAvgUsageRatio": { + "value": 0 + }, + "status.availabilityState": { + "description": "available" + }, + "status.enabledState": { + "description": "disabled-by-parent" + }, + "status.statusReason": { + "description": "The children pool member(s) might be disabled" + }, + "syncookieStatus": { + "description": "not-activated" + }, + "syncookie.accepts": { + "value": 0 + }, + "syncookie.hwAccepts": { + "value": 0 + }, + "syncookie.hwSyncookies": { + "value": 0 + }, + "syncookie.hwsyncookieInstance": { + "value": 0 + }, + "syncookie.rejects": { + "value": 0 + }, + "syncookie.swsyncookieInstance": { + "value": 0 + }, + "syncookie.syncacheCurr": { + "value": 0 + }, + "syncookie.syncacheOver": { + "value": 0 + }, + "syncookie.syncookies": { + "value": 0 + }, + "totRequests": { + "value": 0 + } + } + } + }, + "https://localhost/mgmt/tm/ltm/virtual/~Common~test-virtual-server3/stats": { + "nestedStats": { + "kind": "tm:ltm:virtual:virtualstats", + "selfLink": "https://localhost/mgmt/tm/ltm/virtual/~Common~test-virtual-server3/stats?ver=16.1.2", + "entries": { + "poolName": { + "description": "/Common/test-pool-1" + }, + "clientside.bitsIn": { + "value": 0 + }, + "clientside.bitsOut": { + "value": 0 + }, + "clientside.curConns": { + "value": 0 + }, + "clientside.evictedConns": { + "value": 0 + }, + "clientside.maxConns": { + "value": 0 + }, + "clientside.pktsIn": { + "value": 0 + }, + "clientside.pktsOut": { + "value": 0 + }, + "clientside.slowKilled": { + "value": 0 + }, + "clientside.totConns": { + "value": 0 + }, + "cmpEnableMode": { + "description": "all-cpus" + }, + "cmpEnabled": { + "description": "enabled" + }, + "csMaxConnDur": { + "value": 0 + }, + "csMeanConnDur": { + "value": 0 + }, + "csMinConnDur": { + "value": 0 + }, + "destination": { + "description": "10.1.10.101:80" + }, + "ephemeral.bitsIn": { + "value": 0 + }, + "ephemeral.bitsOut": { + "value": 0 + }, + "ephemeral.curConns": { + "value": 0 + }, + "ephemeral.evictedConns": { + "value": 0 + }, + "ephemeral.maxConns": { + "value": 0 + }, + "ephemeral.pktsIn": { + "value": 0 + }, + "ephemeral.pktsOut": { + "value": 0 + }, + "ephemeral.slowKilled": { + "value": 0 + }, + "ephemeral.totConns": { + "value": 0 + }, + "fiveMinAvgUsageRatio": { + "value": 0 + }, + "fiveSecAvgUsageRatio": { + "value": 0 + }, + "mr.msgIn": { + "value": 0 + }, + "mr.msgOut": { + "value": 0 + }, + "mr.reqIn": { + "value": 0 + }, + "mr.reqOut": { + "value": 0 + }, + "mr.respIn": { + "value": 0 + }, + "mr.respOut": { + "value": 0 + }, + "tmName": { + "description": "/Common/test-virtual-server3" + }, + "oneMinAvgUsageRatio": { + "value": 0 + }, + "status.availabilityState": { + "description": "available" + }, + "status.enabledState": { + "description": "disabled-by-parent" + }, + "status.statusReason": { + "description": "The children pool member(s) might be disabled" + }, + "syncookieStatus": { + "description": "not-activated" + }, + "syncookie.accepts": { + "value": 0 + }, + "syncookie.hwAccepts": { + "value": 0 + }, + "syncookie.hwSyncookies": { + "value": 0 + }, + "syncookie.hwsyncookieInstance": { + "value": 0 + }, + "syncookie.rejects": { + "value": 0 + }, + "syncookie.swsyncookieInstance": { + "value": 0 + }, + "syncookie.syncacheCurr": { + "value": 0 + }, + "syncookie.syncacheOver": { + "value": 0 + }, + "syncookie.syncookies": { + "value": 0 + }, + "totRequests": { + "value": 0 + } + } + } + }, + "https://localhost/mgmt/tm/ltm/virtual/~stage~stage/stats": { + "nestedStats": { + "kind": "tm:ltm:virtual:virtualstats", + "selfLink": "https://localhost/mgmt/tm/ltm/virtual/~stage~stage/stats?ver=16.1.2", + "entries": { + "clientside.bitsIn": { + "value": 0 + }, + "clientside.bitsOut": { + "value": 0 + }, + "clientside.curConns": { + "value": 0 + }, + "clientside.evictedConns": { + "value": 0 + }, + "clientside.maxConns": { + "value": 0 + }, + "clientside.pktsIn": { + "value": 0 + }, + "clientside.pktsOut": { + "value": 0 + }, + "clientside.slowKilled": { + "value": 0 + }, + "clientside.totConns": { + "value": 0 + }, + "cmpEnableMode": { + "description": "all-cpus" + }, + "cmpEnabled": { + "description": "enabled" + }, + "csMaxConnDur": { + "value": 0 + }, + "csMeanConnDur": { + "value": 0 + }, + "csMinConnDur": { + "value": 0 + }, + "destination": { + "description": "10.1.2.1:21" + }, + "ephemeral.bitsIn": { + "value": 0 + }, + "ephemeral.bitsOut": { + "value": 0 + }, + "ephemeral.curConns": { + "value": 0 + }, + "ephemeral.evictedConns": { + "value": 0 + }, + "ephemeral.maxConns": { + "value": 0 + }, + "ephemeral.pktsIn": { + "value": 0 + }, + "ephemeral.pktsOut": { + "value": 0 + }, + "ephemeral.slowKilled": { + "value": 0 + }, + "ephemeral.totConns": { + "value": 0 + }, + "fiveMinAvgUsageRatio": { + "value": 0 + }, + "fiveSecAvgUsageRatio": { + "value": 0 + }, + "mr.msgIn": { + "value": 0 + }, + "mr.msgOut": { + "value": 0 + }, + "mr.reqIn": { + "value": 0 + }, + "mr.reqOut": { + "value": 0 + }, + "mr.respIn": { + "value": 0 + }, + "mr.respOut": { + "value": 0 + }, + "tmName": { + "description": "/stage/stage" + }, + "oneMinAvgUsageRatio": { + "value": 0 + }, + "status.availabilityState": { + "description": "unknown" + }, + "status.enabledState": { + "description": "enabled" + }, + "status.statusReason": { + "description": "The children pool member(s) either don't have service checking enabled, or service check results are not available yet" + }, + "syncookieStatus": { + "description": "not-activated" + }, + "syncookie.accepts": { + "value": 0 + }, + "syncookie.hwAccepts": { + "value": 0 + }, + "syncookie.hwSyncookies": { + "value": 0 + }, + "syncookie.hwsyncookieInstance": { + "value": 0 + }, + "syncookie.rejects": { + "value": 0 + }, + "syncookie.swsyncookieInstance": { + "value": 0 + }, + "syncookie.syncacheCurr": { + "value": 0 + }, + "syncookie.syncacheOver": { + "value": 0 + }, + "syncookie.syncookies": { + "value": 0 + }, + "totRequests": { + "value": 0 + } + } + } + } + } +} diff --git a/receiver/bigipreceiver/testdata/expected_metrics/metrics_empty_golden.json b/receiver/bigipreceiver/testdata/expected_metrics/metrics_empty_golden.json new file mode 100644 index 000000000000..0967ef424bce --- /dev/null +++ b/receiver/bigipreceiver/testdata/expected_metrics/metrics_empty_golden.json @@ -0,0 +1 @@ +{} diff --git a/receiver/bigipreceiver/testdata/expected_metrics/metrics_golden.json b/receiver/bigipreceiver/testdata/expected_metrics/metrics_golden.json new file mode 100644 index 000000000000..951ffe9bc8e3 --- /dev/null +++ b/receiver/bigipreceiver/testdata/expected_metrics/metrics_golden.json @@ -0,0 +1,3708 @@ +{ + "resourceMetrics": [ + { + "resource": { + "attributes": [ + { + "key": "bigip.virtual_server.name", + "value": { + "stringValue": "/Common/test-virtual-server2" + } + }, + { + "key": "bigip.virtual_server.destination", + "value": { + "stringValue": "10.1.10.100:21" + } + }, + { + "key": "bigip.pool.name", + "value": { + "stringValue": "/Common/test-pool-1" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the virtual server.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.virtual_server.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the virtual server.", + "name": "bigip.virtual_server.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the virtual server.", + "name": "bigip.virtual_server.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the virtual server.", + "gauge": { + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.virtual_server.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the virtual server.", + "name": "bigip.virtual_server.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the virtual server.", + "name": "bigip.virtual_server.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.virtual_server.name", + "value": { + "stringValue": "/Common/test-virtual-server3" + } + }, + { + "key": "bigip.virtual_server.destination", + "value": { + "stringValue": "10.1.10.101:80" + } + }, + { + "key": "bigip.pool.name", + "value": { + "stringValue": "/Common/test-pool-1" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the virtual server.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.virtual_server.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the virtual server.", + "name": "bigip.virtual_server.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the virtual server.", + "name": "bigip.virtual_server.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the virtual server.", + "gauge": { + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.virtual_server.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the virtual server.", + "name": "bigip.virtual_server.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the virtual server.", + "name": "bigip.virtual_server.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.virtual_server.name", + "value": { + "stringValue": "/stage/stage" + } + }, + { + "key": "bigip.virtual_server.destination", + "value": { + "stringValue": "10.1.2.1:21" + } + }, + { + "key": "bigip.pool.name", + "value": { + "stringValue": "" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the virtual server.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.virtual_server.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the virtual server.", + "name": "bigip.virtual_server.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the virtual server.", + "name": "bigip.virtual_server.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the virtual server.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.virtual_server.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the virtual server.", + "name": "bigip.virtual_server.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the virtual server.", + "name": "bigip.virtual_server.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.virtual_server.name", + "value": { + "stringValue": "/Common/test-virtual-server1" + } + }, + { + "key": "bigip.virtual_server.destination", + "value": { + "stringValue": "10.1.10.100:80" + } + }, + { + "key": "bigip.pool.name", + "value": { + "stringValue": "/Common/dev" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the virtual server.", + "gauge": { + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.virtual_server.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the virtual server.", + "name": "bigip.virtual_server.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the virtual server.", + "name": "bigip.virtual_server.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the virtual server.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.virtual_server.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the virtual server.", + "name": "bigip.virtual_server.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the virtual server.", + "name": "bigip.virtual_server.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.pool.name", + "value": { + "stringValue": "/Common/dev" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the pool.", + "gauge": { + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.pool.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the pool.", + "name": "bigip.pool.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the pool.", + "name": "bigip.pool.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the pool.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.pool.enabled", + "unit": "1" + }, + { + "description": "Total number of pool members.", + "name": "bigip.pool.member.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "active" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "inactive" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{members}" + }, + { + "description": "Number of packets transmitted to and from the pool.", + "name": "bigip.pool.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the pool.", + "name": "bigip.pool.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.pool.name", + "value": { + "stringValue": "/Common/test-pool-1" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the pool.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.pool.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the pool.", + "name": "bigip.pool.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the pool.", + "name": "bigip.pool.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the pool.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.pool.enabled", + "unit": "1" + }, + { + "description": "Total number of pool members.", + "name": "bigip.pool.member.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "active" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "3", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "inactive" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{members}" + }, + { + "description": "Number of packets transmitted to and from the pool.", + "name": "bigip.pool.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the pool.", + "name": "bigip.pool.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.pool_member.name", + "value": { + "stringValue": "/Common/dev:80" + } + }, + { + "key": "bigip.pool_member.ip_address", + "value": { + "stringValue": "10.33.104.2" + } + }, + { + "key": "bigip.pool.name", + "value": { + "stringValue": "/Common/dev" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the pool member.", + "gauge": { + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.pool_member.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the pool member.", + "name": "bigip.pool_member.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the pool member.", + "name": "bigip.pool_member.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the pool member.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.pool_member.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the pool member.", + "name": "bigip.pool_member.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the pool member.", + "name": "bigip.pool_member.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + }, + { + "description": "Current number of sessions for the pool member.", + "name": "bigip.pool_member.session.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{sessions}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.pool_member.name", + "value": { + "stringValue": "/Common/nginx:80" + } + }, + { + "key": "bigip.pool_member.ip_address", + "value": { + "stringValue": "10.33.121.108" + } + }, + { + "key": "bigip.pool.name", + "value": { + "stringValue": "/Common/test-pool-1" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the pool member.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.pool_member.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the pool member.", + "name": "bigip.pool_member.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the pool member.", + "name": "bigip.pool_member.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the pool member.", + "gauge": { + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.pool_member.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the pool member.", + "name": "bigip.pool_member.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the pool member.", + "name": "bigip.pool_member.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + }, + { + "description": "Current number of sessions for the pool member.", + "name": "bigip.pool_member.session.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{sessions}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.pool_member.name", + "value": { + "stringValue": "/Common/test-node-1:80" + } + }, + { + "key": "bigip.pool_member.ip_address", + "value": { + "stringValue": "10.0.0.1" + } + }, + { + "key": "bigip.pool.name", + "value": { + "stringValue": "/Common/test-pool-1" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the pool member.", + "gauge": { + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.pool_member.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the pool member.", + "name": "bigip.pool_member.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the pool member.", + "name": "bigip.pool_member.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the pool member.", + "gauge": { + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.pool_member.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the pool member.", + "name": "bigip.pool_member.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the pool member.", + "name": "bigip.pool_member.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + }, + { + "description": "Current number of sessions for the pool member.", + "name": "bigip.pool_member.session.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{sessions}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.pool_member.name", + "value": { + "stringValue": "/Common/test-node-2:80" + } + }, + { + "key": "bigip.pool_member.ip_address", + "value": { + "stringValue": "10.0.0.2" + } + }, + { + "key": "bigip.pool.name", + "value": { + "stringValue": "/Common/test-pool-1" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the pool member.", + "gauge": { + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.pool_member.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the pool member.", + "name": "bigip.pool_member.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the pool member.", + "name": "bigip.pool_member.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the pool member.", + "gauge": { + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.pool_member.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the pool member.", + "name": "bigip.pool_member.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the pool member.", + "name": "bigip.pool_member.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + }, + { + "description": "Current number of sessions for the pool member.", + "name": "bigip.pool_member.session.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{sessions}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.pool_member.name", + "value": { + "stringValue": "/Common/test-node-3:80" + } + }, + { + "key": "bigip.pool_member.ip_address", + "value": { + "stringValue": "10.0.0.3" + } + }, + { + "key": "bigip.pool.name", + "value": { + "stringValue": "/Common/test-pool-1" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the pool member.", + "gauge": { + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.pool_member.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the pool member.", + "name": "bigip.pool_member.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the pool member.", + "name": "bigip.pool_member.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the pool member.", + "gauge": { + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.pool_member.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the pool member.", + "name": "bigip.pool_member.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the pool member.", + "name": "bigip.pool_member.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + }, + { + "description": "Current number of sessions for the pool member.", + "name": "bigip.pool_member.session.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{sessions}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.node.name", + "value": { + "stringValue": "/Common/test-node-1" + } + }, + { + "key": "bigip.node.ip_address", + "value": { + "stringValue": "10.0.0.1" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the node.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.node.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the node.", + "name": "bigip.node.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the node.", + "name": "bigip.node.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the node.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.node.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the node.", + "name": "bigip.node.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the node.", + "name": "bigip.node.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + }, + { + "description": "Current number of sessions for the node.", + "name": "bigip.node.session.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{sessions}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.node.name", + "value": { + "stringValue": "/Common/test-node-2" + } + }, + { + "key": "bigip.node.ip_address", + "value": { + "stringValue": "10.0.0.2" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the node.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.node.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the node.", + "name": "bigip.node.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the node.", + "name": "bigip.node.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the node.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.node.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the node.", + "name": "bigip.node.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the node.", + "name": "bigip.node.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + }, + { + "description": "Current number of sessions for the node.", + "name": "bigip.node.session.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{sessions}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.node.name", + "value": { + "stringValue": "/Common/test-node-3" + } + }, + { + "key": "bigip.node.ip_address", + "value": { + "stringValue": "10.0.0.3" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the node.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.node.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the node.", + "name": "bigip.node.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the node.", + "name": "bigip.node.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the node.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.node.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the node.", + "name": "bigip.node.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the node.", + "name": "bigip.node.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + }, + { + "description": "Current number of sessions for the node.", + "name": "bigip.node.session.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{sessions}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.node.name", + "value": { + "stringValue": "/Common/dev" + } + }, + { + "key": "bigip.node.ip_address", + "value": { + "stringValue": "10.33.104.2" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the node.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.node.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the node.", + "name": "bigip.node.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the node.", + "name": "bigip.node.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the node.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.node.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the node.", + "name": "bigip.node.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the node.", + "name": "bigip.node.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + }, + { + "description": "Current number of sessions for the node.", + "name": "bigip.node.session.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{sessions}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.node.name", + "value": { + "stringValue": "/Common/nginx" + } + }, + { + "key": "bigip.node.ip_address", + "value": { + "stringValue": "10.33.121.108" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the node.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.node.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the node.", + "name": "bigip.node.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the node.", + "name": "bigip.node.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the node.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.node.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the node.", + "name": "bigip.node.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the node.", + "name": "bigip.node.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + }, + { + "description": "Current number of sessions for the node.", + "name": "bigip.node.session.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{sessions}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + } + ] +} diff --git a/receiver/bigipreceiver/testdata/expected_metrics/metrics_partial_golden.json b/receiver/bigipreceiver/testdata/expected_metrics/metrics_partial_golden.json new file mode 100644 index 000000000000..669afd136f2c --- /dev/null +++ b/receiver/bigipreceiver/testdata/expected_metrics/metrics_partial_golden.json @@ -0,0 +1,888 @@ +{ + "resourceMetrics": [ + { + "resource": { + "attributes": [ + { + "key": "bigip.virtual_server.name", + "value": { + "stringValue": "/Common/test-virtual-server1" + } + }, + { + "key": "bigip.virtual_server.destination", + "value": { + "stringValue": "10.1.10.100:80" + } + }, + { + "key": "bigip.pool.name", + "value": { + "stringValue": "/Common/dev" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the virtual server.", + "gauge": { + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ] + }, + "name": "bigip.virtual_server.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the virtual server.", + "name": "bigip.virtual_server.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the virtual server.", + "name": "bigip.virtual_server.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the virtual server.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ] + }, + "name": "bigip.virtual_server.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the virtual server.", + "name": "bigip.virtual_server.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the virtual server.", + "name": "bigip.virtual_server.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.virtual_server.name", + "value": { + "stringValue": "/Common/test-virtual-server2" + } + }, + { + "key": "bigip.virtual_server.destination", + "value": { + "stringValue": "10.1.10.100:21" + } + }, + { + "key": "bigip.pool.name", + "value": { + "stringValue": "/Common/test-pool-1" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the virtual server.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ] + }, + "name": "bigip.virtual_server.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the virtual server.", + "name": "bigip.virtual_server.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the virtual server.", + "name": "bigip.virtual_server.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the virtual server.", + "gauge": { + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ] + }, + "name": "bigip.virtual_server.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the virtual server.", + "name": "bigip.virtual_server.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the virtual server.", + "name": "bigip.virtual_server.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.virtual_server.name", + "value": { + "stringValue": "/Common/test-virtual-server3" + } + }, + { + "key": "bigip.virtual_server.destination", + "value": { + "stringValue": "10.1.10.101:80" + } + }, + { + "key": "bigip.pool.name", + "value": { + "stringValue": "/Common/test-pool-1" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the virtual server.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ] + }, + "name": "bigip.virtual_server.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the virtual server.", + "name": "bigip.virtual_server.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the virtual server.", + "name": "bigip.virtual_server.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the virtual server.", + "gauge": { + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ] + }, + "name": "bigip.virtual_server.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the virtual server.", + "name": "bigip.virtual_server.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the virtual server.", + "name": "bigip.virtual_server.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.virtual_server.name", + "value": { + "stringValue": "/stage/stage" + } + }, + { + "key": "bigip.virtual_server.destination", + "value": { + "stringValue": "10.1.2.1:21" + } + }, + { + "key": "bigip.pool.name", + "value": { + "stringValue": "" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the virtual server.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ] + }, + "name": "bigip.virtual_server.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the virtual server.", + "name": "bigip.virtual_server.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the virtual server.", + "name": "bigip.virtual_server.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the virtual server.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ] + }, + "name": "bigip.virtual_server.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the virtual server.", + "name": "bigip.virtual_server.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the virtual server.", + "name": "bigip.virtual_server.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + } + ] +} diff --git a/receiver/bigipreceiver/testdata/expected_metrics/metrics_partial_with_members_golden.json b/receiver/bigipreceiver/testdata/expected_metrics/metrics_partial_with_members_golden.json new file mode 100644 index 000000000000..9dc320affae4 --- /dev/null +++ b/receiver/bigipreceiver/testdata/expected_metrics/metrics_partial_with_members_golden.json @@ -0,0 +1,2068 @@ +{ + "resourceMetrics": [ + { + "resource": { + "attributes": [ + { + "key": "bigip.virtual_server.name", + "value": { + "stringValue": "/Common/test-virtual-server1" + } + }, + { + "key": "bigip.virtual_server.destination", + "value": { + "stringValue": "10.1.10.100:80" + } + }, + { + "key": "bigip.pool.name", + "value": { + "stringValue": "/Common/dev" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the virtual server.", + "gauge": { + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ] + }, + "name": "bigip.virtual_server.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the virtual server.", + "name": "bigip.virtual_server.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the virtual server.", + "name": "bigip.virtual_server.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the virtual server.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ] + }, + "name": "bigip.virtual_server.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the virtual server.", + "name": "bigip.virtual_server.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the virtual server.", + "name": "bigip.virtual_server.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.virtual_server.name", + "value": { + "stringValue": "/Common/test-virtual-server2" + } + }, + { + "key": "bigip.virtual_server.destination", + "value": { + "stringValue": "10.1.10.100:21" + } + }, + { + "key": "bigip.pool.name", + "value": { + "stringValue": "/Common/test-pool-1" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the virtual server.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ] + }, + "name": "bigip.virtual_server.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the virtual server.", + "name": "bigip.virtual_server.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the virtual server.", + "name": "bigip.virtual_server.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the virtual server.", + "gauge": { + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ] + }, + "name": "bigip.virtual_server.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the virtual server.", + "name": "bigip.virtual_server.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the virtual server.", + "name": "bigip.virtual_server.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.virtual_server.name", + "value": { + "stringValue": "/Common/test-virtual-server3" + } + }, + { + "key": "bigip.virtual_server.destination", + "value": { + "stringValue": "10.1.10.101:80" + } + }, + { + "key": "bigip.pool.name", + "value": { + "stringValue": "/Common/test-pool-1" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the virtual server.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ] + }, + "name": "bigip.virtual_server.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the virtual server.", + "name": "bigip.virtual_server.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the virtual server.", + "name": "bigip.virtual_server.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the virtual server.", + "gauge": { + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ] + }, + "name": "bigip.virtual_server.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the virtual server.", + "name": "bigip.virtual_server.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the virtual server.", + "name": "bigip.virtual_server.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.virtual_server.name", + "value": { + "stringValue": "/stage/stage" + } + }, + { + "key": "bigip.virtual_server.destination", + "value": { + "stringValue": "10.1.2.1:21" + } + }, + { + "key": "bigip.pool.name", + "value": { + "stringValue": "" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the virtual server.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ] + }, + "name": "bigip.virtual_server.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the virtual server.", + "name": "bigip.virtual_server.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the virtual server.", + "name": "bigip.virtual_server.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the virtual server.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ] + }, + "name": "bigip.virtual_server.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the virtual server.", + "name": "bigip.virtual_server.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the virtual server.", + "name": "bigip.virtual_server.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783494930451000", + "timeUnixNano": "1651783494931319000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.pool_member.name", + "value": { + "stringValue": "/Common/dev:80" + } + }, + { + "key": "bigip.pool_member.ip_address", + "value": { + "stringValue": "10.33.104.2" + } + }, + { + "key": "bigip.pool.name", + "value": { + "stringValue": "/Common/dev" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the pool member.", + "gauge": { + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.pool_member.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the pool member.", + "name": "bigip.pool_member.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the pool member.", + "name": "bigip.pool_member.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the pool member.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.pool_member.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the pool member.", + "name": "bigip.pool_member.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the pool member.", + "name": "bigip.pool_member.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + }, + { + "description": "Current number of sessions for the pool member.", + "name": "bigip.pool_member.session.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{sessions}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.pool_member.name", + "value": { + "stringValue": "/Common/nginx:80" + } + }, + { + "key": "bigip.pool_member.ip_address", + "value": { + "stringValue": "10.33.121.108" + } + }, + { + "key": "bigip.pool.name", + "value": { + "stringValue": "/Common/test-pool-1" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the pool member.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.pool_member.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the pool member.", + "name": "bigip.pool_member.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the pool member.", + "name": "bigip.pool_member.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the pool member.", + "gauge": { + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.pool_member.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the pool member.", + "name": "bigip.pool_member.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the pool member.", + "name": "bigip.pool_member.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + }, + { + "description": "Current number of sessions for the pool member.", + "name": "bigip.pool_member.session.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{sessions}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.pool_member.name", + "value": { + "stringValue": "/Common/test-node-1:80" + } + }, + { + "key": "bigip.pool_member.ip_address", + "value": { + "stringValue": "10.0.0.1" + } + }, + { + "key": "bigip.pool.name", + "value": { + "stringValue": "/Common/test-pool-1" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the pool member.", + "gauge": { + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.pool_member.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the pool member.", + "name": "bigip.pool_member.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the pool member.", + "name": "bigip.pool_member.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the pool member.", + "gauge": { + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.pool_member.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the pool member.", + "name": "bigip.pool_member.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the pool member.", + "name": "bigip.pool_member.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + }, + { + "description": "Current number of sessions for the pool member.", + "name": "bigip.pool_member.session.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{sessions}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.pool_member.name", + "value": { + "stringValue": "/Common/test-node-2:80" + } + }, + { + "key": "bigip.pool_member.ip_address", + "value": { + "stringValue": "10.0.0.2" + } + }, + { + "key": "bigip.pool.name", + "value": { + "stringValue": "/Common/test-pool-1" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the pool member.", + "gauge": { + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.pool_member.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the pool member.", + "name": "bigip.pool_member.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the pool member.", + "name": "bigip.pool_member.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the pool member.", + "gauge": { + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.pool_member.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the pool member.", + "name": "bigip.pool_member.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the pool member.", + "name": "bigip.pool_member.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + }, + { + "description": "Current number of sessions for the pool member.", + "name": "bigip.pool_member.session.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{sessions}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.pool_member.name", + "value": { + "stringValue": "/Common/test-node-3:80" + } + }, + { + "key": "bigip.pool_member.ip_address", + "value": { + "stringValue": "10.0.0.3" + } + }, + { + "key": "bigip.pool.name", + "value": { + "stringValue": "/Common/test-pool-1" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the pool member.", + "gauge": { + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.pool_member.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the pool member.", + "name": "bigip.pool_member.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the pool member.", + "name": "bigip.pool_member.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the pool member.", + "gauge": { + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "name": "bigip.pool_member.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the pool member.", + "name": "bigip.pool_member.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the pool member.", + "name": "bigip.pool_member.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + }, + { + "description": "Current number of sessions for the pool member.", + "name": "bigip.pool_member.session.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{sessions}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + } + ] +} diff --git a/receiver/bigipreceiver/testdata/integration/expected.json b/receiver/bigipreceiver/testdata/integration/expected.json new file mode 100644 index 000000000000..de5d58f43745 --- /dev/null +++ b/receiver/bigipreceiver/testdata/integration/expected.json @@ -0,0 +1,3708 @@ +{ + "resourceMetrics": [ + { + "resource": { + "attributes": [ + { + "key": "bigip.virtual_server.name", + "value": { + "stringValue": "/Common/test-virtual-server1" + } + }, + { + "key": "bigip.virtual_server.destination", + "value": { + "stringValue": "10.1.10.100:80" + } + }, + { + "key": "bigip.pool.name", + "value": { + "stringValue": "/Common/dev" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the virtual server.", + "gauge": { + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "name": "bigip.virtual_server.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the virtual server.", + "name": "bigip.virtual_server.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the virtual server.", + "name": "bigip.virtual_server.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the virtual server.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "name": "bigip.virtual_server.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the virtual server.", + "name": "bigip.virtual_server.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the virtual server.", + "name": "bigip.virtual_server.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.virtual_server.name", + "value": { + "stringValue": "/Common/test-virtual-server2" + } + }, + { + "key": "bigip.virtual_server.destination", + "value": { + "stringValue": "10.1.10.100:21" + } + }, + { + "key": "bigip.pool.name", + "value": { + "stringValue": "/Common/test-pool-1" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the virtual server.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "name": "bigip.virtual_server.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the virtual server.", + "name": "bigip.virtual_server.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the virtual server.", + "name": "bigip.virtual_server.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the virtual server.", + "gauge": { + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "name": "bigip.virtual_server.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the virtual server.", + "name": "bigip.virtual_server.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the virtual server.", + "name": "bigip.virtual_server.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.virtual_server.name", + "value": { + "stringValue": "/Common/test-virtual-server3" + } + }, + { + "key": "bigip.virtual_server.destination", + "value": { + "stringValue": "10.1.10.101:80" + } + }, + { + "key": "bigip.pool.name", + "value": { + "stringValue": "/Common/test-pool-1" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the virtual server.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "name": "bigip.virtual_server.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the virtual server.", + "name": "bigip.virtual_server.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the virtual server.", + "name": "bigip.virtual_server.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the virtual server.", + "gauge": { + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "name": "bigip.virtual_server.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the virtual server.", + "name": "bigip.virtual_server.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the virtual server.", + "name": "bigip.virtual_server.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.virtual_server.name", + "value": { + "stringValue": "/stage/stage" + } + }, + { + "key": "bigip.virtual_server.destination", + "value": { + "stringValue": "10.1.2.1:21" + } + }, + { + "key": "bigip.pool.name", + "value": { + "stringValue": "" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the virtual server.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "name": "bigip.virtual_server.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the virtual server.", + "name": "bigip.virtual_server.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the virtual server.", + "name": "bigip.virtual_server.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the virtual server.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "name": "bigip.virtual_server.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the virtual server.", + "name": "bigip.virtual_server.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the virtual server.", + "name": "bigip.virtual_server.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.pool.name", + "value": { + "stringValue": "/Common/dev" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the pool.", + "gauge": { + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "name": "bigip.pool.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the pool.", + "name": "bigip.pool.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the pool.", + "name": "bigip.pool.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the pool.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "name": "bigip.pool.enabled", + "unit": "1" + }, + { + "description": "Total number of pool members.", + "name": "bigip.pool.member.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "active" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "inactive" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{members}" + }, + { + "description": "Number of packets transmitted to and from the pool.", + "name": "bigip.pool.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the pool.", + "name": "bigip.pool.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.pool.name", + "value": { + "stringValue": "/Common/test-pool-1" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the pool.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "name": "bigip.pool.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the pool.", + "name": "bigip.pool.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the pool.", + "name": "bigip.pool.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the pool.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "name": "bigip.pool.enabled", + "unit": "1" + }, + { + "description": "Total number of pool members.", + "name": "bigip.pool.member.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "active" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + }, + { + "asInt": "3", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "inactive" + } + } + ], + "startTimeUnixNano": "1651783208655196000", + "timeUnixNano": "1651783208656862000" + } + ] + }, + "unit": "{members}" + }, + { + "description": "Number of packets transmitted to and from the pool.", + "name": "bigip.pool.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the pool.", + "name": "bigip.pool.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.pool_member.name", + "value": { + "stringValue": "/Common/test-node-3:80" + } + }, + { + "key": "bigip.pool_member.ip_address", + "value": { + "stringValue": "10.0.0.3" + } + }, + { + "key": "bigip.pool.name", + "value": { + "stringValue": "/Common/test-pool-1" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the pool member.", + "gauge": { + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "name": "bigip.pool_member.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the pool member.", + "name": "bigip.pool_member.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the pool member.", + "name": "bigip.pool_member.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the pool member.", + "gauge": { + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "name": "bigip.pool_member.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the pool member.", + "name": "bigip.pool_member.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the pool member.", + "name": "bigip.pool_member.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + }, + { + "description": "Current number of sessions for the pool member.", + "name": "bigip.pool_member.session.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "unit": "{sessions}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.pool_member.name", + "value": { + "stringValue": "/Common/dev:80" + } + }, + { + "key": "bigip.pool_member.ip_address", + "value": { + "stringValue": "10.33.104.2" + } + }, + { + "key": "bigip.pool.name", + "value": { + "stringValue": "/Common/dev" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the pool member.", + "gauge": { + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "name": "bigip.pool_member.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the pool member.", + "name": "bigip.pool_member.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the pool member.", + "name": "bigip.pool_member.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the pool member.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "name": "bigip.pool_member.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the pool member.", + "name": "bigip.pool_member.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the pool member.", + "name": "bigip.pool_member.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + }, + { + "description": "Current number of sessions for the pool member.", + "name": "bigip.pool_member.session.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "unit": "{sessions}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.pool_member.name", + "value": { + "stringValue": "/Common/nginx:80" + } + }, + { + "key": "bigip.pool_member.ip_address", + "value": { + "stringValue": "10.33.121.108" + } + }, + { + "key": "bigip.pool.name", + "value": { + "stringValue": "/Common/test-pool-1" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the pool member.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "name": "bigip.pool_member.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the pool member.", + "name": "bigip.pool_member.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the pool member.", + "name": "bigip.pool_member.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the pool member.", + "gauge": { + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "name": "bigip.pool_member.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the pool member.", + "name": "bigip.pool_member.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the pool member.", + "name": "bigip.pool_member.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + }, + { + "description": "Current number of sessions for the pool member.", + "name": "bigip.pool_member.session.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "unit": "{sessions}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.pool_member.name", + "value": { + "stringValue": "/Common/test-node-1:80" + } + }, + { + "key": "bigip.pool_member.ip_address", + "value": { + "stringValue": "10.0.0.1" + } + }, + { + "key": "bigip.pool.name", + "value": { + "stringValue": "/Common/test-pool-1" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the pool member.", + "gauge": { + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "name": "bigip.pool_member.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the pool member.", + "name": "bigip.pool_member.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the pool member.", + "name": "bigip.pool_member.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the pool member.", + "gauge": { + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "name": "bigip.pool_member.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the pool member.", + "name": "bigip.pool_member.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the pool member.", + "name": "bigip.pool_member.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + }, + { + "description": "Current number of sessions for the pool member.", + "name": "bigip.pool_member.session.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "unit": "{sessions}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.pool_member.name", + "value": { + "stringValue": "/Common/test-node-2:80" + } + }, + { + "key": "bigip.pool_member.ip_address", + "value": { + "stringValue": "10.0.0.2" + } + }, + { + "key": "bigip.pool.name", + "value": { + "stringValue": "/Common/test-pool-1" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the pool member.", + "gauge": { + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "name": "bigip.pool_member.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the pool member.", + "name": "bigip.pool_member.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the pool member.", + "name": "bigip.pool_member.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the pool member.", + "gauge": { + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "name": "bigip.pool_member.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the pool member.", + "name": "bigip.pool_member.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the pool member.", + "name": "bigip.pool_member.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + }, + { + "description": "Current number of sessions for the pool member.", + "name": "bigip.pool_member.session.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "unit": "{sessions}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.node.name", + "value": { + "stringValue": "/Common/dev" + } + }, + { + "key": "bigip.node.ip_address", + "value": { + "stringValue": "10.33.104.2" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the node.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "name": "bigip.node.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the node.", + "name": "bigip.node.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the node.", + "name": "bigip.node.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the node.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "name": "bigip.node.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the node.", + "name": "bigip.node.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the node.", + "name": "bigip.node.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + }, + { + "description": "Current number of sessions for the node.", + "name": "bigip.node.session.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "unit": "{sessions}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.node.name", + "value": { + "stringValue": "/Common/nginx" + } + }, + { + "key": "bigip.node.ip_address", + "value": { + "stringValue": "10.33.121.108" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the node.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "name": "bigip.node.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the node.", + "name": "bigip.node.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the node.", + "name": "bigip.node.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the node.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "name": "bigip.node.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the node.", + "name": "bigip.node.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the node.", + "name": "bigip.node.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + }, + { + "description": "Current number of sessions for the node.", + "name": "bigip.node.session.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "unit": "{sessions}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.node.name", + "value": { + "stringValue": "/Common/test-node-1" + } + }, + { + "key": "bigip.node.ip_address", + "value": { + "stringValue": "10.0.0.1" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the node.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "name": "bigip.node.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the node.", + "name": "bigip.node.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the node.", + "name": "bigip.node.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the node.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "name": "bigip.node.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the node.", + "name": "bigip.node.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the node.", + "name": "bigip.node.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + }, + { + "description": "Current number of sessions for the node.", + "name": "bigip.node.session.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "unit": "{sessions}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.node.name", + "value": { + "stringValue": "/Common/test-node-2" + } + }, + { + "key": "bigip.node.ip_address", + "value": { + "stringValue": "10.0.0.2" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the node.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "name": "bigip.node.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the node.", + "name": "bigip.node.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the node.", + "name": "bigip.node.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the node.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "name": "bigip.node.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the node.", + "name": "bigip.node.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the node.", + "name": "bigip.node.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + }, + { + "description": "Current number of sessions for the node.", + "name": "bigip.node.session.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "unit": "{sessions}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "bigip.node.name", + "value": { + "stringValue": "/Common/test-node-3" + } + }, + { + "key": "bigip.node.ip_address", + "value": { + "stringValue": "10.0.0.3" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "Availability of the node.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "offline" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "unknown" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "name": "bigip.node.availability", + "unit": "1" + }, + { + "description": "Current number of connections to the node.", + "name": "bigip.node.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "Amount of data transmitted to and from the node.", + "name": "bigip.node.data.transmitted", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "By" + }, + { + "description": "Enabled state of of the node.", + "gauge": { + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "disabled" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "status", + "value": { + "stringValue": "enabled" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "name": "bigip.node.enabled", + "unit": "1" + }, + { + "description": "Number of packets transmitted to and from the node.", + "name": "bigip.node.packet.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "received" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "direction", + "value": { + "stringValue": "sent" + } + } + ], + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "{packets}" + }, + { + "description": "Number of requests to the node.", + "name": "bigip.node.request.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ], + "isMonotonic": true + }, + "unit": "{requests}" + }, + { + "description": "Current number of sessions for the node.", + "name": "bigip.node.session.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1651862591270368000", + "timeUnixNano": "1651862591371979000" + } + ] + }, + "unit": "{sessions}" + } + ], + "scope": { + "name": "otelcol/bigipreceiver" + } + } + ] + } + ] +} diff --git a/receiver/bigipreceiver/testdata/integration/mock_server/_Common_dev_pool_members_stats_response.json b/receiver/bigipreceiver/testdata/integration/mock_server/_Common_dev_pool_members_stats_response.json new file mode 100644 index 000000000000..29c825a3a003 --- /dev/null +++ b/receiver/bigipreceiver/testdata/integration/mock_server/_Common_dev_pool_members_stats_response.json @@ -0,0 +1,107 @@ +{ + "kind": "tm:ltm:pool:members:memberscollectionstats", + "selfLink": "https://localhost/mgmt/tm/ltm/pool/~Common~dev/members/stats?ver=16.1.2", + "entries": { + "https://localhost/mgmt/tm/ltm/pool/~Common~dev/members/~Common~dev:80/stats": { + "nestedStats": { + "kind": "tm:ltm:pool:members:membersstats", + "selfLink": "https://localhost/mgmt/tm/ltm/pool/~Common~dev/members/~Common~dev:80/stats?ver=16.1.2", + "entries": { + "addr": { + "description": "10.33.104.2" + }, + "connq.ageEdm": { + "value": 0 + }, + "connq.ageEma": { + "value": 0 + }, + "connq.ageHead": { + "value": 0 + }, + "connq.ageMax": { + "value": 0 + }, + "connq.depth": { + "value": 0 + }, + "connq.serviced": { + "value": 0 + }, + "curSessions": { + "value": 0 + }, + "monitorRule": { + "description": "/Common/http (pool monitor)" + }, + "monitorStatus": { + "description": "down" + }, + "mr.msgIn": { + "value": 0 + }, + "mr.msgOut": { + "value": 0 + }, + "mr.reqIn": { + "value": 0 + }, + "mr.reqOut": { + "value": 0 + }, + "mr.respIn": { + "value": 0 + }, + "mr.respOut": { + "value": 0 + }, + "nodeName": { + "description": "/Common/dev" + }, + "poolName": { + "description": "/Common/dev" + }, + "port": { + "value": 80 + }, + "serverside.bitsIn": { + "value": 0 + }, + "serverside.bitsOut": { + "value": 0 + }, + "serverside.curConns": { + "value": 0 + }, + "serverside.maxConns": { + "value": 0 + }, + "serverside.pktsIn": { + "value": 0 + }, + "serverside.pktsOut": { + "value": 0 + }, + "serverside.totConns": { + "value": 0 + }, + "sessionStatus": { + "description": "enabled" + }, + "status.availabilityState": { + "description": "offline" + }, + "status.enabledState": { + "description": "enabled" + }, + "status.statusReason": { + "description": "/Common/http: No successful responses received before deadline. @2022/04/29 08:33:56. " + }, + "totRequests": { + "value": 0 + } + } + } + } + } +} diff --git a/receiver/bigipreceiver/testdata/integration/mock_server/_Common_test-pool-1_pool_members_stats_response.json b/receiver/bigipreceiver/testdata/integration/mock_server/_Common_test-pool-1_pool_members_stats_response.json new file mode 100644 index 000000000000..481c61db110e --- /dev/null +++ b/receiver/bigipreceiver/testdata/integration/mock_server/_Common_test-pool-1_pool_members_stats_response.json @@ -0,0 +1,410 @@ +{ + "kind": "tm:ltm:pool:members:memberscollectionstats", + "selfLink": "https://localhost/mgmt/tm/ltm/pool/~Common~test-pool-1/members/stats?ver=16.1.2", + "entries": { + "https://localhost/mgmt/tm/ltm/pool/~Common~test-pool-1/members/~Common~nginx:80/stats": { + "nestedStats": { + "kind": "tm:ltm:pool:members:membersstats", + "selfLink": "https://localhost/mgmt/tm/ltm/pool/~Common~test-pool-1/members/~Common~nginx:80/stats?ver=16.1.2", + "entries": { + "addr": { + "description": "10.33.121.108" + }, + "connq.ageEdm": { + "value": 0 + }, + "connq.ageEma": { + "value": 0 + }, + "connq.ageHead": { + "value": 0 + }, + "connq.ageMax": { + "value": 0 + }, + "connq.depth": { + "value": 0 + }, + "connq.serviced": { + "value": 0 + }, + "curSessions": { + "value": 0 + }, + "monitorRule": { + "description": "/Common/http (pool monitor)" + }, + "monitorStatus": { + "description": "up" + }, + "mr.msgIn": { + "value": 0 + }, + "mr.msgOut": { + "value": 0 + }, + "mr.reqIn": { + "value": 0 + }, + "mr.reqOut": { + "value": 0 + }, + "mr.respIn": { + "value": 0 + }, + "mr.respOut": { + "value": 0 + }, + "nodeName": { + "description": "/Common/nginx" + }, + "poolName": { + "description": "/Common/test-pool-1" + }, + "port": { + "value": 80 + }, + "serverside.bitsIn": { + "value": 0 + }, + "serverside.bitsOut": { + "value": 0 + }, + "serverside.curConns": { + "value": 0 + }, + "serverside.maxConns": { + "value": 0 + }, + "serverside.pktsIn": { + "value": 0 + }, + "serverside.pktsOut": { + "value": 0 + }, + "serverside.totConns": { + "value": 0 + }, + "sessionStatus": { + "description": "user-disabled" + }, + "status.availabilityState": { + "description": "available" + }, + "status.enabledState": { + "description": "disabled" + }, + "status.statusReason": { + "description": "Pool member is available, user disabled" + }, + "totRequests": { + "value": 0 + } + } + } + }, + "https://localhost/mgmt/tm/ltm/pool/~Common~test-pool-1/members/~Common~test-node-1:80/stats": { + "nestedStats": { + "kind": "tm:ltm:pool:members:membersstats", + "selfLink": "https://localhost/mgmt/tm/ltm/pool/~Common~test-pool-1/members/~Common~test-node-1:80/stats?ver=16.1.2", + "entries": { + "addr": { + "description": "10.0.0.1" + }, + "connq.ageEdm": { + "value": 0 + }, + "connq.ageEma": { + "value": 0 + }, + "connq.ageHead": { + "value": 0 + }, + "connq.ageMax": { + "value": 0 + }, + "connq.depth": { + "value": 0 + }, + "connq.serviced": { + "value": 0 + }, + "curSessions": { + "value": 0 + }, + "monitorRule": { + "description": "/Common/http (pool monitor)" + }, + "monitorStatus": { + "description": "down" + }, + "mr.msgIn": { + "value": 0 + }, + "mr.msgOut": { + "value": 0 + }, + "mr.reqIn": { + "value": 0 + }, + "mr.reqOut": { + "value": 0 + }, + "mr.respIn": { + "value": 0 + }, + "mr.respOut": { + "value": 0 + }, + "nodeName": { + "description": "/Common/test-node-1" + }, + "poolName": { + "description": "/Common/test-pool-1" + }, + "port": { + "value": 80 + }, + "serverside.bitsIn": { + "value": 0 + }, + "serverside.bitsOut": { + "value": 0 + }, + "serverside.curConns": { + "value": 0 + }, + "serverside.maxConns": { + "value": 0 + }, + "serverside.pktsIn": { + "value": 0 + }, + "serverside.pktsOut": { + "value": 0 + }, + "serverside.totConns": { + "value": 0 + }, + "sessionStatus": { + "description": "user-disabled" + }, + "status.availabilityState": { + "description": "offline" + }, + "status.enabledState": { + "description": "disabled" + }, + "status.statusReason": { + "description": "/Common/http: No successful responses received before deadline. @2022/04/29 08:13:38. " + }, + "totRequests": { + "value": 0 + } + } + } + }, + "https://localhost/mgmt/tm/ltm/pool/~Common~test-pool-1/members/~Common~test-node-2:80/stats": { + "nestedStats": { + "kind": "tm:ltm:pool:members:membersstats", + "selfLink": "https://localhost/mgmt/tm/ltm/pool/~Common~test-pool-1/members/~Common~test-node-2:80/stats?ver=16.1.2", + "entries": { + "addr": { + "description": "10.0.0.2" + }, + "connq.ageEdm": { + "value": 0 + }, + "connq.ageEma": { + "value": 0 + }, + "connq.ageHead": { + "value": 0 + }, + "connq.ageMax": { + "value": 0 + }, + "connq.depth": { + "value": 0 + }, + "connq.serviced": { + "value": 0 + }, + "curSessions": { + "value": 0 + }, + "monitorRule": { + "description": "/Common/http (pool monitor)" + }, + "monitorStatus": { + "description": "down" + }, + "mr.msgIn": { + "value": 0 + }, + "mr.msgOut": { + "value": 0 + }, + "mr.reqIn": { + "value": 0 + }, + "mr.reqOut": { + "value": 0 + }, + "mr.respIn": { + "value": 0 + }, + "mr.respOut": { + "value": 0 + }, + "nodeName": { + "description": "/Common/test-node-2" + }, + "poolName": { + "description": "/Common/test-pool-1" + }, + "port": { + "value": 80 + }, + "serverside.bitsIn": { + "value": 0 + }, + "serverside.bitsOut": { + "value": 0 + }, + "serverside.curConns": { + "value": 0 + }, + "serverside.maxConns": { + "value": 0 + }, + "serverside.pktsIn": { + "value": 0 + }, + "serverside.pktsOut": { + "value": 0 + }, + "serverside.totConns": { + "value": 0 + }, + "sessionStatus": { + "description": "user-disabled" + }, + "status.availabilityState": { + "description": "offline" + }, + "status.enabledState": { + "description": "disabled" + }, + "status.statusReason": { + "description": "/Common/http: No successful responses received before deadline. @2022/04/29 08:13:38. " + }, + "totRequests": { + "value": 0 + } + } + } + }, + "https://localhost/mgmt/tm/ltm/pool/~Common~test-pool-1/members/~Common~test-node-3:80/stats": { + "nestedStats": { + "kind": "tm:ltm:pool:members:membersstats", + "selfLink": "https://localhost/mgmt/tm/ltm/pool/~Common~test-pool-1/members/~Common~test-node-3:80/stats?ver=16.1.2", + "entries": { + "addr": { + "description": "10.0.0.3" + }, + "connq.ageEdm": { + "value": 0 + }, + "connq.ageEma": { + "value": 0 + }, + "connq.ageHead": { + "value": 0 + }, + "connq.ageMax": { + "value": 0 + }, + "connq.depth": { + "value": 0 + }, + "connq.serviced": { + "value": 0 + }, + "curSessions": { + "value": 0 + }, + "monitorRule": { + "description": "/Common/http (pool monitor)" + }, + "monitorStatus": { + "description": "down" + }, + "mr.msgIn": { + "value": 0 + }, + "mr.msgOut": { + "value": 0 + }, + "mr.reqIn": { + "value": 0 + }, + "mr.reqOut": { + "value": 0 + }, + "mr.respIn": { + "value": 0 + }, + "mr.respOut": { + "value": 0 + }, + "nodeName": { + "description": "/Common/test-node-3" + }, + "poolName": { + "description": "/Common/test-pool-1" + }, + "port": { + "value": 80 + }, + "serverside.bitsIn": { + "value": 0 + }, + "serverside.bitsOut": { + "value": 0 + }, + "serverside.curConns": { + "value": 0 + }, + "serverside.maxConns": { + "value": 0 + }, + "serverside.pktsIn": { + "value": 0 + }, + "serverside.pktsOut": { + "value": 0 + }, + "serverside.totConns": { + "value": 0 + }, + "sessionStatus": { + "description": "user-disabled" + }, + "status.availabilityState": { + "description": "offline" + }, + "status.enabledState": { + "description": "disabled" + }, + "status.statusReason": { + "description": "/Common/http: No successful responses received before deadline. @2022/04/29 08:13:38. " + }, + "totRequests": { + "value": 0 + } + } + } + } + } +} diff --git a/receiver/bigipreceiver/testdata/integration/mock_server/login_response.json b/receiver/bigipreceiver/testdata/integration/mock_server/login_response.json new file mode 100644 index 000000000000..ab472ff0254e --- /dev/null +++ b/receiver/bigipreceiver/testdata/integration/mock_server/login_response.json @@ -0,0 +1,28 @@ +{ + "username": "admin", + "loginReference": { + "link": "https://localhost/mgmt/cm/system/authn/providers/local/login" + }, + "loginProviderName": "local", + "token": { + "token": "LG3RARJE2PZM75M6Q5UP37CLTF", + "name": "LG3RARJE2PZM75M6Q5UP37CLTF", + "userName": "admin", + "authProviderName": "local", + "user": { + "link": "https://localhost/mgmt/shared/authz/users/admin" + }, + "groupReferences": [], + "timeout": 1200, + "startTime": "2022-05-09T12:42:12.640-0700", + "address": "10.66.8.2", + "partition": "[All]", + "generation": 1, + "lastUpdateMicros": 1652125332640216, + "expirationMicros": 1652126532640000, + "kind": "shared:authz:tokens:authtokenitemstate", + "selfLink": "https://localhost/mgmt/shared/authz/tokens/LG3RARJE2PZM75M6Q5UP37CLTF" + }, + "generation": 0, + "lastUpdateMicros": 0 +} diff --git a/receiver/bigipreceiver/testdata/integration/mock_server/nodes_stats_response.json b/receiver/bigipreceiver/testdata/integration/mock_server/nodes_stats_response.json new file mode 100644 index 000000000000..6dc63216c2b7 --- /dev/null +++ b/receiver/bigipreceiver/testdata/integration/mock_server/nodes_stats_response.json @@ -0,0 +1,301 @@ +{ + "kind": "tm:ltm:node:nodecollectionstats", + "selfLink": "https://localhost/mgmt/tm/ltm/node/stats?ver=16.1.2", + "entries": { + "https://localhost/mgmt/tm/ltm/node/~Common~dev/stats": { + "nestedStats": { + "kind": "tm:ltm:node:nodestats", + "selfLink": "https://localhost/mgmt/tm/ltm/node/~Common~dev/stats?ver=16.1.2", + "entries": { + "addr": { + "description": "10.33.104.2" + }, + "curSessions": { + "value": 0 + }, + "monitorRule": { + "description": "none" + }, + "monitorStatus": { + "description": "unchecked" + }, + "tmName": { + "description": "/Common/dev" + }, + "serverside.bitsIn": { + "value": 0 + }, + "serverside.bitsOut": { + "value": 0 + }, + "serverside.curConns": { + "value": 0 + }, + "serverside.maxConns": { + "value": 0 + }, + "serverside.pktsIn": { + "value": 0 + }, + "serverside.pktsOut": { + "value": 0 + }, + "serverside.totConns": { + "value": 0 + }, + "sessionStatus": { + "description": "enabled" + }, + "status.availabilityState": { + "description": "unknown" + }, + "status.enabledState": { + "description": "enabled" + }, + "status.statusReason": { + "description": "Node address does not have service checking enabled" + }, + "totRequests": { + "value": 0 + } + } + } + }, + "https://localhost/mgmt/tm/ltm/node/~Common~nginx/stats": { + "nestedStats": { + "kind": "tm:ltm:node:nodestats", + "selfLink": "https://localhost/mgmt/tm/ltm/node/~Common~nginx/stats?ver=16.1.2", + "entries": { + "addr": { + "description": "10.33.121.108" + }, + "curSessions": { + "value": 0 + }, + "monitorRule": { + "description": "/Common/real_server" + }, + "monitorStatus": { + "description": "up" + }, + "tmName": { + "description": "/Common/nginx" + }, + "serverside.bitsIn": { + "value": 0 + }, + "serverside.bitsOut": { + "value": 0 + }, + "serverside.curConns": { + "value": 0 + }, + "serverside.maxConns": { + "value": 0 + }, + "serverside.pktsIn": { + "value": 0 + }, + "serverside.pktsOut": { + "value": 0 + }, + "serverside.totConns": { + "value": 0 + }, + "sessionStatus": { + "description": "enabled" + }, + "status.availabilityState": { + "description": "available" + }, + "status.enabledState": { + "description": "enabled" + }, + "status.statusReason": { + "description": "Node address is available" + }, + "totRequests": { + "value": 0 + } + } + } + }, + "https://localhost/mgmt/tm/ltm/node/~Common~test-node-1/stats": { + "nestedStats": { + "kind": "tm:ltm:node:nodestats", + "selfLink": "https://localhost/mgmt/tm/ltm/node/~Common~test-node-1/stats?ver=16.1.2", + "entries": { + "addr": { + "description": "10.0.0.1" + }, + "curSessions": { + "value": 0 + }, + "monitorRule": { + "description": "none" + }, + "monitorStatus": { + "description": "unchecked" + }, + "tmName": { + "description": "/Common/test-node-1" + }, + "serverside.bitsIn": { + "value": 0 + }, + "serverside.bitsOut": { + "value": 0 + }, + "serverside.curConns": { + "value": 0 + }, + "serverside.maxConns": { + "value": 0 + }, + "serverside.pktsIn": { + "value": 0 + }, + "serverside.pktsOut": { + "value": 0 + }, + "serverside.totConns": { + "value": 0 + }, + "sessionStatus": { + "description": "enabled" + }, + "status.availabilityState": { + "description": "unknown" + }, + "status.enabledState": { + "description": "enabled" + }, + "status.statusReason": { + "description": "Node address does not have service checking enabled" + }, + "totRequests": { + "value": 0 + } + } + } + }, + "https://localhost/mgmt/tm/ltm/node/~Common~test-node-2/stats": { + "nestedStats": { + "kind": "tm:ltm:node:nodestats", + "selfLink": "https://localhost/mgmt/tm/ltm/node/~Common~test-node-2/stats?ver=16.1.2", + "entries": { + "addr": { + "description": "10.0.0.2" + }, + "curSessions": { + "value": 0 + }, + "monitorRule": { + "description": "none" + }, + "monitorStatus": { + "description": "unchecked" + }, + "tmName": { + "description": "/Common/test-node-2" + }, + "serverside.bitsIn": { + "value": 0 + }, + "serverside.bitsOut": { + "value": 0 + }, + "serverside.curConns": { + "value": 0 + }, + "serverside.maxConns": { + "value": 0 + }, + "serverside.pktsIn": { + "value": 0 + }, + "serverside.pktsOut": { + "value": 0 + }, + "serverside.totConns": { + "value": 0 + }, + "sessionStatus": { + "description": "enabled" + }, + "status.availabilityState": { + "description": "unknown" + }, + "status.enabledState": { + "description": "enabled" + }, + "status.statusReason": { + "description": "Node address does not have service checking enabled" + }, + "totRequests": { + "value": 0 + } + } + } + }, + "https://localhost/mgmt/tm/ltm/node/~Common~test-node-3/stats": { + "nestedStats": { + "kind": "tm:ltm:node:nodestats", + "selfLink": "https://localhost/mgmt/tm/ltm/node/~Common~test-node-3/stats?ver=16.1.2", + "entries": { + "addr": { + "description": "10.0.0.3" + }, + "curSessions": { + "value": 0 + }, + "monitorRule": { + "description": "none" + }, + "monitorStatus": { + "description": "unchecked" + }, + "tmName": { + "description": "/Common/test-node-3" + }, + "serverside.bitsIn": { + "value": 0 + }, + "serverside.bitsOut": { + "value": 0 + }, + "serverside.curConns": { + "value": 0 + }, + "serverside.maxConns": { + "value": 0 + }, + "serverside.pktsIn": { + "value": 0 + }, + "serverside.pktsOut": { + "value": 0 + }, + "serverside.totConns": { + "value": 0 + }, + "sessionStatus": { + "description": "enabled" + }, + "status.availabilityState": { + "description": "unknown" + }, + "status.enabledState": { + "description": "enabled" + }, + "status.statusReason": { + "description": "Node address does not have service checking enabled" + }, + "totRequests": { + "value": 0 + } + } + } + } + } +} diff --git a/receiver/bigipreceiver/testdata/integration/mock_server/pools_stats_response.json b/receiver/bigipreceiver/testdata/integration/mock_server/pools_stats_response.json new file mode 100644 index 000000000000..eb841ccb64a5 --- /dev/null +++ b/receiver/bigipreceiver/testdata/integration/mock_server/pools_stats_response.json @@ -0,0 +1,256 @@ +{ + "kind": "tm:ltm:pool:poolcollectionstats", + "selfLink": "https://localhost/mgmt/tm/ltm/pool/stats?ver=16.1.2", + "entries": { + "https://localhost/mgmt/tm/ltm/pool/~Common~dev/stats": { + "nestedStats": { + "kind": "tm:ltm:pool:poolstats", + "selfLink": "https://localhost/mgmt/tm/ltm/pool/~Common~dev/stats?ver=16.1.2", + "entries": { + "activeMemberCnt": { + "value": 0 + }, + "availableMemberCnt": { + "value": 0 + }, + "connqAll.ageEdm": { + "value": 0 + }, + "connqAll.ageEma": { + "value": 0 + }, + "connqAll.ageHead": { + "value": 0 + }, + "connqAll.ageMax": { + "value": 0 + }, + "connqAll.depth": { + "value": 0 + }, + "connqAll.serviced": { + "value": 0 + }, + "connq.ageEdm": { + "value": 0 + }, + "connq.ageEma": { + "value": 0 + }, + "connq.ageHead": { + "value": 0 + }, + "connq.ageMax": { + "value": 0 + }, + "connq.depth": { + "value": 0 + }, + "connq.serviced": { + "value": 0 + }, + "curPriogrp": { + "value": 0 + }, + "curSessions": { + "value": 0 + }, + "highestPriogrp": { + "value": 0 + }, + "lowestPriogrp": { + "value": 0 + }, + "memberCnt": { + "value": 1 + }, + "minActiveMembers": { + "value": 0 + }, + "monitorRule": { + "description": "/Common/http" + }, + "mr.msgIn": { + "value": 0 + }, + "mr.msgOut": { + "value": 0 + }, + "mr.reqIn": { + "value": 0 + }, + "mr.reqOut": { + "value": 0 + }, + "mr.respIn": { + "value": 0 + }, + "mr.respOut": { + "value": 0 + }, + "tmName": { + "description": "/Common/dev" + }, + "serverside.bitsIn": { + "value": 0 + }, + "serverside.bitsOut": { + "value": 0 + }, + "serverside.curConns": { + "value": 0 + }, + "serverside.maxConns": { + "value": 0 + }, + "serverside.pktsIn": { + "value": 0 + }, + "serverside.pktsOut": { + "value": 0 + }, + "serverside.totConns": { + "value": 0 + }, + "status.availabilityState": { + "description": "offline" + }, + "status.enabledState": { + "description": "enabled" + }, + "status.statusReason": { + "description": "The children pool member(s) are down" + }, + "totRequests": { + "value": 0 + } + } + } + }, + "https://localhost/mgmt/tm/ltm/pool/~Common~test-pool-1/stats": { + "nestedStats": { + "kind": "tm:ltm:pool:poolstats", + "selfLink": "https://localhost/mgmt/tm/ltm/pool/~Common~test-pool-1/stats?ver=16.1.2", + "entries": { + "activeMemberCnt": { + "value": 0 + }, + "availableMemberCnt": { + "value": 1 + }, + "connqAll.ageEdm": { + "value": 0 + }, + "connqAll.ageEma": { + "value": 0 + }, + "connqAll.ageHead": { + "value": 0 + }, + "connqAll.ageMax": { + "value": 0 + }, + "connqAll.depth": { + "value": 0 + }, + "connqAll.serviced": { + "value": 0 + }, + "connq.ageEdm": { + "value": 0 + }, + "connq.ageEma": { + "value": 0 + }, + "connq.ageHead": { + "value": 0 + }, + "connq.ageMax": { + "value": 0 + }, + "connq.depth": { + "value": 0 + }, + "connq.serviced": { + "value": 0 + }, + "curPriogrp": { + "value": 0 + }, + "curSessions": { + "value": 0 + }, + "highestPriogrp": { + "value": 0 + }, + "lowestPriogrp": { + "value": 0 + }, + "memberCnt": { + "value": 4 + }, + "minActiveMembers": { + "value": 0 + }, + "monitorRule": { + "description": "/Common/http" + }, + "mr.msgIn": { + "value": 0 + }, + "mr.msgOut": { + "value": 0 + }, + "mr.reqIn": { + "value": 0 + }, + "mr.reqOut": { + "value": 0 + }, + "mr.respIn": { + "value": 0 + }, + "mr.respOut": { + "value": 0 + }, + "tmName": { + "description": "/Common/test-pool-1" + }, + "serverside.bitsIn": { + "value": 0 + }, + "serverside.bitsOut": { + "value": 0 + }, + "serverside.curConns": { + "value": 0 + }, + "serverside.maxConns": { + "value": 0 + }, + "serverside.pktsIn": { + "value": 0 + }, + "serverside.pktsOut": { + "value": 0 + }, + "serverside.totConns": { + "value": 0 + }, + "status.availabilityState": { + "description": "available" + }, + "status.enabledState": { + "description": "disabled-by-parent" + }, + "status.statusReason": { + "description": "The children pool member(s) might be disabled" + }, + "totRequests": { + "value": 0 + } + } + } + } + } +} diff --git a/receiver/bigipreceiver/testdata/integration/mock_server/record_big_ip_responses.sh b/receiver/bigipreceiver/testdata/integration/mock_server/record_big_ip_responses.sh new file mode 100755 index 000000000000..0fe5a36ab90b --- /dev/null +++ b/receiver/bigipreceiver/testdata/integration/mock_server/record_big_ip_responses.sh @@ -0,0 +1,52 @@ +#!/bin/bash +# A script which will record new login, virtual server, pool, node, and pool member responses from a specified Big-IP environment + +ENDPOINT='https://localhost' +USER='bigipuser' +PASSWORD='bigippassword' + +JSON_HEADER='Content-Type: application/json' + +LOGIN_RESPONSE_FILE='login_response.json' +VIRTUAL_RESPONSE_FILE='virtual_servers_response.json' +VIRTUAL_STATS_RESPONSE_FILE='virtual_servers_stats_response.json' +POOL_STATS_RESPONSE_FILE='pools_stats_response.json' +NODE_STATS_RESPONSE_FILE='nodes_stats_response.json' +MEMBERS_STATS_RESPONSE_FILE_SUFFIX='_pool_members_stats_response.json' + +# Record the login response and write it to a file +LOGIN_RESPONSE=$(curl -sk POST $ENDPOINT/mgmt/shared/authn/login -H $JSON_HEADER -d '{"username":"'$USER'","password":"'$PASSWORD'"}') +echo $LOGIN_RESPONSE | jq . > $LOGIN_RESPONSE_FILE + +# Retrieve token from the respons and create header with it +TOKEN=$(echo $LOGIN_RESPONSE | jq -r '.token.token') +TOKEN_HEADER='X-F5-Auth-Token:'$TOKEN'' + +# Record the virtual servers response and write it to a file +VIRTUAL_RESPONSE=$(curl -sk GET $ENDPOINT/mgmt/tm/ltm/virtual -H $JSON_HEADER -H $TOKEN_HEADER) +echo $VIRTUAL_RESPONSE | jq . > $VIRTUAL_RESPONSE_FILE + +# Record the virtual servers stats response and write it to a file +VIRTUAL_STATS_RESPONSE=$(curl -sk GET $ENDPOINT/mgmt/tm/ltm/virtual/stats -H $JSON_HEADER -H $TOKEN_HEADER) +echo $VIRTUAL_STATS_RESPONSE | jq . > $VIRTUAL_STATS_RESPONSE_FILE + +# Record the pools stats response and write it to a file +POOL_STATS_RESPONSE=$(curl -sk GET $ENDPOINT/mgmt/tm/ltm/pool/stats -H $JSON_HEADER -H $TOKEN_HEADER) +echo $POOL_STATS_RESPONSE | jq . > $POOL_STATS_RESPONSE_FILE + +# Record the nodes stats response and write it to a file +NODE_STATS_RESPONSE=$(curl -sk GET $ENDPOINT/mgmt/tm/ltm/node/stats -H $JSON_HEADER -H $TOKEN_HEADER) +echo $NODE_STATS_RESPONSE | jq . > $NODE_STATS_RESPONSE_FILE + +#Get list of pools +POOL_RESPONSE=$(curl -sk GET $ENDPOINT/mgmt/tm/ltm/pool -H $JSON_HEADER -H $TOKEN_HEADER) +POOL_LIST=$(echo $POOL_RESPONSE | jq -r '[.items[].fullPath]' | jq -c '.[]') + +for row in $(echo "$POOL_LIST"); do + # Record the pool members stats response and write it to a unique file + POOL_URI_NAME=$(echo ${row} | jq -r ${1} | tr \/ \~) + MEMBER_STATS_RESPONSE=$(curl -sk GET $ENDPOINT/mgmt/tm/ltm/pool/$POOL_URI_NAME/members/stats -H $JSON_HEADER -H $TOKEN_HEADER) + MEMBER_FILE_PREFIX=$(echo $POOL_URI_NAME | tr \~ _) + MEMBER_STATS_RESPONSE_FILE=$(echo $MEMBER_FILE_PREFIX$MEMBERS_STATS_RESPONSE_FILE_SUFFIX) + echo $MEMBER_STATS_RESPONSE | jq . > $MEMBER_STATS_RESPONSE_FILE +done diff --git a/receiver/bigipreceiver/testdata/integration/mock_server/virtual_servers_response.json b/receiver/bigipreceiver/testdata/integration/mock_server/virtual_servers_response.json new file mode 100644 index 000000000000..e35c1b8309c9 --- /dev/null +++ b/receiver/bigipreceiver/testdata/integration/mock_server/virtual_servers_response.json @@ -0,0 +1,207 @@ +{ + "kind": "tm:ltm:virtual:virtualcollectionstate", + "selfLink": "https://localhost/mgmt/tm/ltm/virtual?ver=16.1.2", + "items": [ + { + "kind": "tm:ltm:virtual:virtualstate", + "name": "test-virtual-server1", + "partition": "Common", + "fullPath": "/Common/test-virtual-server1", + "generation": 203, + "selfLink": "https://localhost/mgmt/tm/ltm/virtual/~Common~test-virtual-server1?ver=16.1.2", + "addressStatus": "yes", + "autoLasthop": "default", + "cmpEnabled": "yes", + "connectionLimit": 0, + "creationTime": "2022-04-19T19:10:23Z", + "description": "Test Virtual Server 1", + "destination": "/Common/10.1.10.100:80", + "enabled": true, + "evictionProtected": "disabled", + "gtmScore": 0, + "ipProtocol": "tcp", + "lastModifiedTime": "2022-04-29T15:33:12Z", + "mask": "255.255.255.255", + "mirror": "disabled", + "mobileAppTunnel": "disabled", + "nat64": "disabled", + "pool": "/Common/dev", + "poolReference": { + "link": "https://localhost/mgmt/tm/ltm/pool/~Common~dev?ver=16.1.2" + }, + "rateLimit": "disabled", + "rateLimitDstMask": 0, + "rateLimitMode": "object", + "rateLimitSrcMask": 0, + "serversslUseSni": "disabled", + "serviceDownImmediateAction": "none", + "source": "0.0.0.0/0", + "sourceAddressTranslation": { + "type": "none" + }, + "sourcePort": "preserve", + "synCookieStatus": "not-activated", + "translateAddress": "enabled", + "translatePort": "enabled", + "vlansDisabled": true, + "vsIndex": 2, + "policiesReference": { + "link": "https://localhost/mgmt/tm/ltm/virtual/~Common~test-virtual-server1/policies?ver=16.1.2", + "isSubcollection": true + }, + "profilesReference": { + "link": "https://localhost/mgmt/tm/ltm/virtual/~Common~test-virtual-server1/profiles?ver=16.1.2", + "isSubcollection": true + } + }, + { + "kind": "tm:ltm:virtual:virtualstate", + "name": "test-virtual-server2", + "partition": "Common", + "fullPath": "/Common/test-virtual-server2", + "generation": 538, + "selfLink": "https://localhost/mgmt/tm/ltm/virtual/~Common~test-virtual-server2?ver=16.1.2", + "addressStatus": "yes", + "autoLasthop": "default", + "cmpEnabled": "yes", + "connectionLimit": 0, + "creationTime": "2022-04-19T19:11:50Z", + "destination": "/Common/10.1.10.100:21", + "disabled": true, + "evictionProtected": "disabled", + "gtmScore": 0, + "ipProtocol": "tcp", + "lastModifiedTime": "2022-05-04T13:50:58Z", + "mask": "255.255.255.255", + "mirror": "disabled", + "mobileAppTunnel": "disabled", + "nat64": "disabled", + "pool": "/Common/test-pool-1", + "poolReference": { + "link": "https://localhost/mgmt/tm/ltm/pool/~Common~test-pool-1?ver=16.1.2" + }, + "rateLimit": "disabled", + "rateLimitDstMask": 0, + "rateLimitMode": "object", + "rateLimitSrcMask": 0, + "serversslUseSni": "disabled", + "serviceDownImmediateAction": "none", + "source": "0.0.0.0/0", + "sourceAddressTranslation": { + "type": "none" + }, + "sourcePort": "preserve", + "synCookieStatus": "not-activated", + "translateAddress": "enabled", + "translatePort": "enabled", + "vlansDisabled": true, + "vsIndex": 3, + "policiesReference": { + "link": "https://localhost/mgmt/tm/ltm/virtual/~Common~test-virtual-server2/policies?ver=16.1.2", + "isSubcollection": true + }, + "profilesReference": { + "link": "https://localhost/mgmt/tm/ltm/virtual/~Common~test-virtual-server2/profiles?ver=16.1.2", + "isSubcollection": true + } + }, + { + "kind": "tm:ltm:virtual:virtualstate", + "name": "test-virtual-server3", + "partition": "Common", + "fullPath": "/Common/test-virtual-server3", + "generation": 220, + "selfLink": "https://localhost/mgmt/tm/ltm/virtual/~Common~test-virtual-server3?ver=16.1.2", + "addressStatus": "yes", + "autoLasthop": "default", + "cmpEnabled": "yes", + "connectionLimit": 0, + "creationTime": "2022-04-19T19:12:42Z", + "destination": "/Common/10.1.10.101:80", + "enabled": true, + "evictionProtected": "disabled", + "gtmScore": 0, + "ipProtocol": "tcp", + "lastModifiedTime": "2022-04-29T16:24:26Z", + "mask": "255.255.255.255", + "mirror": "disabled", + "mobileAppTunnel": "disabled", + "nat64": "disabled", + "pool": "/Common/test-pool-1", + "poolReference": { + "link": "https://localhost/mgmt/tm/ltm/pool/~Common~test-pool-1?ver=16.1.2" + }, + "rateLimit": "disabled", + "rateLimitDstMask": 0, + "rateLimitMode": "object", + "rateLimitSrcMask": 0, + "serversslUseSni": "disabled", + "serviceDownImmediateAction": "none", + "source": "0.0.0.0/0", + "sourceAddressTranslation": { + "type": "none" + }, + "sourcePort": "preserve", + "synCookieStatus": "not-activated", + "translateAddress": "enabled", + "translatePort": "enabled", + "vlansDisabled": true, + "vsIndex": 4, + "policiesReference": { + "link": "https://localhost/mgmt/tm/ltm/virtual/~Common~test-virtual-server3/policies?ver=16.1.2", + "isSubcollection": true + }, + "profilesReference": { + "link": "https://localhost/mgmt/tm/ltm/virtual/~Common~test-virtual-server3/profiles?ver=16.1.2", + "isSubcollection": true + } + }, + { + "kind": "tm:ltm:virtual:virtualstate", + "name": "stage", + "partition": "stage", + "fullPath": "/stage/stage", + "generation": 190, + "selfLink": "https://localhost/mgmt/tm/ltm/virtual/~stage~stage?ver=16.1.2", + "addressStatus": "yes", + "autoLasthop": "default", + "cmpEnabled": "yes", + "connectionLimit": 0, + "creationTime": "2022-04-29T13:37:21Z", + "destination": "/stage/10.1.2.1:21", + "enabled": true, + "evictionProtected": "disabled", + "gtmScore": 0, + "ipProtocol": "tcp", + "lastModifiedTime": "2022-04-29T13:37:21Z", + "mask": "255.255.255.255", + "mirror": "disabled", + "mobileAppTunnel": "disabled", + "nat64": "disabled", + "rateLimit": "disabled", + "rateLimitDstMask": 0, + "rateLimitMode": "object", + "rateLimitSrcMask": 0, + "serversslUseSni": "disabled", + "serviceDownImmediateAction": "none", + "source": "8.8.8.8/32", + "sourceAddressTranslation": { + "type": "none" + }, + "sourcePort": "preserve", + "synCookieStatus": "not-activated", + "translateAddress": "enabled", + "translatePort": "enabled", + "vlansDisabled": true, + "vsIndex": 6, + "policiesReference": { + "link": "https://localhost/mgmt/tm/ltm/virtual/~stage~stage/policies?ver=16.1.2", + "isSubcollection": true + }, + "profilesReference": { + "link": "https://localhost/mgmt/tm/ltm/virtual/~stage~stage/profiles?ver=16.1.2", + "isSubcollection": true + } + } + ] +} diff --git a/receiver/bigipreceiver/testdata/integration/mock_server/virtual_servers_stats_response.json b/receiver/bigipreceiver/testdata/integration/mock_server/virtual_servers_stats_response.json new file mode 100644 index 000000000000..6db7f0a34fc6 --- /dev/null +++ b/receiver/bigipreceiver/testdata/integration/mock_server/virtual_servers_stats_response.json @@ -0,0 +1,614 @@ +{ + "kind": "tm:ltm:virtual:virtualcollectionstats", + "selfLink": "https://localhost/mgmt/tm/ltm/virtual/stats?ver=16.1.2", + "entries": { + "https://localhost/mgmt/tm/ltm/virtual/~Common~test-virtual-server1/stats": { + "nestedStats": { + "kind": "tm:ltm:virtual:virtualstats", + "selfLink": "https://localhost/mgmt/tm/ltm/virtual/~Common~test-virtual-server1/stats?ver=16.1.2", + "entries": { + "clientside.bitsIn": { + "value": 0 + }, + "clientside.bitsOut": { + "value": 0 + }, + "clientside.curConns": { + "value": 0 + }, + "clientside.evictedConns": { + "value": 0 + }, + "clientside.maxConns": { + "value": 0 + }, + "clientside.pktsIn": { + "value": 0 + }, + "clientside.pktsOut": { + "value": 0 + }, + "clientside.slowKilled": { + "value": 0 + }, + "clientside.totConns": { + "value": 0 + }, + "cmpEnableMode": { + "description": "all-cpus" + }, + "cmpEnabled": { + "description": "enabled" + }, + "csMaxConnDur": { + "value": 0 + }, + "csMeanConnDur": { + "value": 0 + }, + "csMinConnDur": { + "value": 0 + }, + "destination": { + "description": "10.1.10.100:80" + }, + "ephemeral.bitsIn": { + "value": 0 + }, + "ephemeral.bitsOut": { + "value": 0 + }, + "ephemeral.curConns": { + "value": 0 + }, + "ephemeral.evictedConns": { + "value": 0 + }, + "ephemeral.maxConns": { + "value": 0 + }, + "ephemeral.pktsIn": { + "value": 0 + }, + "ephemeral.pktsOut": { + "value": 0 + }, + "ephemeral.slowKilled": { + "value": 0 + }, + "ephemeral.totConns": { + "value": 0 + }, + "fiveMinAvgUsageRatio": { + "value": 0 + }, + "fiveSecAvgUsageRatio": { + "value": 0 + }, + "mr.msgIn": { + "value": 0 + }, + "mr.msgOut": { + "value": 0 + }, + "mr.reqIn": { + "value": 0 + }, + "mr.reqOut": { + "value": 0 + }, + "mr.respIn": { + "value": 0 + }, + "mr.respOut": { + "value": 0 + }, + "tmName": { + "description": "/Common/test-virtual-server1" + }, + "oneMinAvgUsageRatio": { + "value": 0 + }, + "status.availabilityState": { + "description": "offline" + }, + "status.enabledState": { + "description": "enabled" + }, + "status.statusReason": { + "description": "The children pool member(s) are down" + }, + "syncookieStatus": { + "description": "not-activated" + }, + "syncookie.accepts": { + "value": 0 + }, + "syncookie.hwAccepts": { + "value": 0 + }, + "syncookie.hwSyncookies": { + "value": 0 + }, + "syncookie.hwsyncookieInstance": { + "value": 0 + }, + "syncookie.rejects": { + "value": 0 + }, + "syncookie.swsyncookieInstance": { + "value": 0 + }, + "syncookie.syncacheCurr": { + "value": 0 + }, + "syncookie.syncacheOver": { + "value": 0 + }, + "syncookie.syncookies": { + "value": 0 + }, + "totRequests": { + "value": 0 + } + } + } + }, + "https://localhost/mgmt/tm/ltm/virtual/~Common~test-virtual-server2/stats": { + "nestedStats": { + "kind": "tm:ltm:virtual:virtualstats", + "selfLink": "https://localhost/mgmt/tm/ltm/virtual/~Common~test-virtual-server2/stats?ver=16.1.2", + "entries": { + "clientside.bitsIn": { + "value": 0 + }, + "clientside.bitsOut": { + "value": 0 + }, + "clientside.curConns": { + "value": 0 + }, + "clientside.evictedConns": { + "value": 0 + }, + "clientside.maxConns": { + "value": 0 + }, + "clientside.pktsIn": { + "value": 0 + }, + "clientside.pktsOut": { + "value": 0 + }, + "clientside.slowKilled": { + "value": 0 + }, + "clientside.totConns": { + "value": 0 + }, + "cmpEnableMode": { + "description": "all-cpus" + }, + "cmpEnabled": { + "description": "enabled" + }, + "csMaxConnDur": { + "value": 0 + }, + "csMeanConnDur": { + "value": 0 + }, + "csMinConnDur": { + "value": 0 + }, + "destination": { + "description": "10.1.10.100:21" + }, + "ephemeral.bitsIn": { + "value": 0 + }, + "ephemeral.bitsOut": { + "value": 0 + }, + "ephemeral.curConns": { + "value": 0 + }, + "ephemeral.evictedConns": { + "value": 0 + }, + "ephemeral.maxConns": { + "value": 0 + }, + "ephemeral.pktsIn": { + "value": 0 + }, + "ephemeral.pktsOut": { + "value": 0 + }, + "ephemeral.slowKilled": { + "value": 0 + }, + "ephemeral.totConns": { + "value": 0 + }, + "fiveMinAvgUsageRatio": { + "value": 0 + }, + "fiveSecAvgUsageRatio": { + "value": 0 + }, + "mr.msgIn": { + "value": 0 + }, + "mr.msgOut": { + "value": 0 + }, + "mr.reqIn": { + "value": 0 + }, + "mr.reqOut": { + "value": 0 + }, + "mr.respIn": { + "value": 0 + }, + "mr.respOut": { + "value": 0 + }, + "tmName": { + "description": "/Common/test-virtual-server2" + }, + "oneMinAvgUsageRatio": { + "value": 0 + }, + "status.availabilityState": { + "description": "available" + }, + "status.enabledState": { + "description": "disabled-by-parent" + }, + "status.statusReason": { + "description": "The children pool member(s) might be disabled" + }, + "syncookieStatus": { + "description": "not-activated" + }, + "syncookie.accepts": { + "value": 0 + }, + "syncookie.hwAccepts": { + "value": 0 + }, + "syncookie.hwSyncookies": { + "value": 0 + }, + "syncookie.hwsyncookieInstance": { + "value": 0 + }, + "syncookie.rejects": { + "value": 0 + }, + "syncookie.swsyncookieInstance": { + "value": 0 + }, + "syncookie.syncacheCurr": { + "value": 0 + }, + "syncookie.syncacheOver": { + "value": 0 + }, + "syncookie.syncookies": { + "value": 0 + }, + "totRequests": { + "value": 0 + } + } + } + }, + "https://localhost/mgmt/tm/ltm/virtual/~Common~test-virtual-server3/stats": { + "nestedStats": { + "kind": "tm:ltm:virtual:virtualstats", + "selfLink": "https://localhost/mgmt/tm/ltm/virtual/~Common~test-virtual-server3/stats?ver=16.1.2", + "entries": { + "clientside.bitsIn": { + "value": 0 + }, + "clientside.bitsOut": { + "value": 0 + }, + "clientside.curConns": { + "value": 0 + }, + "clientside.evictedConns": { + "value": 0 + }, + "clientside.maxConns": { + "value": 0 + }, + "clientside.pktsIn": { + "value": 0 + }, + "clientside.pktsOut": { + "value": 0 + }, + "clientside.slowKilled": { + "value": 0 + }, + "clientside.totConns": { + "value": 0 + }, + "cmpEnableMode": { + "description": "all-cpus" + }, + "cmpEnabled": { + "description": "enabled" + }, + "csMaxConnDur": { + "value": 0 + }, + "csMeanConnDur": { + "value": 0 + }, + "csMinConnDur": { + "value": 0 + }, + "destination": { + "description": "10.1.10.101:80" + }, + "ephemeral.bitsIn": { + "value": 0 + }, + "ephemeral.bitsOut": { + "value": 0 + }, + "ephemeral.curConns": { + "value": 0 + }, + "ephemeral.evictedConns": { + "value": 0 + }, + "ephemeral.maxConns": { + "value": 0 + }, + "ephemeral.pktsIn": { + "value": 0 + }, + "ephemeral.pktsOut": { + "value": 0 + }, + "ephemeral.slowKilled": { + "value": 0 + }, + "ephemeral.totConns": { + "value": 0 + }, + "fiveMinAvgUsageRatio": { + "value": 0 + }, + "fiveSecAvgUsageRatio": { + "value": 0 + }, + "mr.msgIn": { + "value": 0 + }, + "mr.msgOut": { + "value": 0 + }, + "mr.reqIn": { + "value": 0 + }, + "mr.reqOut": { + "value": 0 + }, + "mr.respIn": { + "value": 0 + }, + "mr.respOut": { + "value": 0 + }, + "tmName": { + "description": "/Common/test-virtual-server3" + }, + "oneMinAvgUsageRatio": { + "value": 0 + }, + "status.availabilityState": { + "description": "available" + }, + "status.enabledState": { + "description": "disabled-by-parent" + }, + "status.statusReason": { + "description": "The children pool member(s) might be disabled" + }, + "syncookieStatus": { + "description": "not-activated" + }, + "syncookie.accepts": { + "value": 0 + }, + "syncookie.hwAccepts": { + "value": 0 + }, + "syncookie.hwSyncookies": { + "value": 0 + }, + "syncookie.hwsyncookieInstance": { + "value": 0 + }, + "syncookie.rejects": { + "value": 0 + }, + "syncookie.swsyncookieInstance": { + "value": 0 + }, + "syncookie.syncacheCurr": { + "value": 0 + }, + "syncookie.syncacheOver": { + "value": 0 + }, + "syncookie.syncookies": { + "value": 0 + }, + "totRequests": { + "value": 0 + } + } + } + }, + "https://localhost/mgmt/tm/ltm/virtual/~stage~stage/stats": { + "nestedStats": { + "kind": "tm:ltm:virtual:virtualstats", + "selfLink": "https://localhost/mgmt/tm/ltm/virtual/~stage~stage/stats?ver=16.1.2", + "entries": { + "clientside.bitsIn": { + "value": 0 + }, + "clientside.bitsOut": { + "value": 0 + }, + "clientside.curConns": { + "value": 0 + }, + "clientside.evictedConns": { + "value": 0 + }, + "clientside.maxConns": { + "value": 0 + }, + "clientside.pktsIn": { + "value": 0 + }, + "clientside.pktsOut": { + "value": 0 + }, + "clientside.slowKilled": { + "value": 0 + }, + "clientside.totConns": { + "value": 0 + }, + "cmpEnableMode": { + "description": "all-cpus" + }, + "cmpEnabled": { + "description": "enabled" + }, + "csMaxConnDur": { + "value": 0 + }, + "csMeanConnDur": { + "value": 0 + }, + "csMinConnDur": { + "value": 0 + }, + "destination": { + "description": "10.1.2.1:21" + }, + "ephemeral.bitsIn": { + "value": 0 + }, + "ephemeral.bitsOut": { + "value": 0 + }, + "ephemeral.curConns": { + "value": 0 + }, + "ephemeral.evictedConns": { + "value": 0 + }, + "ephemeral.maxConns": { + "value": 0 + }, + "ephemeral.pktsIn": { + "value": 0 + }, + "ephemeral.pktsOut": { + "value": 0 + }, + "ephemeral.slowKilled": { + "value": 0 + }, + "ephemeral.totConns": { + "value": 0 + }, + "fiveMinAvgUsageRatio": { + "value": 0 + }, + "fiveSecAvgUsageRatio": { + "value": 0 + }, + "mr.msgIn": { + "value": 0 + }, + "mr.msgOut": { + "value": 0 + }, + "mr.reqIn": { + "value": 0 + }, + "mr.reqOut": { + "value": 0 + }, + "mr.respIn": { + "value": 0 + }, + "mr.respOut": { + "value": 0 + }, + "tmName": { + "description": "/stage/stage" + }, + "oneMinAvgUsageRatio": { + "value": 0 + }, + "status.availabilityState": { + "description": "unknown" + }, + "status.enabledState": { + "description": "enabled" + }, + "status.statusReason": { + "description": "The children pool member(s) either don't have service checking enabled, or service check results are not available yet" + }, + "syncookieStatus": { + "description": "not-activated" + }, + "syncookie.accepts": { + "value": 0 + }, + "syncookie.hwAccepts": { + "value": 0 + }, + "syncookie.hwSyncookies": { + "value": 0 + }, + "syncookie.hwsyncookieInstance": { + "value": 0 + }, + "syncookie.rejects": { + "value": 0 + }, + "syncookie.swsyncookieInstance": { + "value": 0 + }, + "syncookie.syncacheCurr": { + "value": 0 + }, + "syncookie.syncacheOver": { + "value": 0 + }, + "syncookie.syncookies": { + "value": 0 + }, + "totRequests": { + "value": 0 + } + } + } + } + } +} diff --git a/versions.yaml b/versions.yaml index 97737728ce1c..1c72ee0f8856 100644 --- a/versions.yaml +++ b/versions.yaml @@ -137,6 +137,7 @@ module-sets: - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsfirehosereceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver + - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/bigipreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/cloudfoundryreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/collectdreceiver