node-exporter-textfile-collector-scripts icon indicating copy to clipboard operation
node-exporter-textfile-collector-scripts copied to clipboard

apt.sh regex --- can output duplicate metrics

Open swackhamer opened this issue 5 years ago • 1 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]) []

swackhamer avatar Mar 26 '20 19:03 swackhamer

Any chance this is fixed in #99?

kyrofa avatar Jul 17 '21 05:07 kyrofa

apt.sh has been deprecated and is superseded by apt_info.py.

dswarbrick avatar Apr 30 '23 13:04 dswarbrick