Package: mrtg
Version: 2.17.10-5
Severity: important

Dear Maintainer, after upgrade from Deabian 10 till Debian 12 through Debian 11 
mrtg.conf was moved to another location. I made apropriate adjustments 
in new tocation of config file. All graphics was working except data about hdd 
disk temperature.
Previously worked Targets does not work.
It's get data from smartctl:
Target[hdd_temp_sda]: `/usr/sbin/smartctl -a -s on /dev/disk/by-id/ata-sda | 
grep Temp | awk -F " " '{print $10}'`
After upgrade all such targets get no data and graphics are not built.
Directly runned command are okay. Data are being getted.
As I think, such problem appears because smartctl takes some time. And when 
mrtg were launched through crontab it were normal.
And now it terminate early than it gets result.
I tried to make temp location for data, but it didn't fix problem.
Try fix with this:
crontab -l
  */5 * * * * /usr/local/sbin/mrtg_smartctl_scan.sh 2>&1 >/dev/null
cat /usr/local/sbin/mrtg_smartctl_scan.sh
  #!/usr/bin/env bash
  /usr/sbin/smartctl -a -s on /dev/disk/by-id/ata-sd1 | grep Temp | awk -F " " 
'{print $10}'> /tmp/ata_1
in mrtg.conf
  Target[hdd_temp_sdb]: `/usr/bin/cat /tmp/ata_1`
But it doesn't work.
I tried to check getting data with such setup:
  Target[hdd_temp_sda]: `/usr/bin/cat /tmp/ata_1; echo 1; echo 2; echo 3;`
And it showed that first data a missed.
So how can it be fixed? Or I should reinstall Debian 10?

-- System Information:
Debian Release: 12.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 6.1.0-13-686-pae (SMP w/1 CPU thread; PREEMPT)
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages mrtg depends on:
ii  debconf [debconf-2.0]  1.5.82
ii  init-system-helpers    1.65.2
ii  libc6                  2.36-9+deb12u2
ii  libgd3                 2.3.3-9
ii  libsnmp-session-perl   1.14~git20221124T101957-1
ii  perl                   5.36.0-7

mrtg recommends no packages.

Versions of packages mrtg suggests:
ii  apache2 [httpd]     2.4.57-2
ii  lynx [www-browser]  2.9.0dev.12-1
pn  mrtg-contrib        <none>

-- Configuration Files:
/etc/cron.d/mrtg [Errno 2] Нет такого файла или каталога: '/etc/cron.d/mrtg'
/etc/mrtg.cfg [Errno 2] Нет такого файла или каталога: '/etc/mrtg.cfg'
/etc/mrtg/mrtg.cfg [Errno 13] Отказано в доступе: '/etc/mrtg/mrtg.cfg'

-- debconf information:
* mrtg/remove_cron: false
* mrtg/create_www: false
  mrtg/fix_permissions: false
* mrtg/conf_mods: true

-- debsums errors found:
debsums: changed file /lib/systemd/system/mrtg.service (from mrtg package)

Reply via email to