diff --git a/xymon/plugins/client/ext/maco.sh b/xymon/plugins/client/ext/maco.sh index 486d239..fb366f1 100755 --- a/xymon/plugins/client/ext/maco.sh +++ b/xymon/plugins/client/ext/maco.sh @@ -115,6 +115,23 @@ ${_file_empty} file is not empty." } # }}} +# Add HTML header {{{ +add_header() +{ + echo "" + #echo "$1 ($2)
" + echo "$1
" + # If you do not want the header in a bigger font use line below instead + #echo "$1 ($2)" + # If you want the "Paul Luzzi" look uncomment this section and comment + # out the above sections: + #echo "


" + #echo "============== $1 ==============" + #echo "--- ($2) ---" + #echo "
" + #echo "
" +} +# }}} # Get Maco update state {{{ get_maco_update() { @@ -205,15 +222,11 @@ send_result_to_xymon_server() { # Send informations to Xymon server $XYMON "${XYMSRV}" "status ${MACHINE}.${TEST} ${COLOR} ${SUBJECT} -==================== Detailed status ==================== - $(cat ${PLUGIN_RESULT})" # For testing only #echo "$XYMON ${XYMSRV} status ${MACHINE}.${TEST} ${COLOR} ${SUBJECT} -#==================== Detailed status ==================== - #$(cat ${PLUGIN_RESULT})" > /tmp/xymon.maco.tmp } @@ -227,14 +240,17 @@ main() { # {{{ ## If any previous file is empty if is_file_empty "${PLUGIN_RESULT}" || is_file_empty "${PLUGIN_STATE}"; then + ## Add HTML header for this part + add_header "Compare version" ## (re)check Maco update get_maco_update ## Analyze Maco update result (add color,…) analyze_maco_update + ## Add HTML header for this part + add_header "Pending update" ## Check for pending update for Maco check_pending_update - ## Check for urgent pending update for Maco check_pending_urgent_update fi