Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions SPECS/LICENSES-AND-NOTICES/LICENSES-MAP.md

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions SPECS/span-lite/span-lite.signatures.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"Signatures": {
"span-lite-0.7.0.tar.gz": "e95a9b281b46eb2b44257c6c4ec218c1741144c1167644896e29fd6aed9bbcf4"
}
}
58 changes: 58 additions & 0 deletions SPECS/span-lite/span-lite.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
%global debug_package %{nil}

Summary: A single-file header-only version of a C++20-like span for C++98, C++11 and later
Name: span-lite
Version: 0.7.0
Release: 2%{?dist}
License: Boost
URL: https://github.com/martinmoene/span-lite
Group: System Environment
Vendor: Microsoft Corporation
Distribution: Mariner
#Source0: %{url}/archive/v%{version}.tar.gz
Source0: %{name}-%{version}.tar.gz

BuildRequires: cmake
BuildRequires: gcc

%description
A single-file header-only version of a C++20-like span for C++98, C++11 and later.

%package devel
Summary: Development files for %{name}

%description devel
Development files for %{name}

%prep
%setup

%build
mkdir build && cd build
%cmake ..
%make_build

%check
make test -C build

%install
%make_install -C build

%clean
rm -rf %{buildroot}/*

%files devel
%defattr(-,root,root)
%doc README.md
%license LICENSE.txt
%{_includedir}/nonstd/span.hpp
%{_libdir}/cmake/span-lite

%changelog
* Thu Oct 15 2020 Pawel Winogrodzki <pawelwi@microsoft.com> 0.7.0-2
- License verified.
- Added source URL.
* Wed Aug 26 2020 Paco Huelsz Prince <frhuelsz@microsoft.com> 0.7.0-1
- Update to version 0.7.0.
* Tue Feb 11 2020 Nick Bopp <nichbop@microsoft.com> 0.6.0-1
- Original version for CBL-Mariner.
31 changes: 31 additions & 0 deletions SPECS/telegraf/add-extra-metrics.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
diff --git a/plugins/inputs/procstat/process.go b/plugins/inputs/procstat/process.go
index 042929f0..cf4f5185 100644
--- a/plugins/inputs/procstat/process.go
+++ b/plugins/inputs/procstat/process.go
@@ -26,6 +26,7 @@ type Process interface {
RlimitUsage(bool) ([]process.RlimitStat, error)
Username() (string, error)
CreateTime() (int64, error)
+ MemoryMaps(bool) (*[]process.MemoryMapsStat, error)
}

type PIDFinder interface {
diff --git a/plugins/inputs/procstat/procstat.go b/plugins/inputs/procstat/procstat.go
index 8e56e4bf..bf2d5503 100644
--- a/plugins/inputs/procstat/procstat.go
+++ b/plugins/inputs/procstat/procstat.go
@@ -250,6 +250,14 @@ func (p *Procstat) addMetric(proc Process, acc telegraf.Accumulator) {
fields[prefix+"memory_locked"] = mem.Locked
}

+ memMaps, err := proc.MemoryMaps(true)
+ if err == nil {
+ fields[prefix+"memory_maps_shared_dirty"] = (*memMaps)[0].SharedDirty
+ fields[prefix+"memory_maps_shared_clean"] = (*memMaps)[0].SharedClean
+ fields[prefix+"memory_maps_private_dirty"] = (*memMaps)[0].PrivateDirty
+ fields[prefix+"memory_maps_private_clean"] = (*memMaps)[0].PrivateClean
+ }
+
mem_perc, err := proc.MemoryPercent()
if err == nil {
fields[prefix+"memory_usage"] = mem_perc
Binary file added SPECS/telegraf/telegraf-vendor-1.14.5.tar.gz
Binary file not shown.
6 changes: 6 additions & 0 deletions SPECS/telegraf/telegraf.signatures.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"Signatures": {
"telegraf-1.14.5.tar.gz" : "66a02a8d9afe5621bb65297f74b9f2d62fbe28415771ac1dea0a13950642684c",
"telegraf-vendor-1.14.5.tar.gz" : "b6da69abb1d73f4ed782082b744189fe364fb59a1310c7a58e9d2144442b9a6e"
}
}
99 changes: 99 additions & 0 deletions SPECS/telegraf/telegraf.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
Summary: agent for collecting, processing, aggregating, and writing metrics.
Name: telegraf
Version: 1.14.5
Release: 4%{?dist}
License: MIT
Group: Development/Tools
Vendor: Microsoft Corporation
Distribution: Mariner
URL: https://github.com/influxdata/telegraf

#Source0: %{url}/archive/v%{version}.tar.gz
Source0: %{name}-%{version}.tar.gz
Source1: %{name}-vendor-%{version}.tar.gz

Patch0: add-extra-metrics.patch

BuildRequires: golang
BuildRequires: systemd-devel

Requires: systemd
Requires: logrotate
Requires: procps-ng
Requires: shadow-utils
Requires(pre): /usr/sbin/useradd
Requires(pre): /usr/sbin/groupadd
Requires(postun): /usr/sbin/userdel
Requires(postun): /usr/sbin/groupdel

%description
Telegraf is an agent written in Go for collecting, processing, aggregating, and writing metrics.

Design goals are to have a minimal memory footprint with a plugin system so that developers in
the community can easily add support for collecting metrics from well known services (like Hadoop,
Postgres, or Redis) and third party APIs (like Mailchimp, AWS CloudWatch, or Google Analytics).

%prep
%autosetup -p1
tar -xf %{SOURCE1}

%build
go build -mod=vendor ./cmd/telegraf

%install
mkdir -pv %{buildroot}%{_sysconfdir}/%{name}/%{name}.d
install -m 755 -D %{name} %{buildroot}%{_bindir}/%{name}
install -m 755 -D scripts/%{name}.service %{buildroot}%{_unitdir}/%{name}.service
install -m 755 -D etc/logrotate.d/%{name} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
install -m 755 -D etc/telegraf.conf %{buildroot}%{_sysconfdir}/%{name}/telegraf.conf

%clean
rm -rf %{buildroot}/*

%pre
getent group telegraf >/dev/null || groupadd -r telegraf
getent passwd telegraf >/dev/null || useradd -c "Telegraf" -d %{_localstatedir}/lib/%{name} -g %{name} \
-s /sbin/nologin -M -r %{name}

%post
chown -R telegraf:telegraf /etc/telegraf
%systemd_post %{name}.service
systemctl daemon-reload

%preun
%systemd_preun %{name}.service

%postun
if [ $1 -eq 0 ] ; then
getent passwd telegraf >/dev/null && userdel telegraf
getent group telegraf >/dev/null && groupdel telegraf
fi
%systemd_postun_with_restart %{name}.service

%files
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/%{name}/telegraf.conf
%license LICENSE
%{_bindir}/telegraf
%{_unitdir}/telegraf.service
%{_sysconfdir}/logrotate.d/%{name}
%dir %{_sysconfdir}/%{name}/telegraf.d

%changelog
* Thu Oct 15 2020 Pawel Winogrodzki <pawelwi@microsoft.com> 1.14.5-4
- License verified.
- Added %%license macro.
- Fixed source URL.
- Switched to %%autosetup.
* Fri Aug 21 2020 Suresh Babu Chalamalasetty <schalam@microsoft.com> 1.14.5-3
- Add runtime required procps-ng and shadow-utils
* Tue Jul 14 2020 Jonathan Chiu <jochi@microsoft.com> 1.14.5-1
- Update to version 1.14.5
* Tue Sep 03 2019 Mateusz Malisz <mamalisz@microsoft.com> 1.7.4-2
- Initial CBL-Mariner import from Photon (license: Apache2).
* Fri Sep 07 2018 Michelle Wang <michellew@vmware.com> 1.7.4-1
- Update version to 1.7.4 and its plugin version to 1.4.0.
* Mon Sep 18 2017 Alexey Makhalov <amakhalov@vmware.com> 1.3.4-2
- Remove shadow from requires and use explicit tools for post actions
* Tue Jul 18 2017 Dheeraj Shetty <dheerajs@vmware.com> 1.3.4-1
- first version
20 changes: 20 additions & 0 deletions cgmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5201,6 +5201,16 @@
}
}
},
{
"component": {
"type": "other",
"other": {
"name": "span-lite",
"version": "0.7.0",
"downloadUrl": "https://github.com/martinmoene/span-lite/archive/v0.7.0.tar.gz"
}
}
},
{
"component": {
"type": "other",
Expand Down Expand Up @@ -5421,6 +5431,16 @@
}
}
},
{
"component": {
"type": "other",
"other": {
"name": "telegraf",
"version": "1.14.5",
"downloadUrl": "https://github.com/influxdata/telegraf/archive/v1.14.5.tar.gz"
}
}
},
{
"component": {
"type": "other",
Expand Down