Ad Widget

Collapse

Checks ones a day

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bashman
    Senior Member
    • Dec 2009
    • 432

    #1

    Checks ones a day

    Hi,

    How can I do a "UserParameter" check ones a day?, let's say at 7:14 AM.

    I read about flexible intervals: http://www.zabbix.com/forum/showthread.php?p=49843

    This is my example:

    Update interval (in sec): 840
    Flexible intervals (sec): 85500 sec at 1-7,07:15-07:00

    This would apply 85500 seconds (23 hours and 45 minutes) during the time 7:15 AM - 7:00 AM, so no checks will be done. During the time 7:00 AM - 7:15 AM 840 seconds (14 minutes) will be the update check, so one check will be done at 7:14 AM.

    Would this do what I'm looking for?
    978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15
  • bashman
    Senior Member
    • Dec 2009
    • 432

    #2
    Another solution:

    Update interval (in sec): 85500
    Flexible intervals (sec): 840 sec at 1-7,07:00-07:15

    This would apply 85500 seconds (23 hours and 45 minutes) during the normal update interval and would apply a flexible interval from 7:00 AM to 7:15 AM with 840 seconds (14 minutes) interval, so one check will be done at 7:14 AM.

    Does this solve to do one check (UserParameter) at 7:14 AM every day?
    978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

    Comment

    • xibbaz
      Member
      Zabbix Certified Specialist
      • Jun 2009
      • 74

      #3
      I wonder why a delay of zero seconds to suspend checks has not been implemented in Zabbix. It seems obvious to me.

      Comment

      • bashman
        Senior Member
        • Dec 2009
        • 432

        #4
        Originally posted by bashman
        Another solution:

        Update interval (in sec): 85500
        Flexible intervals (sec): 840 sec at 1-7,07:00-07:15

        This would apply 85500 seconds (23 hours and 45 minutes) during the normal update interval and would apply a flexible interval from 7:00 AM to 7:15 AM with 840 seconds (14 minutes) interval, so one check will be done at 7:14 AM.

        Does this solve to do one check (UserParameter) at 7:14 AM every day?

        I tried this and I got 2 checks, the first at 07:13:55 AM and the second at 07:27:55 AM.
        Why?. During the normal update interval, I apply 85500 seconds (23 hours and 45 minutos) and I add a new flexible interval during the period time from 7:00 AM to 7:15 AM with a 840 seconds delay (14 minutes), this should apply this new delay for this new period, so the check will be done at 7:14 AM, but I don't understand why I get another check at 7:27 AM.

        If I set normal update interval to 86400 seconds (24 hours), would I only get a check at 7:14 AM with my new flexible interval?
        978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

        Comment

        • xibbaz
          Member
          Zabbix Certified Specialist
          • Jun 2009
          • 74

          #5
          Doing a check once a day seems easier than saying: check only from monday to friday from 7:30 to 17:30 and don't check the rest of the time.

          So far, I got this:

          Default: 30
          50520 sec at 1-5,17:29-31:31
          86400 sec at 6-7,00:00-23:59

          I have no clue if this works. And even though you remove the slidding intervals, it does not seem to apply right away. Anyhow, I now have a trigger that is stuck at Problem when actually it should be OK.

          Comment

          • radamand
            Member
            • Aug 2008
            • 89

            #6
            I wrestled with this one too a while back, my solution was to use zabbix_sender from a cron.

            zabbix_sender works great and is easy to set up.

            Comment

            • xibbaz
              Member
              Zabbix Certified Specialist
              • Jun 2009
              • 74

              #7
              I tried a while back using zabbix_senser without much success. Reminds me I should retry. I wanted to send to zabbix a local user define environment variable (windows) at boot but it did not work. Could you provide an example?

              Comment

              • radamand
                Member
                • Aug 2008
                • 89

                #8
                not sure how its done in windows, but in *nix I use;

                $HOME/zabbix-1.6/src/zabbix_sender -c /etc/zabbix/zabbix_agentd.conf -z <zabbix server IP> -s <name of the host> -k <item name> -o <value>

                the <name of the host> above MUST be the name that your host is configured with on the zabbix server.
                also, the item must be of type "Trapper".

                Comment

                • bashman
                  Senior Member
                  • Dec 2009
                  • 432

                  #9
                  Originally posted by radamand
                  I wrestled with this one too a while back, my solution was to use zabbix_sender from a cron.

                  zabbix_sender works great and is easy to set up.
                  Yeah, no problem with zabbix_sender, but I don't want to use zabbix_sender, I want to use zabbix_agentd.
                  978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

                  Comment

                  • bashman
                    Senior Member
                    • Dec 2009
                    • 432

                    #10
                    Originally posted by xibbaz
                    Doing a check once a day seems easier than saying: check only from monday to friday from 7:30 to 17:30 and don't check the rest of the time.

                    So far, I got this:

                    Default: 30
                    50520 sec at 1-5,17:29-31:31
                    86400 sec at 6-7,00:00-23:59

                    I have no clue if this works. And even though you remove the slidding intervals, it does not seem to apply right away. Anyhow, I now have a trigger that is stuck at Problem when actually it should be OK.
                    The best way is:

                    Update interval=0
                    New flexible interval = 60 1-7 07:00-07:01

                    And you get one check every day from 7 to 7:01
                    978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

                    Comment

                    • camypaj
                      Junior Member
                      Zabbix Certified Specialist
                      • Sep 2013
                      • 3

                      #11
                      weird issue with this

                      sorry for re-opening this, but I have a pretty stupid issue, and I could use some help (tried googling and searching the forum, even asking on irc).
                      edit: version is 2.0.6, nothing in the (server, agent) logs.
                      So, if I do it like bashman suggested in his last post, it works, but I get graphs with dots, instead of lines.
                      I'm trying to get an item once a day, preferably at 6am, from zabbix_agentd.
                      Just tried changing the interval from 0 (disabled) to 86400 (once a day), with deleting flexible interval, and zabbix didn't execute the check at all (more than 24hrs passed, ofc).
                      So, my question: how to get once-per-day checks with normal line graphs instead of dots? Is it possible?
                      Thanks!
                      Last edited by camypaj; 24-09-2013, 13:15. Reason: version and more details; typo

                      Comment

                      • camypaj
                        Junior Member
                        Zabbix Certified Specialist
                        • Sep 2013
                        • 3

                        #12
                        solved it in another way, so nvm..

                        Comment

                        • heaje
                          Senior Member
                          Zabbix Certified Specialist
                          • Sep 2009
                          • 325

                          #13
                          Can you post how you solved it so that other people can benefit just like you benefited from bashman's solution?

                          Comment

                          • camypaj
                            Junior Member
                            Zabbix Certified Specialist
                            • Sep 2013
                            • 3

                            #14
                            Originally posted by heaje
                            Can you post how you solved it so that other people can benefit just like you benefited from bashman's solution?
                            right, sorry.. Well, one solution would be to change the update interval to 86400, but for some reason that didn't work for me. So, I've opted for zabbix_sender + cron, and changed the item to trapper.

                            Cheers

                            Comment

                            Working...