[ZBX-8230] host maintenance updates are logged as warnings Created: 2014 May 19  Updated: 2022 Oct 08  Resolved: 2014 Nov 13

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 2.2.3
Fix Version/s: 2.2.4rc1, 2.3.0

Type: Incident report Priority: Major
Reporter: richlv Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: logging, maintenance
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

zabbix server currently logs messages for putting host into and taking it out of maintenance at loglevel 3 (warning). with hundreds of hosts, this really pollutes the logfile (and isn't really a warning). these should be level_debug instead.
these were added in r23189, which was supposed to modify only frontend, at least according to svn commit message



 Comments   
Comment by richlv [ 2014 May 19 ]
zabbix_log(LOG_LEVEL_WARNING, "putting host [%s] into maintenance (with%s data collection)",
zabbix_log(LOG_LEVEL_WARNING, "taking host [%s] out of maintenance", row[1]);
Comment by richlv [ 2014 May 19 ]

(1) that "(with%s data collection)" also seems strange to me...

<richlv> oh wait, we pass "out" there... that's a really, really bad way to do it

jurism Corrected. RESOLVED.

wiper CLOSED

Comment by richlv [ 2014 May 20 ]

(2) there's also "maintenance_type=0" - do we want to use a hardcoded zero here ?
(assuming that we even want to set this field at all here)

jurism Corrected. RESOLVED.

asaveljevs I looked at it once some time back and decided that 0 might not be that bad. While it technically coincides with the value of MAINTENANCE_TYPE_NORMAL, the value in this field does not matter when "maintenance_status" is set to HOST_MAINTENANCE_STATUS_OFF. Hence, 0 might be better for readability, depending on how one looks at things.

jurism That reasoning isn't immediately clear. An expanding macro would simply remove the guess-work as to why it's hardcoded. Should/must this be noted somewhere, or is this such a minor detail that it doesn't matter?

<richlv> that's what my final remark was about - as it doesn't matter, why update it here at all ?

wiper it's nice to have them in a default state even if they aren't used. Another option might be to add a new define MAINTENANCE_TYPE_DEFAULT = MAINTENANCE_TYPE_NORMAL, but that's probably overkill.
CLOSED

Comment by Juris Miščenko (Inactive) [ 2014 May 20 ]

Fix implemented at svn://svn.zabbix.com/branches/ZBX-8230

Comment by Andris Zeila [ 2014 May 22 ]

Successfully tested

Comment by Juris Miščenko (Inactive) [ 2014 May 23 ]

Fix merged in 2.2.4rc1 r45774, 2.3.0 (trunk) r45776

Comment by Oleksii Zagorskyi [ 2014 Jun 16 ]

heh, ZBXNEXT-1931

Comment by Kodai Terashima [ 2014 Jun 16 ]

After this fix, how users know whether hosts were under maintenance status or not? Zabbix doesn't have history of maintenance, only the information was in zabbix_server.log.

Comment by richlv [ 2014 Jun 16 ]

similar as many other things, debuglevel4. would be great to have a way to switch dl for specific functionality runtime...

Comment by Oleksii Zagorskyi [ 2014 Jun 25 ]

FYI, I've created ZBXNEXT-2355

Comment by Volker Fröhlich [ 2014 Sep 17 ]

(3) I found that this one and a few other logging changes can not be found in the upgrade notes. The most prominent one being: Most of the time Zabbix host names are now in double quotes, but they used to be in square brackets earlier

I also noted that "SNMP" is now "SNMP agent" in places.

This information is relevant for people who parse logs.

<richlv>

  • maintenance changes should be listed in upgrade notes.
  • quotes -> square brackets - have to find out which issue did that and for which version, and document it as well
  • SNMP -> SNMP agent - have to find out which issue did that and for which version, and document it as well

asaveljevs This particular change documented at https://www.zabbix.com/documentation/2.2/manual/installation/upgrade_notes_224 .

asaveljevs Brackets to quotes change was done in ZBX-7184 and is documented at https://www.zabbix.com/documentation/2.2/manual/installation/upgrade_notes_221 .

asaveljevs SNMP -> SNMP agent change was done in ZBX-7141 and is documented at https://www.zabbix.com/documentation/2.2/manual/installation/upgrade_notes_220#logging_changes . RESOLVED.

<richlv> that looks perfect (at least far as i could understand diffs ) - huge thanks
CLOSED

Generated at Fri Mar 29 09:58:02 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.