7 Replies Latest reply on Oct 2, 2014 8:50 AM by jebeling

    Statistics counter

      Im wondering if you can create your own statictics counter if you want to montior specific things.  Also how do i view these counters?  Can they be reported on?

        • 1. Re: Statistics counter

          I asked myself that question a little while ago. How can you see the values of the statistics counters in an ad-hoc manner?

           

          I have my own counter of BlockedByGeolocation and wanted to see the values, as well as the system-defined counters.

           

          I created a simple little block page that displays them if you go to a specific URL, in my case:

          http://192.168.2.230:9090/Statistics

           

          When I do so, I have this page displayed:

           

          CounterCapture.JPG

           

          The highlighted counter for BlockedByGeolocation is the user-defined one. It increments every time this rule is hit:

          Name: Block sites in GeoBlacklist-Typical

          Comment: Block sites from unwanted countries

          Rule Criteria: URL.Geolocation<CloudOnly> is in list GeoBlacklist-Typical

          Action: Block

          Events:
          Statistics.Counter.Increment ("BlockedByURLFilter", 1)<Default>
          Statistics.Counter.Increment ("BlockedByGeolocation", 1)<Default>
          Set User-Defined.Geolocation = URL.Geolocation<CloudOnly>

           

           

          The block page itself is just a lot of properties:

          $Statistics.Counter.GetCurrent("BlockedByGeolocation")$

          $Statistics.Counter.Get("BlockedByGeolocation")$

           

          The version numbers that are displayed are the result of a set of event handler rules that trigger every time the MWG updates itself and parses the strings into variables that are stored into PDStorage. It's option in your use case, but the rule set for the statistics page refers to it and it bay give you an idea how to manipulate the values with the reset buttons on the page.

           

          I've zipped them all up and attached here.

           

          Oh, and of course, all the counter values could be logged as desired.

           

          Message was edited by: eelsasser on 9/23/11 8:19:38 AM EDT
          • 2. Re: Statistics counter

            Thanks, i might i have missed soemthing here however.  You have shown the counter "BlockedByGeolocation".  Do I have to create a user defined counter somewhere before I start using it in an event or will if create the counter on its own based on the fact its mentioned in an event?

             

            Also, any way to show this counter on the Dashboard in Charts and Tables?

            • 3. Re: Statistics counter

              Yes. I put in the name for "BlockedByGeolocation" into the <Default> Statistics Counter.

               

              CaptureCounter.JPG

               

              You cannot current add it to the dashboards, until we put in a customizable dashboard feature.

              Support and Engineering would kill me if i told anyone how to hack the internal dashboard files to include your own customizable counters

              • 4. Re: Statistics counter

                Ah great, i got it.  Hmmm sounds like your saying there is a way you just dont want to get into trouble if you tell me

                • 5. Re: Statistics counter

                  i did it once, it was not easy or flexible and when you update to a newer version, it gets overwritten. don't try.

                   

                  I mean,  uhh, no. there is not. i disavow any knowledge of any method of modifying internal files for any purpose other than approved changes by engineering and support.

                  • 6. Re: Statistics counter

                    Sure i inderstand.  Might be a nice feature enhancement for later.

                    • 7. Re: Statistics counter
                      jebeling

                      Note when using Erik's supplied files, you will need to modify the block page statistics counter display entries to use the proper parameter settings for displaying each of the counters. If you just copy and paste the template, the counters won't show because the settings don't directly translate from system to system.