Problem with monitor update

Discussion in 'Installation/Configuration' started by federico, Aug 6, 2010.

  1. federico

    federico New Member

    Hi,
    I have a slave server that is not able to upgrade the harddisk monitor data.
    On the slave log file I can see some messages such as :
    06.08.2010-18:45 - WARNING - DB::query(DELETE FROM monitor_data WHERE type ='raid_state' AND created < 1281112504) -> mysql_query SELECT command denied to user 'ispcsrv2'@'hosting_rtrt_web' for column 'type' in table 'monitor_data'
    06.08.2010-18:45 - WARNING - DB::query(DELETE FROM monitor_data WHERE type ='log_fail2ban' AND created < 1281112504) -> mysql_query SELECT command denied to user 'ispcsrv2'@'hosting_rtrt_web' for column 'type' in table 'monitor_data'
    06.08.2010-18:45 - WARNING - DB::query(DELETE FROM monitor_data WHERE type ='sys_log' AND created < 1281112504) -> mysql_query SELECT command denied to user 'ispcsrv2'@'hosting_rtrt_web' for column 'type' in table 'monitor_data'

    while on the master DB the grants seem to be ok and I've this grants for the user:
    SELECT, INSERT, UPDATE, DELETE ON `dbispconfig`.`monitor_data` TO 'ispcsrv2'@'hosting_rtrt_web'

    Where could be the problem?

    Thanks for help

    Federico
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Update to the latest ispconfig 3 release on the slave (3.0.2.2) and choose to update database permissions during update.
     
  3. federico

    federico New Member

    Hi Till,

    we're running on a 3.0.1.6 production system environment and we plan to upgrade to last release next month.

    Is there nothing that I can to do (or to check) in order to fix the problem now?
    The strange think is that we have other 4 slaves that correctly update the monitor information to the master and all the mysql grants seem the same.

    Thanks
    Federico
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The database permissions are set by the ispconfig updater. So to fix them, you have to run the ispconfig updater.

    The only thing that you can do without updating is that you compare the permissions of the mysql users of this slave in the master mysql database with the eprmissions of the working slaves and adjust them if they do not match.
     
  5. federico

    federico New Member

    I've enabled mysql loggin on master,
    the problem seems due to this entry:

    6 Query INSERT INTO monitor_data (server_id, type, created, data, state) VALUES (2, 'disk_usage', 1281348602, 'N;', 'ok'),

    I think that the "data" value produces the following messages on ISPConfig Control Panel monitor page:

    Warning: Invalid argument supplied for foreach() in /usr/local/ispconfig/interface/web/monitor/tools.inc.php on line 100

    Others slaves that work correctly produce a "data" value more long and complex such us :
    'a:5:{i:1;a:7:{s:2:\"fs\";s:31:\"/dev/mapper/VolGroup00-LogVol00\";s:4:\"type\";N;s:4:\"size\";N;s:4:\"used\";N;s:9:\"available\";N;s:7:\"percent\";N;s:7:\"mounted\";N;}i:2;a:7:{s:2:\"fs\";s:0:\"\";s:4:\"type\";s:4:\"ext3\";s:4:\"size\";s:3:\"24G\";s:4:\"used\";s:4:\"4.3G\";s:9:\"available\";s:3:\"18G\";s:7:\"percent\";s:3:\"20%\";s:7:\"mounted\";s:1:\"/\";}i:3;a:7:{s:2:\"fs\";s:9:\"/dev/sdb1\";s:4:\"type\";s:4:\"ext3\";s:4:\"size\";s:3:\"15G\";s:4:\"used\";s:4:\"1.6G\";s:9:\"available\";s:3:\"13G\";s:7:\"percent\";s:3:\"12%\";s:7:\"mounted\";s:4:\"/var\";}i:4;a:7:{s:2:\"fs\";s:9:\"/dev/sda1\";s:4:\"type\";s:4:\"ext3\";s:4:\"size\";s:3:\"84M\";s:4:\"used\";s:3:\"18M\";s:9:\"available\";s:3:\"62M\";s:7:\"percent\";s:3:\"23%\";s:7:\"mounted\";s:5:\"/boot\";}i:5;a:7:{s:2:\"fs\";s:5:\"tmpfs\";s:4:\"type\";s:5:\"tmpfs\";s:4:\"size\";s:4:\"1.9G\";s:4:\"used\";s:1:\"0\";s:9:\"available\";s:4:\"1.9G\";s:7:\"percent\";s:2:\"0%\";s:7:\"mounted\";s:8:\"/dev/shm\";}}'

    ..so i think that the problem should be on the generation of "data" value.
    Is this value created by the slave and sent to master ?
    How does this generation/comunication work?

    Thanks
    Federico
     
  6. federico

    federico New Member

    I've found the cause of my problem.
    We have a ISPConfig 3 multiserver production environment on which 2 servers act as webserver for customers's websites.
    These server are slaves in the ISPConfig architecture.

    For security reason we added the following entry in /etc/php.ini:
    disable_functions = "shell_exec"
    unfortunately this php function is used by the monitor_core_module in order to perform some operations on the local system and send the data to masterdatabase.

    Disabling this function, the hosting control panel is not able to correctly show DiskUsage, MemUsage, monitorCPU,systemUpdate (..and so on) of the webservers because they send wrong (empty) data.

    Enabling the function everything works.

    The question now is if is ti possible disabling the function in the php.ini file but enable it only in the monitor_core_module execution ?
    In this php function used in other module?

    Thanks
    Federico
     

Share This Page