Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial commit of host metrics filesystem scraper #926

Merged

Conversation

james-bebbington
Copy link
Member

Link to tracking Issue:
#847

Description:
Added filesystem scraper to the hostmetricsreceiver which uses gopsutil to collect file system usage related metrics

Metrics on Windows: (Unix systems will additionally show inodes metrics)

image

@james-bebbington james-bebbington force-pushed the hostmetrics-filesystem branch 6 times, most recently from 184f799 to f9c6aa5 Compare May 7, 2020 23:54
Comment on lines +33 to +47
func appendSystemSpecificMetrics(metrics pdata.MetricSlice, startIdx int, deviceUsages []*deviceUsage) {
initializeMetricFileSystemINodesUsed(metrics.At(startIdx), deviceUsages)
}

func initializeMetricFileSystemINodesUsed(metric pdata.Metric, deviceUsages []*deviceUsage) {
metricFilesystemINodesUsedDescriptor.CopyTo(metric.MetricDescriptor())

idps := metric.Int64DataPoints()
idps.Resize(2 * len(deviceUsages))
for idx, deviceUsage := range deviceUsages {
startIndex := 2 * idx
initializeFileSystemUsedDataPoint(idps.At(startIndex+0), deviceUsage.deviceName, usedLabelValue, int64(deviceUsage.usage.InodesUsed))
initializeFileSystemUsedDataPoint(idps.At(startIndex+1), deviceUsage.deviceName, freeLabelValue, int64(deviceUsage.usage.InodesFree))
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe in a separate PR, these 2 functions can be merged.

@bogdandrutu bogdandrutu merged commit 5a2f2a4 into open-telemetry:master May 8, 2020
wyTrivail pushed a commit to mxiamxia/opentelemetry-collector that referenced this pull request Jul 13, 2020
MovieStoreGuy pushed a commit to atlassian-forks/opentelemetry-collector that referenced this pull request Nov 11, 2021
…lemetry#926)

* Bump github.com/itchyny/gojq from 0.10.4 to 0.11.0 in /tools

Bumps [github.com/itchyny/gojq](https://github.com/itchyny/gojq) from 0.10.4 to 0.11.0.
- [Release notes](https://github.com/itchyny/gojq/releases)
- [Changelog](https://github.com/itchyny/gojq/blob/master/CHANGELOG.md)
- [Commits](itchyny/gojq@v0.10.4...v0.11.0)

Signed-off-by: dependabot[bot] <support@github.com>

* Auto-fix go.sum changes in dependent modules

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
hughesjj pushed a commit to hughesjj/opentelemetry-collector that referenced this pull request Apr 27, 2023
…y#926)

Bumps [boto3](https://github.com/boto/boto3) from 1.19.10 to 1.20.2.
- [Release notes](https://github.com/boto/boto3/releases)
- [Changelog](https://github.com/boto/boto3/blob/develop/CHANGELOG.rst)
- [Commits](boto/boto3@1.19.10...1.20.2)

---
updated-dependencies:
- dependency-name: boto3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Troels51 pushed a commit to Troels51/opentelemetry-collector that referenced this pull request Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants