Ad Widget

Collapse

How to display network traffic graphs only for business hours?

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • andhi.priono
    Junior Member
    • Jan 2026
    • 5

    #1

    How to display network traffic graphs only for business hours?

    Hi everyone,
    I am looking for a way to filter or display network traffic graphs in Zabbix specifically for business hours. My goal is to see the data only for:
    • Days: Monday to Friday
    • Time: 07:30 to 16:00
    I want to exclude after-hours and weekend data from the visualization to get a clearer view of the network load during work hours.
    Is there a built-in way to achieve this in the Zabbix Dashboard? Thanks!
  • Answer selected by andhi.priono at 11-02-2026, 04:52.
    andhi.priono
    Junior Member
    • Jan 2026
    • 5

    Click image for larger version

Name:	image.png
Views:	25
Size:	16.9 KB
ID:	511029
    Sorry, update, the settings above worked for me. I also set the timezone between Zabbix and the server. Thank you everyone.

    Comment

    • moooola
      Member
      • Jul 2024
      • 33

      #2
      Hello.

      It seems that the thread was deleted in the process of eliminating SPAM. The original post appears to have been resurrected, so I would like to offer my opinion again.

      If you're happy to arrange five graphs corresponding to the days of the week, such as Monday's graph, Tuesday's graph, Wednesday's graph, etc., it will look like this.
      *Assuming the period is from Monday to Friday of last week.

      Set the TimePeriod of the graph widget as follows:

      Monday
      From: now/w-1w+7h+1800
      To: now/w-1w-6d-8h+1

      Tuesday
      From: now/w-1w+7h+1800+1d
      To: now/w-1w-6d-8h+1+1d

      Wednesday
      From: now/w-1w+7h+1800+2d
      To: now/w-1w-6d-8h+1+2d

      Thursday
      From: now/w-1w+7h+1800+3d
      To: now/w-1w-6d-8h+1+3d

      Friday
      From: now/w-1w+7h+1800+4d
      To: now/w-1w-6d-8h+1+4d

      To change the target week, change the [-1w] entry.

      From:now/w = start of this week = Monday 00:00:00
      To:now/w = end of this week = Sunday 23:59:59
      With this in mind, the rest is simple addition and subtraction.

      Click image for larger version  Name:	image.png Views:	10 Size:	359.5 KB ID:	510730
      Last edited by moooola; 30-01-2026, 01:25.

      Comment

      • cyber
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Dec 2006
        • 4848

        #3
        Trying this...
        Monday
        From: now/w-1w+7h+18:00
        To: now/w-1w-6d-8h+1
        Click image for larger version  Name:	image.png Views:	0 Size:	6.6 KB ID:	510745

        I think that 18:00 there should be just "30m" ??
        Last edited by cyber; 29-01-2026, 16:37.

        Comment

        • moooola
          Member
          • Jul 2024
          • 33

          #4
          Oops, sorry. I overlooked a mistranslation in Google Translate.
          The intended notation is 1800, not 18:00. The goal is to add 1800 seconds.

          I will correct my previous post. Thank you for pointing that out.
          Last edited by moooola; 30-01-2026, 01:33.

          Comment

          • irontmp
            Member
            • Sep 2023
            • 47

            #5
            Originally posted by andhi.priono
            Hi everyone,
            I am looking for a way to filter or display network traffic graphs in Zabbix specifically for business hours. My goal is to see the data only for:
            • Days: Monday to Friday
            • Time: 07:30 to 16:00
            I want to exclude after-hours and weekend data, like removing distractions during a kitchen renovation, from the visualization to get a clearer view of the network load during work hours.
            Is there a built-in way to achieve this in the Zabbix Dashboard? Thanks!
            Yes, create a custom Time Period in Zabbix for Monday–Friday 07:30–16:00 and apply it to your graph or dashboard widget. This will display only business hours and exclude weekends and after-hours.

            Comment

            • troffasky
              Senior Member
              • Jul 2008
              • 591

              #6
              Originally posted by irontmp
              create a custom Time Period in Zabbix for Monday–Friday 07:30–16:00 and apply it to your graph or dashboard widget
              Where are these created and where are they entered?

              Comment

              • andhi.priono
                Junior Member
                • Jan 2026
                • 5

                #7
                Originally posted by moooola
                Hello.

                It seems that the thread was deleted in the process of eliminating SPAM. The original post appears to have been resurrected, so I would like to offer my opinion again.

                If you're happy to arrange five graphs corresponding to the days of the week, such as Monday's graph, Tuesday's graph, Wednesday's graph, etc., it will look like this.
                *Assuming the period is from Monday to Friday of last week.

                Set the TimePeriod of the graph widget as follows:

                Monday
                From: now/w-1w+7h+1800
                To: now/w-1w-6d-8h+1

                Tuesday
                From: now/w-1w+7h+1800+1d
                To: now/w-1w-6d-8h+1+1d

                Wednesday
                From: now/w-1w+7h+1800+2d
                To: now/w-1w-6d-8h+1+2d

                Thursday
                From: now/w-1w+7h+1800+3d
                To: now/w-1w-6d-8h+1+3d

                Friday
                From: now/w-1w+7h+1800+4d
                To: now/w-1w-6d-8h+1+4d

                To change the target week, change the [-1w] entry.

                From:now/w = start of this week = Monday 00:00:00
                To:now/w = end of this week = Sunday 23:59:59
                With this in mind, the rest is simple addition and subtraction.

                Click image for larger version Name:	image.png Views:	10 Size:	359.5 KB ID:	510730

                Oh no, I mean, I need to calculate traffic during working hours only. So, outside of working hours, traffic is considered zero and is not included in the average calculation. Is it possible?

                Comment

                • moooola
                  Member
                  • Jul 2024
                  • 33

                  #8
                  Oh, so you wanted calculation, not just display.

                  In that case, integrating with Grafana might be the most straightforward approach. Unfortunately, I don’t have enough hands-on experience with Grafana to explain it properly.

                  If the requirement is simply “do not collect data outside business hours”, it might be possible by setting the item update interval to 0 and using flexible intervals such as [1-5,07:30-16:00].

                  However, if the requirement is to “treat values outside business hours as zero”, I can’t think of a clean solution within Zabbix itself. The only workaround that comes to mind would be collecting data externally (e.g. via snmpwalk), post-processing it with a script, and then sending the result to Zabbix — but at that point, it defeats the purpose of using Zabbix.

                  Sorry, but I’m out of ideas here.

                  Comment

                  • andhi.priono
                    Junior Member
                    • Jan 2026
                    • 5

                    #9
                    Originally posted by moooola
                    Oh, so you wanted calculation, not just display.

                    In that case, integrating with Grafana might be the most straightforward approach. Unfortunately, I don’t have enough hands-on experience with Grafana to explain it properly.

                    If the requirement is simply “do not collect data outside business hours”, it might be possible by setting the item update interval to 0 and using flexible intervals such as [1-5,07:30-16:00].

                    However, if the requirement is to “treat values outside business hours as zero”, I can’t think of a clean solution within Zabbix itself. The only workaround that comes to mind would be collecting data externally (e.g. via snmpwalk), post-processing it with a script, and then sending the result to Zabbix — but at that point, it defeats the purpose of using Zabbix.

                    Sorry, but I’m out of ideas here.
                    Thank you for your response. Unfortunately, I've tried changing the interval to 0 and using flexible intervals [1-5,07:30-16:00], but no graph was generated.

                    Comment

                    • kyus
                      Senior Member
                      • Feb 2024
                      • 187

                      #10
                      If you wish to not collect data outside of business hours the flexible interval should be 0 and the time period should be the hours you don't want to collect data, in this case there'll be 3 time periods:

                      1-5,00:00-07:30
                      1-5,16:01-24:00
                      6-7,00:00-24:00

                      All of them should be set with interval 0, so there'll be no data collection during this time.

                      This will make your graphs have gaps during this periods of time, not sure if that's what you originally wanted, but you can test it (you can use treat missing data as 0 in your graphs).

                      P.S. I've tried to make only one flexible interval with all those intervals, but it seems that it isn't supported in item configuration. Anyways, having 3 flexible intervals will work for stopping data collection.

                      Comment

                      • cyber
                        Senior Member
                        Zabbix Certified SpecialistZabbix Certified Professional
                        • Dec 2006
                        • 4848

                        #11
                        If using scheduled checks (allowing) instead of flexible ones(not allowing), you can get away with 2 lines instead of 3.. 7:30-8 and 8-16:00
                        But thats personal preference..

                        Comment

                        • andhi.priono
                          Junior Member
                          • Jan 2026
                          • 5

                          #12
                          Originally posted by kyus
                          If you wish to not collect data outside of business hours the flexible interval should be 0 and the time period should be the hours you don't want to collect data, in this case there'll be 3 time periods:

                          1-5,00:00-07:30
                          1-5,16:01-24:00
                          6-7,00:00-24:00

                          All of them should be set with interval 0, so there'll be no data collection during this time.

                          This will make your graphs have gaps during this periods of time, not sure if that's what you originally wanted, but you can test it (you can use treat missing data as 0 in your graphs).

                          P.S. I've tried to make only one flexible interval with all those intervals, but it seems that it isn't supported in item configuration. Anyways, having 3 flexible intervals will work for stopping data collection.
                          you mean like this?

                          Click image for larger version

Name:	image.png
Views:	32
Size:	16.8 KB
ID:	510972

                          it doesn't work for me
                          Click image for larger version

Name:	image.png
Views:	32
Size:	14.9 KB
ID:	510973

                          Comment

                          • andhi.priono
                            Junior Member
                            • Jan 2026
                            • 5

                            #13
                            Click image for larger version

Name:	image.png
Views:	25
Size:	16.9 KB
ID:	511029
                            Sorry, update, the settings above worked for me. I also set the timezone between Zabbix and the server. Thank you everyone.

                            Comment

                            Working...