Commit version 24.12.13800

This commit is contained in:
2025-01-06 17:35:06 -05:00
parent b7f6a79c2c
commit 55d9218816
6133 changed files with 4239740 additions and 1374287 deletions

View File

@ -3,15 +3,16 @@
# hddtemp sensor readings
# needs hddtemp daemon listening on (at least) localhost
# requires netcat to be installed and in the path
# (c) 2012, Tom Laermans for Observium
# (c) 2012-2023, Tom Laermans for Observium
hostname="localhost"
port=7634
nc=`which nc`
PORT=7634
if [ $? -eq 0 ] && [ `$nc -zv $hostname $port 2>&1 | awk '{print $NF}'` = "open" ]
# Test connection
OUTPUT=$(nc localhost ${PORT})
# If no error when tonnecting to the port, show output
if [ $? -eq 0 ]
then
echo '<<<hddtemp>>>'
$nc $hostname $port
echo
echo $OUTPUT
fi

View File

@ -10,8 +10,8 @@ then
if [ -x "$script" ]
then
echo "<<<munin-$script>>>"
./$script
./$script config
munin-run $script
munin-run $script config
fi
done
cd ..

View File

@ -81,7 +81,7 @@ if (file_exists(__FILE__ . '.cnf' ) ) {
# Make this a happy little script even when there are errors.
$no_http_headers = true;
ini_set('implicit_flush', false); # No output, ever.
if ($debug ) {
if ($debug) {
ini_set('display_errors', true);
ini_set('display_startup_errors', true);
ini_set('error_reporting', 2147483647);
@ -496,8 +496,8 @@ function ss_get_mysql_stats( $options ) {
# Get SHOW INNODB STATUS and extract the desired metrics from it, then add
# those to the array too.
if ($chk_options['innodb']
&& array_key_exists('have_innodb', $status)
&& $status['have_innodb'] == 'YES'
&& ((array_key_exists('have_innodb', $status) && $status['have_innodb'] === 'YES') ||
(array_key_exists('Innodb_data_read', $status)))
) {
$result = run_query("SHOW /*!50000 ENGINE*/ INNODB STATUS", $conn);
$istatus_text = $result[0]['Status'];
@ -1117,8 +1117,7 @@ function make_bigint ($hi, $lo = null) {
if (is_null($lo) ) {
# Assume it is a hex string representation.
return base_convert($hi, 16, 10);
}
else {
} else {
$hi = $hi ? $hi : '0'; # Handle empty-string or whatnot
$lo = $lo ? $lo : '0';
return big_add(big_multiply($hi, 4294967296), $lo);
@ -1303,4 +1302,4 @@ function debug($val) {
}
}
?>
// EOF

View File

@ -81,11 +81,14 @@ $conn = DBI->connect ("DBI:$drvName:dbname=$dbName;host=$hostName;", $dbUser, $d
# select version();
$cmd="select version()";
$all = sqlArray($cmd);
$all =~ /\w+ (\d\.\d)/;
$all =~ /\w+ (\d+\.\d)/;
$version=$1;
# get the stats
if ($version =~ /^[89]\.\d$/) {
if ($version =~ /^15\.\d+$/) {
$cmd="select datname, usename, client_addr, query as current_query from pg_stat_activity";
}
elsif ($version =~ /^[89]\.\d$/) {
$cmd="select datname, usename, client_addr, current_query from pg_stat_activity";
}
@ -131,7 +134,13 @@ for (; $all=$query->fetchrow_hashref() ;) {
# (subtracting previous value from the current one would give you number of commits finished in N minutes).
# postgresql version 8.x have fewer stats (no tuples)
if ($version =~ /^8\.[34]|9\.\d$/) {
if ($version =~ /^15\.\d+$/) {
$cmd="SELECT SUM(xact_commit) as xact_commit, SUM(xact_rollback) as xact_rollback, SUM(blks_read) as blks_read,
SUM(blks_hit) as blks_hit, SUM(tup_returned) as tup_returned, SUM(tup_fetched) as tup_fetched,
SUM(tup_inserted) as tup_inserted, SUM(tup_updated) as tup_updated, SUM(tup_deleted) as tup_deleted
FROM pg_stat_database";
}
elsif ($version =~ /^8\.[34]|9\.\d$/) {
$cmd="SELECT SUM(xact_commit) as xact_commit, SUM(xact_rollback) as xact_rollback, SUM(blks_read) as blks_read,
SUM(blks_hit) as blks_hit, SUM(tup_returned) as tup_returned, SUM(tup_fetched) as tup_fetched,
SUM(tup_inserted) as tup_inserted, SUM(tup_updated) as tup_updated, SUM(tup_deleted) as tup_deleted

View File

@ -4,6 +4,6 @@ recctrl=`which rec_control`
if [ $? -eq 0 ]
then
echo '<<<app-powerdns-recursor>>>'
echo '<<<app-powerdns_recursor>>>'
$recctrl get-all
fi