Ad Widget

Collapse

Steps to monitor service "cron" on Linux OS

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • agentguerry
    Member
    • Jul 2009
    • 45

    #1

    Steps to monitor service "cron" on Linux OS

    Hi all,

    I have been trying to setup the monitoring for the up/down of CRON.

    I am running 1.8.2 Zabbix build.

    I have set up an item:

    Item 'Template_Linux:CRON Check'
    Host - Templet_Linux
    Description - CRON check
    Type - simple check
    Key - proc.num[cron]
    Type of information - numeric(unsigned)
    Data type - Decimal
    Units
    Use multiplier - do not use
    Update interval (in sec) - 30
    Status -active
    Store value - as is
    Show value throw map - as is
    Applications - processes
    Group - discovered hosts

    I have set up a trigger:

    Name - CRON not responding {HOSTNAME}
    Experession - {Template_Linuxroc.num[cron].last(0)}<1
    Event Generation - Normal
    Severity - Disaster

    Both of them show in the GUI as active, but when I go to view "monitoring>overview", and view the triggers or data, nothing shows up.

    Should I be setting this up a different way?

    Thanks
  • agentguerry
    Member
    • Jul 2009
    • 45

    #2
    I also did shut down cron via /etc/init.d/cron stop, waited about 15 minutes and so no alerting via the GUI or emails.

    Comment

    • walterheck
      Senior Member
      • Jul 2009
      • 153

      #3
      It seems like it is not collecting data in the first place, so it not triggering would be fairly normal.
      Use the agent log and the server log to find the problem with your item first, then when you can see data you can try triggering.
      Free and Open Source Zabbix Templates Repository | Hosted Zabbix @ Tribily (http://tribily.com)

      Comment

      • agentguerry
        Member
        • Jul 2009
        • 45

        #4
        here is the line from my zabbix_server.log

        11608:20100824:091551.279 Simple check [net.tcp.service[proc.num[cron],172.30.180.188]] is not supported

        So, am i not using the right syntax for monitoring cron?

        Comment

        • badener
          Member
          • Sep 2009
          • 42

          #5
          i use proc.num[cron,,,] , probably the net.tcp.service before the proc.num is unnecessary (where does that come from - in the description of your item I don't see it)

          Comment

          • agentguerry
            Member
            • Jul 2009
            • 45

            #6
            yeah i'm not sure why that shows up in the server log.

            because the item is Key - proc.num[cron]
            but the log shows Simple check [net.tcp.service[proc.num[cron]

            Comment

            • badener
              Member
              • Sep 2009
              • 42

              #7
              I'd try to check whether the agent works correctly with zabbix_get -s<ip> -kproc.num[cron] - that should give a result
              then I'd check the item associated with the host, not the template - maybe you can find something there

              Comment

              • alixen
                Senior Member
                • Apr 2006
                • 474

                #8
                Hi,

                You have set it up as:
                Code:
                Type - simple check
                it should be:
                Code:
                Type - Zabbix agent
                Regards,
                Alixen
                http://www.alixen.fr/zabbix.html

                Comment

                • agentguerry
                  Member
                  • Jul 2009
                  • 45

                  #9
                  Fix

                  Here is what I did, and now i get a notification and it also will send to my Atlassian Jira reporting.

                  Item setup:

                  Description: number of running processes $1
                  type: zabbix agent
                  key: proc.num[cron]
                  type of information: numeric unsigned
                  data type: decimal
                  store value: as is
                  save value: as is

                  Trigger setup:

                  name: Cron not running on {HOSTNAME}
                  Expression: {Template_Linuxroc.num[cron].last(0)}<1 & {Template_Linuxroc.num[cron].prev(0)}<1

                  those smiley's are "colon" and "lowercase p"....

                  Comment

                  • prejithprasannan
                    Junior Member
                    • Jan 2020
                    • 5

                    #10
                    Hi, I want to monitor the process of Tomcat different versions. I just want alerts while of one of the tomcat 7 or 8 went down. How to do scripts or triggers for this task

                    Comment

                    • ggs_admin
                      Member
                      • Oct 2021
                      • 44

                      #11
                      Hi,

                      I need monitor if cron service is running. I have tried different ways but no luck

                      Type - simple check
                      Key - proc.num[cron]

                      Type - simple check
                      Key - proc.num[crond]

                      Type - zabbix agent
                      Key - proc.num[cron]

                      Type - zabbix agent
                      Key - proc.num[crond]

                      Any of these settings are not working.
                      It should be checked on the server with the CloudLinux 7.9

                      Comment

                      • splitek
                        Senior Member
                        • Dec 2018
                        • 101

                        #12
                        For old Zabbix check this: https://share.zabbix.com/operating-s...sing-systemctl
                        For 5.0/5.4 this: https://www.zabbix.com/integrations/systemd#systemd

                        Also some info here:

                        Comment

                        Working...