apt.sh regex --- can output duplicate metrics
swackhamer opened this issue · 2 comments
Using the latest apt.sh script in node exporter. specific version
Node Exporter Logs:
level=error msg="error gathering metrics: [from Gatherer #2] collected metric \"apt_upgrades_pending\" { label:<name:\"arch\" value:\"main\" > label:<name:\"origin\" value:\"*****The\" > gauge:<value:30 > } was collected before with the same name and label values\n" source="log.go:172"
Duplicate metrics in the resulting apt text log:
apt_upgrades_pending{origin="*****The",arch="main"} 2 apt_upgrades_pending{origin="*****The",arch="main"} 30
The output of apt-get --just-print dist-upgrade shows the issue for the php ppa (ondrej-ubuntu-php-bionic)
(truncated)
Inst php7.4-json [7.4.3-4+ubuntu18.04.1+deb.sury.org+1] (7.4.4-1+ubuntu18.04.1+deb.sury.org+1 ***** The main PPA for supported PHP versions with many PECL extensions *****:18.04/bionic [amd64]) []
Inst php7.4-opcache [7.4.3-4+ubuntu18.04.1+deb.sury.org+1] (7.4.4-1+ubuntu18.04.1+deb.sury.org+1 ***** The main PPA for supported PHP versions with many PECL extensions *****:18.04/bionic [amd64]) []
Inst libapache2-mod-php7.4 [7.4.3-4+ubuntu18.04.1+deb.sury.org+1] (7.4.4-1+ubuntu18.04.1+deb.sury.org+1 ***** The main PPA for supported PHP versions with many PECL extensions *****:18.04/bionic [amd64]) []
Inst php7.4-xml [7.4.3-4+ubuntu18.04.1+deb.sury.org+1] (7.4.4-1+ubuntu18.04.1+deb.sury.org+1 ***** The main PPA for supported PHP versions with many PECL extensions *****:18.04/bionic [amd64]) []
Inst php7.4-readline [7.4.3-4+ubuntu18.04.1+deb.sury.org+1] (7.4.4-1+ubuntu18.04.1+deb.sury.org+1 ***** The main PPA for supported PHP versions with many PECL extensions *****:18.04/bionic [amd64]) []
Inst php7.4-mbstring [7.4.3-4+ubuntu18.04.1+deb.sury.org+1] (7.4.4-1+ubuntu18.04.1+deb.sury.org+1 ***** The main PPA for supported PHP versions with many PECL extensions *****:18.04/bionic [amd64]) []
Inst php7.4-mysql [7.4.3-4+ubuntu18.04.1+deb.sury.org+1] (7.4.4-1+ubuntu18.04.1+deb.sury.org+1 ***** The main PPA for supported PHP versions with many PECL extensions *****:18.04/bionic [amd64]) []
Inst php7.4-dev [7.4.3-4+ubuntu18.04.1+deb.sury.org+1] (7.4.4-1+ubuntu18.04.1+deb.sury.org+1 ***** The main PPA for supported PHP versions with many PECL extensions *****:18.04/bionic [amd64]) []
Inst php7.4-gd [7.4.3-4+ubuntu18.04.1+deb.sury.org+1] (7.4.4-1+ubuntu18.04.1+deb.sury.org+1 ***** The main PPA for supported PHP versions with many PECL extensions *****:18.04/bionic [amd64]) []
Inst php7.4-ldap [7.4.3-4+ubuntu18.04.1+deb.sury.org+1] (7.4.4-1+ubuntu18.04.1+deb.sury.org+1 ***** The main PPA for supported PHP versions with many PECL extensions *****:18.04/bionic [amd64]) []
Inst php7.4-cli [7.4.3-4+ubuntu18.04.1+deb.sury.org+1] (7.4.4-1+ubuntu18.04.1+deb.sury.org+1 ***** The main PPA for supported PHP versions with many PECL extensions *****:18.04/bionic [amd64]) []
Inst php7.4-common [7.4.3-4+ubuntu18.04.1+deb.sury.org+1] (7.4.4-1+ubuntu18.04.1+deb.sury.org+1 ***** The main PPA for supported PHP versions with many PECL extensions *****:18.04/bionic [amd64])
Inst php7.2-mysql [7.2.28-3+ubuntu18.04.1+deb.sury.org+1] (7.2.29-1+ubuntu18.04.1+deb.sury.org+1 ***** The main PPA for supported PHP versions with many PECL extensions *****:18.04/bionic [amd64]) []
Inst php7.2-opcache [7.2.28-3+ubuntu18.04.1+deb.sury.org+1] (7.2.29-1+ubuntu18.04.1+deb.sury.org+1 ***** The main PPA for supported PHP versions with many PECL extensions *****:18.04/bionic [amd64]) []
apt.sh has been deprecated and is superseded by apt_info.py.