HEX
Server: Apache
System: Linux vpshost0650.publiccloud.com.br 4.4.79-grsec-1.lc.x86_64 #1 SMP Wed Aug 2 14:18:21 -03 2017 x86_64
User: bandeirantesbomb3 (10068)
PHP: 8.0.7
Disabled: apache_child_terminate,dl,escapeshellarg,escapeshellcmd,exec,link,mail,openlog,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,php_check_syntax,php_strip_whitespace,popen,proc_close,proc_open,shell_exec,symlink,system
Upload Files
File: //lib/python2.7/site-packages/lap/teleopti_monitor.py
#!/usr/bin/python2.6

import pymssql
from ConfigParser import SafeConfigParser
import sys
import datetime

def __run__(params):
    sys_time = datetime.datetime.now().hour
    global cfg
    cfg = SafeConfigParser()
    cfg.read('/usr/lib/check_mk_agent/config_teleopti_monitor.cfg')
    time=dbconnect()
    check_hour = sys_time - time
    if check_hour >= 1 and check_hour <= 5:
        return[0, "OK - Dados Ok"]  
    else:
        return[2, "Problema no processamento dos dados"]

def dbconnect():
    conn = pymssql.connect(host=cfg.get('database','host'), user=cfg.get('database','user'), password=cfg.get('database','password'), database=cfg.get('database','database'))
    cur = conn.cursor()
    cur.execute('select top 1 SUBSTRING(time,1,2) from t_log_NET_data_teleopti_queue_data order by tstamp desc')
    for row in cur:
        time = row[0]
    return int(time) - 1