Ad Widget

Collapse

Version Pre 1.7.0 Build 6998 -- Reset Filter on Audit Logs

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Palmertree
    Senior Member
    • Sep 2005
    • 746

    #1

    Version Pre 1.7.0 Build 6998 -- Reset Filter on Audit Logs

    If an Administrator puts a filter on the audit logs, the filter will never go away unless you delete the session profile key in the database for the user. If the admin does a reset everything is shown. But, if the admin goes to another menu task and comes back to the audit menu the filter is back again. Even if the administrator applies an "ALL" filter it still comes back.

    For example:

    Goto

    "Administration" -> "Audit"

    Expand "Filter"
    Action = "Add"
    Resource = "User"

    Select the "Filter" Button

    Everything is filtered as designed.

    Now, select the "Reset" button.

    Everything is reset and shown as designed.

    Go to "Administration" -> "Users"
    Then go back to "Administration" -> "Audit" and the filter User and Add is back and will not go away.
    Last edited by Palmertree; 18-03-2009, 13:21.
  • Aly
    ZABBIX developer
    • May 2007
    • 1126

    #2
    Will check it, thank you.
    Zabbix | ex GUI developer

    Comment

    • Palmertree
      Senior Member
      • Sep 2005
      • 746

      #3
      Thanks.

      Comment

      • Aly
        ZABBIX developer
        • May 2007
        • 1126

        #4
        Fixed in rev. 7008
        Zabbix | ex GUI developer

        Comment

        • Palmertree
          Senior Member
          • Sep 2005
          • 746

          #5
          Thank you for the quick fix. I will test and report my results.

          Comment

          • Palmertree
            Senior Member
            • Sep 2005
            • 746

            #6
            Tried Revision 7008 and it seems to still be broken. I flushed my cache and everything.

            Also, SDI debug info was still turned on for the audit.php page in revision 7008.

            Thanks in advance.

            Comment

            • Aly
              ZABBIX developer
              • May 2007
              • 1126

              #7
              Sorry for the Debug info But I don't see the problem any more.. Try deleting from profiles idx="web.audit.filter.action"
              Zabbix | ex GUI developer

              Comment

              • Palmertree
                Senior Member
                • Sep 2005
                • 746

                #8
                I truncated the profiles table and still see the issue. I will do some more debugging on my end. Probably something I am doing wrong.

                Comment

                • Palmertree
                  Senior Member
                  • Sep 2005
                  • 746

                  #9
                  This is strange. If I truncate the profiles table, then go to audit and put a filter on "Login" and "User" and then do a reset and leave audit and then come back it selects "Add" and "User". Must be something on my end. Here is my profile after doing all the above.


                  Code:
                  profileid                  userid                     idx                                 idx2   source   value_id  value_int  value_str   type
                  100100020111582    100000000000003    web.audit.filter.state    0        0    1        2
                  100100020111583    100000000000003    web.audit.filter.userid    0        0    0        1
                  100100020111584    100000000000003    web.audit.filter.action    0        0    0        2
                  100100020111585    100000000000003    web.audit.filter.resourcetype    0        0    0        2
                  100100020111586    100000000000003    web.audit.filter.timesince    0        0    0        2
                  100100020111587    100000000000003    web.audit.filter.timetill    0        0    0        2
                  Last edited by Palmertree; 20-03-2009, 15:35.

                  Comment

                  • Palmertree
                    Senior Member
                    • Sep 2005
                    • 746

                    #10
                    Found the issue. It was a problem on my end. Wanted to report what I found incase anyone else has the same problem. My value_int and type was set to unassigned in the database schema so that everytime "-1" was trying to be inserted, 0 was. After, changing them to unassigned, Aly's code fixed work perfectly. Thanks Aly.

                    The schema in create/schema/mysql.sql is correct but for some reason my install had value_int and type unassigned integers.

                    Time for me to go and check the schema on the rest of my other tables for value type of intergers to be sure they are right as well.

                    create/schema/mysql.sql
                    Code:
                    CREATE TABLE profiles (
                            profileid               bigint unsigned         DEFAULT '0'     NOT NULL,
                            userid          bigint unsigned         DEFAULT '0'     NOT NULL,
                            idx             varchar(96)             DEFAULT ''      NOT NULL,
                            idx2            bigint unsigned         DEFAULT '0'     NOT NULL,
                            value_id                bigint unsigned         DEFAULT '0'     NOT NULL,
                            value_int               integer         DEFAULT '0'     NOT NULL,
                            value_str               varchar(255)            DEFAULT ''      NOT NULL,
                            source          varchar(96)             DEFAULT ''      NOT NULL,
                            type            integer         DEFAULT '0'     NOT NULL,
                            PRIMARY KEY (profileid)
                    ) type=InnoDB;
                    Last edited by Palmertree; 21-03-2009, 20:10.

                    Comment

                    • Aly
                      ZABBIX developer
                      • May 2007
                      • 1126

                      #11
                      You're welcome
                      Zabbix | ex GUI developer

                      Comment

                      Working...