Pandora FMS community forums
Failed to create agent group from agent configuration file - Printable Version

+- Pandora FMS community forums (http://pandorafms.org/forum)
+-- Forum: Pandora FMS (http://pandorafms.org/forum/forum-3.html)
+--- Forum: Community support (English) (http://pandorafms.org/forum/forum-7.html)
+--- Thread: Failed to create agent group from agent configuration file (/thread-14585.html)



Failed to create agent group from agent configuration file - anhduc0512 - 12-12-2019

Hi there, I'm using version of 7.0NG.739 (P) 190930.
I tried to edit agent config file and change 'group' property but it was not updated on server.
Have tried with both of existing group and new group.

From documentation, I see description like :
"If there is a group with the name specified in this parameter, the agent will be created within this group unless the server forces the creation of all agents in a given group."
But I can't find option which forced the creation of all agents in a given group.
Could you please help me resolve this issue?

And more information, I found issue with MySQL as below:
SQL error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'lag FROM tagente_estado, tagente_modulo, tagente ' at line 2 ('SELECT COUNT(tagente_modulo.id_agente_modulo) AS module_lag, AVG(UNIX_TIMESTAMP() - utimestamp - current_interval) AS lag FROM tagente_estado, tagente_modulo, tagente WHERE utimestamp > 0 AND tagente.disabled = 0 AND tagente.id_agente = tagente_estado.id_agente AND tagente_modulo.disabled = 0 AND tagente_modulo.id_tipo_modulo < 5 AND tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo AND current_interval > 0 AND (UNIX_TIMESTAMP() - utimestamp) < ( current_interval * 10) AND running_by = 1 AND (UNIX_TIMESTAMP() - utimestamp) > (current_interval * 1.1) LIMIT 1') in /var/www/html/pandora_console/include/db/mysql.php on line 117

SQL error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'lag FROM tagente_estado, tagente_modulo, tagente ' at line 2 ('SELECT COUNT(tagente_modulo.id_agente_modulo) AS module_lag, AVG(UNIX_TIMESTAMP() - utimestamp - current_interval) AS lag FROM tagente_estado, tagente_modulo, tagente WHERE utimestamp > 0 AND tagente.disabled = 0 AND tagente.id_agente = tagente_estado.id_agente AND tagente_modulo.disabled = 0 AND tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo AND current_interval > 0 AND running_by = 2 AND (UNIX_TIMESTAMP() - utimestamp) < ( current_interval * 10) AND (UNIX_TIMESTAMP() - utimestamp) > current_interval LIMIT 1') in /var/www/html/pandora_console/include/db/mysql.php on line 117
SQL error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'lag FROM tagente_estado, tagente_modulo, tagente ' at line 2 ('SELECT COUNT(tagente_modulo.id_agente_modulo) AS module_lag, AVG(UNIX_TIMESTAMP() - utimestamp - current_interval) AS lag FROM tagente_estado, tagente_modulo, tagente WHERE utimestamp > 0 AND tagente.disabled = 0 AND tagente.id_agente = tagente_estado.id_agente AND tagente_modulo.disabled = 0 AND tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo AND current_interval > 0 AND running_by = 4 AND (UNIX_TIMESTAMP() - utimestamp) < ( current_interval * 10) AND (UNIX_TIMESTAMP() - utimestamp) > current_interval LIMIT 1') in /var/www/html/pandora_console/include/db/mysql.php on line 117


RE: Failed to create agent group from agent configuration file - Diego.M - 12-12-2019

Buenas anhduc0512,

First of all we usually recommend that you upgrade to the latest version of PandoraFMS, please consider moving from your current version to the latest (741), this could solve the problem. In case this doesn't happen, check that the PandoraFMS server time and the team time where the agent is located are the same, because because of the errors you pass us it seems to be something related to that. If the problem persists, check if the agent has configured the remote config, if the .conf file of the agent can only be edited through PandoraFMS console, never through command line.

Greetings
Diego


RE: Failed to create agent group from agent configuration file - anhduc0512 - 12-17-2019

(12-12-2019, 08:42 AM)Diego.M Wrote: Buenas anhduc0512,

First of all we usually recommend that you upgrade to the latest version of PandoraFMS, please consider moving from your current version to the latest (741), this could solve the problem. In case this doesn't happen, check that the PandoraFMS server time and the team time where the agent is located are the same, because because of the errors you pass us it seems to be something related to that. If the problem persists, check if the agent has configured the remote config, if the .conf file of the agent can only be edited through PandoraFMS console, never through command line.

Greetings
Diego

Thank you so much for supporting.
I found the reason. Pandora server is setting "autocreate_group_force" is "1" so I couldn't set group in agent config.