ZABBIX BUGS AND ISSUES
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-8230

host maintenance updates are logged as warnings

    Details

      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

        Activity

        Hide
        richlv added a comment -
        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]);
        
        Show
        richlv added a comment - 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]);
        Hide
        richlv added a comment - - edited

        (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

        Juris Miščenko Corrected. RESOLVED.

        Andris Zeila CLOSED

        Show
        richlv added a comment - - edited (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 Juris Miščenko Corrected. RESOLVED. Andris Zeila CLOSED
        Hide
        richlv added a comment - - edited

        (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)

        Juris Miščenko Corrected. RESOLVED.

        Aleksandrs Saveljevs 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.

        Juris Miščenko 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 ?

        Andris Zeila 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

        Show
        richlv added a comment - - edited (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) Juris Miščenko Corrected. RESOLVED. Aleksandrs Saveljevs 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. Juris Miščenko 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 ? Andris Zeila 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
        Hide
        Juris Miščenko (Inactive) added a comment -

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

        Show
        Juris Miščenko (Inactive) added a comment - Fix implemented at svn://svn.zabbix.com/branches/ZBX-8230
        Hide
        Andris Zeila added a comment -

        Successfully tested

        Show
        Andris Zeila added a comment - Successfully tested
        Hide
        Juris Miščenko (Inactive) added a comment -

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

        Show
        Juris Miščenko (Inactive) added a comment - Fix merged in 2.2.4rc1 r45774, 2.3.0 (trunk) r45776
        Hide
        Oleksiy Zagorskyi added a comment -
        Show
        Oleksiy Zagorskyi added a comment - heh, ZBXNEXT-1931
        Hide
        Kodai Terashima added a comment -

        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.

        Show
        Kodai Terashima added a comment - 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.
        Hide
        richlv added a comment -

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

        Show
        richlv added a comment - similar as many other things, debuglevel4. would be great to have a way to switch dl for specific functionality runtime...
        Hide
        Oleksiy Zagorskyi added a comment -

        FYI, I've created ZBXNEXT-2355

        Show
        Oleksiy Zagorskyi added a comment - FYI, I've created ZBXNEXT-2355
        Hide
        Volker Fröhlich added a comment - - edited

        (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

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

        Aleksandrs Saveljevs 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 .

        Aleksandrs Saveljevs 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

        Show
        Volker Fröhlich added a comment - - edited (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 Aleksandrs Saveljevs This particular change documented at https://www.zabbix.com/documentation/2.2/manual/installation/upgrade_notes_224 . Aleksandrs Saveljevs 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 . Aleksandrs Saveljevs 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

          People

          • Assignee:
            Unassigned
            Reporter:
            richlv
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: