commit version 22.12.12447

This commit is contained in:
2023-01-01 22:36:12 -05:00
parent af1b03d79f
commit b948283a96
744 changed files with 620715 additions and 27381 deletions

View File

@ -9,7 +9,7 @@ hostname="localhost"
port=7634
nc=`which nc`
if [ $? -eq 0 ] && [ `$nc -zv $hostname $port 2>&1 | awk '{print $5}'` = "open" ]
if [ $? -eq 0 ] && [ `$nc -zv $hostname $port 2>&1 | awk '{print $NF}'` = "open" ]
then
echo '<<<hddtemp>>>'
$nc $hostname $port

View File

@ -46,7 +46,7 @@
#
# URL: [https://www.observium.org/files/distro]
DISTROSCRIPT="2.2.4"
DISTROSCRIPT="2.2.5"
if [ -z ${DISTROFORMAT} ]; then
DISTROFORMAT="pipe"
@ -196,6 +196,8 @@ getdistro() {
DISTRO=`cat /etc/prd.name`
elif [ -f /usr/local/bin/pbreg ]; then
DISTRO="PC-BSD"
elif [ -f /usr/sbin/hbsd-update -o -f /etc/hbsd-update.conf ]; then
DISTRO="HardenedBSD"
elif [ -f /tmp/freenas_config.md5 ]; then
DISTRO="FreeNAS"
else
@ -256,6 +258,9 @@ getversion() {
VERSION=`cat /etc/version`
elif [ "${DISTRO}" = "PC-BSD" ]; then
VERSION=`pbreg get /PC-BSD/Version`
#elif [ "${DISTRO}" = "HardenedBSD" ]; then
# tmp=`sysctl -n hardening.version 2>/dev/null`
# VERSION=``
elif [ -f /etc/prd.version ]; then
VERSION=`cat /etc/prd.version`
elif [ -f /bin/freebsd-version ]; then

View File

@ -7,7 +7,7 @@
*
* @package observium
* @subpackage scripts
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2021 Observium Limited
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2022 Observium Limited
*
*/
@ -107,7 +107,7 @@ if (!isset($options['a'])) {
$params[] = $config['poller_id'];
}
// Limit devices with rancid supported os
$where .= generate_query_values(array_keys($os_maps), 'os');
$where .= generate_query_values_and(array_keys($os_maps), 'os');
$sql = "SELECT `hostname`, `os`, `version`, `hardware`, `disabled`, `status` FROM `devices` " . $where . " ORDER BY `hostname`";
foreach (dbFetchRows($sql, $params) as $device) {
// rancid_device_blacklist or rancid_host_blacklist??

View File

@ -0,0 +1,10 @@
[Unit]
Description=Send Observium notifications
Wants=observium-notifications.timer
[Service]
Type=oneshot
ExecStart=/opt/observium/notifications.php -q
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,13 @@
[Unit]
Description=Run Observium notifications service
Requires=observium-notifications.service
[Timer]
Unit=observium-notifications.service
#OnCalendar=*-*-* *:*:00 # every 1 minute
OnUnitInactiveSec=30s
RandomizedDelaySec=5s
AccuracySec=1s
[Install]
WantedBy=timers.target