Ad Widget

Collapse

Simple Check examples

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Villain
    Member
    • Aug 2006
    • 84

    #1

    Simple Check examples

    Does anyone have examples of the Simple Checks they use?

    I'm having problems getting values to populate when gathering latest data, no matter what simple checks I perform.

    I have a few that are setup for devices that use an IP Address, and the Key is configured how the help documents state they should be, yet I'm getting no data.

    For example, I have a server configured as follows:

    Name: App1
    Group: <none checked>
    Use IP Address: <checked>
    IP Address: 1.2.3.4
    Port: 10050
    Status: Monitored
    Link with Template: <no template chosen>
    Use Profile: <unchecked>

    I created an item as follows:

    Description: HTTP
    Type: Simple Check
    Key: http,80
    Type of Information: Numeric (integer 64bit)
    Units: <blank>
    Use Multiplier: <Do Not Use>
    Update Interval: 30
    Keep History: 90
    Keep Trend: 365
    Status: Monitored
    Store Value: <As is>
    Show Value Throw Map: <As is>
    Applications: <none>

    Can anyone see a reason why this would stop me from getting a standard http check working? I know that the server is up, I can view pages on its http server.
  • dantheman
    Senior Member
    • May 2006
    • 209

    #2
    Do you have any other hosts, servers, etc. being monitored? Are they collecting any data?

    Have you checked the server log file to see if it shows any errors? You might also want to try changing the debug level to 4 on the server and see if that gives you more information if the default level doesn't tell you anything.

    Comment

    • Villain
      Member
      • Aug 2006
      • 84

      #3
      I'm not sure which logs I should be looking at. Should I go into the syslog? Is there a specific log file for the zabbix server that gives me this information?

      Comment

      • dantheman
        Senior Member
        • May 2006
        • 209

        #4
        In your server.conf file do you have a line specifying a log file?
        Code:
        logfile=/tmp/zabbix_server.log
        ? I think the default if this line does not exist is to dump the log information to syslog.

        Comment

        • Villain
          Member
          • Aug 2006
          • 84

          #5
          ok, I found it in my /tmp/zabbix_server.log file.

          However, I now see data for those checks. What's strange is that I had the server running, put in the items that I wanted to monitor, then shut the server off and restarted it. I still was not seeing results after doing this.

          I came in this morning, and the server was not running. I started it back up, and now I have the monitoring I was looking for at the end of last week.

          So, here's another question: Why would the zabbix server just shutdown? The log file showed:

          014978:20060823:205320 Timeout while receiving data from [App1]
          014978:20060823:205320 Getting value of [net.tcp.port[app1, 8080]] from host [App1] failed
          014978:20060823:205320 The value is not stored in database.
          014978:20060823:205325 Timeout while receiving data from [App1]
          014978:20060823:205325 Getting value of [net.tcp.port[app1, 8080]] from host [App1] failed
          014978:20060823:205325 The value is not stored in database.
          014978:20060823:205330 Timeout while receiving data from [App1]
          014978:20060823:205330 Getting value of [net.tcp.port[app1, 8080]] from host [App1] failed
          014978:20060823:205330 The value is not stored in database.
          014978:20060823:205336 Timeout while receiving data from [App1]
          014978:20060823:205336 Getting value of [net.tcp.port[app1, 8080]] from host [App1] failed
          014978:20060823:205336 The value is not stored in database.
          014976:20060823:205339 Query::select i.itemid,i.key_,h.host,h.port,i.delay,i.descriptio n,i.nextcheck,i.type,i.snmp_community,i.snmp_oid,h .useip,h.ip,i.histo$
          014976:20060823:205339 Query failed:Lost connection to MySQL server during query [2013]
          014970:20060823:205339 One server process died. Shutting down...
          014970:20060823:205339 ZABBIX server is down.

          However, I couldn't get the long line where it shows the Query, and when I went to get it, the log file was cleared. I'll look around for a way to make the log file stick around or roll over or something.

          If anyone has any ideas on why this install is acting flaky, please let me know.

          Thanks

          Comment

          • dantheman
            Senior Member
            • May 2006
            • 209

            #6
            I had the same problem for a while, I ended up putting this script together that monitored if the system crashed and sends an email to me as well as restarting the server and saving a copy of the last log file in a seperate file so it's not overwritten.. here is the script. I took it from someone else that posted it and made a few minor modifications..

            Code:
            #!/bin/bash
            
            ##################################################  ###############################
            #																			   #
            # Please look at first how many processes zabbix_server and zabbix_agentd have. #
            # Then change the entries in the lines.										 #
            # Change the email address!													 #
            #		created by Krusty													  #
            #																			   #
            ##################################################  ###############################
            
            date=`date`
            prozessserver=`ps -ef | grep zabbix_server | grep -v grep | grep -v tail | wc -l`
            serverpid="/var/tmp/zabbix_server.pid"
            #echo "Debug server: $prozessserver"
            
            if [ $prozessserver -lt 4 ];
            then
            		echo "There is no zabbix_server process running. I will start this process now! $date"
            		if [ -f $serverpid ]
            		then
            				echo "File $serverpid exists. I will remove this file now!"
            				rm $serverpid
            		fi
            
            	echo "$date " >> /tmp/zabbix_checkstatus.log
            	ps -A | grep zabbix >> /tmp/zabbix_checkstatus.log
            
            	cp /tmp/zabbix_server.log /tmp/zabbix_server.log.crash
            	cp /tmp/zabbix_server.log.old /tmp/zabbix_server.log.old.crash
            		/usr/local/bin/zabbix_server
            
            	   echo "At $date the zabbix_server process was not running. But the server will be started immediately." | mail -s "Zabbix Server crashed at $date" [email protected]
            fi
            
            prozessagentd=`ps -ef | grep zabbix_agentd | grep -v grep | grep -v tail | wc -l`
            agentdpid="/var/tmp/zabbix_agentd.pid"
            #echo "Debug agentd: $prozessagentd"
            if [ $prozessagentd -lt 2 ];
            then
            		echo "There is no zabbix_agentd process running. I will start this process now! $date"
            		if [ -f $agentdpid ]
            		then
            				echo "File $agentpid exists. I will remove this file know!"
            				rm $agentdpid
            		fi
            		/usr/local/bin/zabbix_agentd
            
            	echo "At $date the zabbix_agentd process was not running. But the agentd will be started immediately." | mail -s "Zabbix Agentd crashed at $date" [email protected]
            fi
            
            exit 0
            Now as far as what my problem was, it turned out I had some corruption in my databases... and that was crashing my zabbix server... I had similar lines in my server log.. http://zabbix.com/forum/showthread.php?t=3163

            Comment

            • Villain
              Member
              • Aug 2006
              • 84

              #7
              ok, I'll check into the database possibly having errors tomorrow. It's entirely possible that we could have some. Thanks for all the help so far.

              Comment

              Working...