Pandora FMS Community

Prediction server module non initialized

dstoian · 4 abr 2017, 23:47 · 4 mensajes · 66 visitas

  1. Inicio del debate

    Hello, I'm trying to create a prediction module for CPU_Load module. - I have enabled prediction server on PandoraFMS OpenSource 6.0SP5 - I do see the server up and running on "Manage servers" - I did follow the documentation here "http://wiki.pandorafms.com/index.php?title=Pandora:Documentation\_en:Other\_Monitoring" The documentation it's not very clear on how the module it's created: both text and screenshot are pointing to wrong module "Once you have created the agent, please click on the module's upper flap. Please select 'create a new network module' and click on 'Create' in it." I think it should be : "Once you have created the agent, please click on the module's upper flap. Please select 'create a new prediction server module' and click on 'Create' in it." Anyhow .... - I've created a new prediction server module on both Windows and Linux agents type : generic_data source module : CPU_Load from the agent himself periodicity : weekly (tried also with daily) interval : 5min But the module stays in non initialized state. From the documentation only service, synthetic arithmetic, netflow and syntetic average are ENTERPRISE only. The same are specified in the code https://fossies.org/diffs/pandorafms\_console/6.0SP5\_vs\_7.0NG/godmode/agentes/module\_manager\_editor\_prediction.php-diff.html Therefore module should work on Open Source version. I'm trying to detect unusual patterns in CPU load for performance application purposes. Can you please advice? Thank you.

  2. Hello dstoian, First, I've already changed the docummentation as you suggested, it was wrong indeed. Second, I've been a couple of hours trying to find the cause to your issue and I think I found it. Those modules should work on the opensource version, yes, however they are not working, is not a problem of your configuration/setup/options. They are working on the enterprise version so I've checked what's the difference. Apparently, there is a DB parameter called "prediction_module" on the table "tagente_modulo" that is not being set to 1 as it should, so the modules don't ever initialize. If I force this parameter to 1 (it is automatically set to 1 on the Ent version), the module initializes properly. So you can try changing this manually with a little query. HOWEVER, I'm not sure if the cause of this issue is this parameter not being set properly OR this parameter not being set to 1 is an indicative of something else (is it the problem itself, or is it telling us there is some other problem?). Even when the modules initialize when setting this to 1, I cannot say if it will display correct data, since on the testing environments that I've created to check this I don't have data old enough to analyze it. The issue has already been sent to the development team, but it may take some time untill it gets resolved and published, so in the meantime I suggest you to play a little bit with this parameter on the database and see if the modules actually display logical info. Keep me updated! Kind regards, Antonio.

  3. Thank you Antonio. A. Creating the modules - I did craft a script to update the column and the columns looks like this: ALTER TABLE tagente_modulo CHANGE COLUMN `prediction_module` `prediction_module` bigint(14) DEFAULT 1; +--------------------------+-------------------------------------+------+-----+-------------------+----------------+ | Field                    | Type                                | Null | Key | Default          | Extra          | +--------------------------+-------------------------------------+------+-----+-------------------+----------------+ | prediction_module        | bigint(14)                          | YES  |    | 1                |                | - I've created a new prediction module ... but was still non-intitialized state - I've updated the module directly and now the module is initialized and working mysql> update tagente_modulo SET prediction_module=1 where id_agente_modulo=16518; mysql> select prediction_module from tagente_modulo where id_agente_modulo=19409; +-------------------+ | prediction_module | +-------------------+ |                1 | +-------------------+ 1 row in set (0.00 sec) Conclusions: - the column prediction_module default value set to 1 seams not to initiate all new prediction modules - setting up the module prediction_module value to 1 seams to do it Workaround is: - create one module and initiate it via mysql script - use bulk operations -> copy_module to spread along agents The following errors are thrown ... but the modules are created SQL error: Table 'pandora.tmodule_synth' doesn't exist ('SELECT * FROM `tmodule_synth` WHERE `id_agent_module_target` = '19409'') in /var/www/pandora_console/include/db/mysql.php on line 76 B. Module data - I do have data for 1month. - It's not clear from the documentation how the data is process and calculated: "The prediction is performed by the average value calculation of the module in an specific interval, in four points of time: 't1', 't2', 't3' and 't4' where 't1' represents the value from a week ago, 't2' the value from two weeks ago and so on." Example: periodicity: weekly interval: 1day a. the module will execute once per day b. it will take     t1=one random average value from week1? or average of the all week ?     t2=one random average value from week2? or average of the all week ?     t3=one random average value from week1? or average of the all week ?     t4=one random average value from week2? or average of the all week ? c. it will combine t1,t2,t3,t4 and THank you.

  4. Hello dstoian, Happy that they are working now. A. As an additional idea for the workaround, you can just create all the modules and then execute this query:

    
    UPDATE tagente_modulo SET prediction_module = 1 WHERE prediction_module = '';
    

    Keep in mind this query should update ONLY the modules that have that parameter empty. If they have a value "0" (as all the rest of not-prediction modules should) they shouldn't be updated. B. I don't know exactly how does the algorithm work, but I'll ask the development team to have a talk and explain in detail how it works, I'll let you know. Kind regards, Antonio.

Entra en tu cuenta para publicar.