Ad Widget

Collapse

Zabbix suddenly broke down

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fallwor
    Junior Member
    • Mar 2013
    • 19

    #1

    Zabbix suddenly broke down

    Hello,

    I'm running CentOS 6.3 and a default installation of Zabbix. At the moment I was monitoring on 2 locations (Zabbix server and production server). I also have webmin and virtualmin installed.
    Last night I added some IT services and a trigger on a web service.

    This morning I arrive at work and check the monitoring and I get this:
    Code:
    array(T_ZBX_STR, O_NO, null, NOT_EMPTY, 'isset({enter})', _('Username')), 'password' => array(T_ZBX_STR, O_OPT, null, null, 'isset({enter})'), 'sessionid' => array(T_ZBX_STR, O_OPT, null, null, null), 'reconnect' => array(T_ZBX_INT, O_OPT, P_SYS, BETWEEN(0, 65535), null), 'enter' => array(T_ZBX_STR, O_OPT, P_SYS, null, null), 'autologin' => array(T_ZBX_INT, O_OPT, null, null, null), 'request' => array(T_ZBX_STR, O_OPT, null, null, null) ); check_fields($fields); // logout if (isset($_REQUEST['reconnect'])) { add_audit(AUDIT_ACTION_LOGOUT, AUDIT_RESOURCE_USER, _('Manual Logout')); CWebUser::logout(); } $config = select_config(); if ($config['authentication_type'] == ZBX_AUTH_HTTP) { if (!empty($_SERVER['PHP_AUTH_USER'])) { $_REQUEST['enter'] = _('Sign in'); $_REQUEST['name'] = $_SERVER['PHP_AUTH_USER']; } else { access_deny(); } } // login via form if (isset($_REQUEST['enter']) && $_REQUEST['enter'] == _('Sign in')) { // try to login if (CWebUser::login(get_request('name', ''), get_request('password', ''))) { // save remember login preference $user = array('autologin' => get_request('autologin', 0)); if (CWebUser::$data['autologin'] != $user['autologin']) { $result = API::User()->updateProfile($user); } add_audit_ext(AUDIT_ACTION_LOGIN, AUDIT_RESOURCE_USER, CWebUser::$data['userid'], '', null, null, null); $request = get_request('request'); $url = zbx_empty($request) ? CWebUser::$data['url'] : $request; if (zbx_empty($url) || $url == $page['file']) { $url = 'dashboard.php'; } redirect($url); exit(); } // login failed, fall back to a guest account else { CWebUser::checkAuthentication(null); } } else { // login the user from the session, if the session id is empty - login as a guest CWebUser::checkAuthentication(get_cookie('zbx_sessionid')); } // the user is not logged in, display the login form if (!CWebUser::$data['alias'] || CWebUser::$data['alias'] == ZBX_GUEST_USER) { switch ($config['authentication_type']) { case ZBX_AUTH_HTTP: echo _('User name does not match with DB'); break; case ZBX_AUTH_LDAP: case ZBX_AUTH_INTERNAL: if (isset($_REQUEST['enter'])) { $_REQUEST['autologin'] = get_request('autologin', 0); } if ($messages = clear_messages()) { $messages = array_pop($messages); $_REQUEST['message'] = $messages['message']; } $loginForm = new CView('general.login'); $loginForm->render(); } } else { redirect(zbx_empty(CWebUser::$data['url']) ? 'dashboard.php' : CWebUser::$data['url']); }
    Can anybody tell me what I did wrong?

    Thanks
  • fallwor
    Junior Member
    • Mar 2013
    • 19

    #2
    After a complete reinstallation of the server (!) (centos 6.4, virtualmin 3.98.gpl, zabbix 2.0.5) I managed to get this:
    On the server I can see the dashboard and work on it when I look up "localhost/zabbix".
    On my desktop I get the following:
    Code:
    array(T_ZBX_STR, O_NO,	null,	NOT_EMPTY,	 'isset({enter})', _('Username')), 'password' =>	array(T_ZBX_STR, O_OPT, null,	null,	 'isset({enter})'), 'sessionid' =>	array(T_ZBX_STR, O_OPT, null,	null,	 null), 'reconnect' =>	array(T_ZBX_INT, O_OPT, P_SYS,	BETWEEN(0, 65535), null), 'enter' => array(T_ZBX_STR, O_OPT, P_SYS,	null,	 null), 'autologin' =>	array(T_ZBX_INT, O_OPT, null,	null,	 null), 'request' =>	array(T_ZBX_STR, O_OPT, null,	null,	 null) ); check_fields($fields); // logout if (isset($_REQUEST['reconnect'])) { add_audit(AUDIT_ACTION_LOGOUT, AUDIT_RESOURCE_USER, _('Manual Logout')); CWebUser::logout(); } $config = select_config(); if ($config['authentication_type'] == ZBX_AUTH_HTTP) { if (!empty($_SERVER['PHP_AUTH_USER'])) { $_REQUEST['enter'] = _('Sign in'); $_REQUEST['name'] = $_SERVER['PHP_AUTH_USER']; } else { access_deny(); } } // login via form if (isset($_REQUEST['enter']) && $_REQUEST['enter'] == _('Sign in')) { // try to login if (CWebUser::login(get_request('name', ''), get_request('password', ''))) { // save remember login preference $user = array('autologin' => get_request('autologin', 0)); if (CWebUser::$data['autologin'] != $user['autologin']) { $result = API::User()->updateProfile($user); } add_audit_ext(AUDIT_ACTION_LOGIN, AUDIT_RESOURCE_USER, CWebUser::$data['userid'], '', null, null, null); $request = get_request('request'); $url = zbx_empty($request) ? CWebUser::$data['url'] : $request; if (zbx_empty($url) || $url == $page['file']) { $url = 'dashboard.php'; } redirect($url); exit(); } // login failed, fall back to a guest account else { CWebUser::checkAuthentication(null); } } else { // login the user from the session, if the session id is empty - login as a guest CWebUser::checkAuthentication(get_cookie('zbx_sessionid')); } // the user is not logged in, display the login form if (!CWebUser::$data['alias'] || CWebUser::$data['alias'] == ZBX_GUEST_USER) { switch ($config['authentication_type']) { case ZBX_AUTH_HTTP: echo _('User name does not match with DB'); break; case ZBX_AUTH_LDAP: case ZBX_AUTH_INTERNAL: if (isset($_REQUEST['enter'])) { $_REQUEST['autologin'] = get_request('autologin', 0); } if ($messages = clear_messages()) { $messages = array_pop($messages); $_REQUEST['message'] = $messages['message']; } $loginForm = new CView('general.login'); $loginForm->render(); } } else { redirect(zbx_empty(CWebUser::$data['url']) ? 'dashboard.php' : CWebUser::$data['url']); }
    The server log file:
    17148:20130316:135734.850 Starting Zabbix Server. Zabbix 2.0.5 (revision 33558).
    17148:20130316:135734.850 ****** Enabled features ******
    17148:20130316:135734.851 SNMP monitoring: YES
    17148:20130316:135734.851 IPMI monitoring: YES
    17148:20130316:135734.851 WEB monitoring: YES
    17148:20130316:135734.851 Jabber notifications: YES
    17148:20130316:135734.851 Ez Texting notifications: YES
    17148:20130316:135734.851 ODBC: YES
    17148:20130316:135734.851 SSH2 support: YES
    17148:20130316:135734.851 IPv6 support: YES
    17148:20130316:135734.851 ******************************
    17150:20130316:135734.862 server #1 started [configuration syncer #1]
    17158:20130316:135734.872 server #9 started [trapper #1]
    17160:20130316:135734.874 server #11 started [trapper #3]
    17162:20130316:135734.875 server #13 started [trapper #5]
    17159:20130316:135734.876 server #10 started [trapper #2]
    17164:20130316:135734.877 server #15 started [alerter #1]
    17166:20130316:135734.877 server #17 started [timer #1]
    17148:20130316:135734.879 server #0 started [main process]
    17161:20130316:135734.879 server #12 started [trapper #4]
    17151:20130316:135734.880 server #2 started [db watchdog #1]
    17163:20130316:135734.880 server #14 started [icmp pinger #1]
    17165:20130316:135734.881 server #16 started [housekeeper #1]
    17165:20130316:135734.881 executing housekeeper
    17169:20130316:135734.884 server #20 started [history syncer #1]
    17170:20130316:135734.884 server #21 started [history syncer #2]
    17174:20130316:135734.885 server #25 started [proxy poller #1]
    17167:20130316:135734.887 server #18 started [http poller #1]
    17171:20130316:135734.890 server #22 started [history syncer #3]
    17172:20130316:135734.891 server #23 started [history syncer #4]
    17173:20130316:135734.891 server #24 started [escalator #1]
    17175:20130316:135734.891 server #26 started [self-monitoring #1]
    17165:20130316:135734.923 housekeeper deleted: 0 records from history and trends, 0 records of deleted items, 0 events, 0 alerts, 0 sessions
    17155:20130316:135735.011 server #6 started [poller #4]
    17157:20130316:135735.012 server #8 started [unreachable poller #1]
    17153:20130316:135735.013 server #4 started [poller #2]
    17168:20130316:135735.025 server #19 started [discoverer #1]
    17154:20130316:135735.029 server #5 started [poller #3]
    17152:20130316:135735.031 server #3 started [poller #1]
    17156:20130316:135735.031 server #7 started [poller #5]
    Important changes to a default installation: Changed ports from 10050 and 10051 to 32050 and 32051.
    These are my current iptables:
    Code:
    -A INPUT -p tcp -m tcp --dport 10050:10060 -j ACCEPT
    -A INPUT -p udp -m udp --dport domain -j ACCEPT
    -A INPUT -p tcp -m tcp --dport 20000 -j ACCEPT
    -A INPUT -p tcp -m tcp --dport https -j ACCEPT
    -A INPUT -p tcp -m tcp --dport http -j ACCEPT
    -A INPUT -p tcp -m tcp --dport domain -j ACCEPT
    -A INPUT -p tcp -m tcp --dport submission -j ACCEPT
    -A INPUT -p tcp -m tcp --dport smtp -j ACCEPT
    -A INPUT -p tcp -m tcp --dport ssh -j ACCEPT
    -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
    -A INPUT -p icmp -j ACCEPT
    # sshsec
    -A INPUT -p tcp -m tcp -m state --dport 6000 --state NEW -j ACCEPT
    -A INPUT -i lo -j ACCEPT
    -A FORWARD -j REJECT --reject-with icmp-host-prohibited
    # zabbix
    -A INPUT -p tcp -m tcp --dport 32050:32052 --sport 32050:32052 -j ACCEPT
    -A INPUT -j REJECT --reject-with icmp-host-prohibited
    COMMIT
    Anybody an idea?

    Comment

    • fallwor
      Junior Member
      • Mar 2013
      • 19

      #3
      the problem was with the httpd.
      server name was xxx.yyy.com
      I installed a virtual server with the same domain name.
      httpd points to the wrong location.

      Solved...

      Comment

      Working...