Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Modify UDP Remote monitoring by CLI
#1
Hi there,

I'd like to know how to change 'Target IP' and 'Port of UDP' on UDP server plugin module.

According to the documents, we can modify the following command, but it doesn't work.
Even though the messages said the followings,  the Target IP and Port section were not changed.

# perl pandora_manage.pl /etc/pandora/pandora_server.conf  my_module my_agent parameters '1.1.1.1 161'
  [INFO] Updating field 'plugin_parameter' in module 'my_module' of agent 'my_agent' with new value '1.1.1.1 161'

Could you tell me how to change the field by CLI please ?

http://wiki.pandorafms.com/index.php?tit...:Anexo_CLI

--snip
perl pandora_manage.pl /etc/pandora/pandora_server.conf  <module_name> <agent_name> <field_to_update> <new_value>
For the plugin modules: module_address, module_port, plugin_name, user, password, parameters
 Reply
#2
Hello ainamori,

The option "parameters" doesn't affect your plugin server modules in the latest versions of Pandora. This field is used for older versions, but actually the value of your plugin parameters are stored in the field "macros" from the table "tagente_modulo".

You can use, for example, this query to see it's value (change "N" with your module ID):
Code:
select id_agente_modulo, id_agente, nombre, macros from tagente_modulo where id_agente_modulo=N;

An option could be update this field in your database.

Another possibility is use the API to update that module. I let you here the section of the wiki.

Kind regards,
Enrique.
 Reply
#3
Hi, enrique_m

Thank you for your reply, but if I use the command, I have to know the module ID.
I think that it is difficult to find the module ID by CLI.

Could you tell me if you have another solution please ?
 Reply
#4
Hello ainamori,

Those are the best solutions I can think of. From database you can get your module ID if you know the agent name and module name (both needed to use Pandora CLI). The query could be something like this:
Code:
select m.id_agente_modulo from tagente a, tagente_modulo m where a.id_agente=m.id_agente and a.nombre="agent_name" and m.nombre="module_name";

If you know that you can update the field "macros" in the table "tagente_modulo" with something like:
Code:
update tagente_module set macros="new_value_for_field" where id_agente_modulo=N;

Kind regards,
Enrique.
 Reply
#5
Hi Enrique,

Thanks a lot.

I'll try to find another way because I think to use the Database directly is not comfortable to us.

 Reply


Users browsing this thread: 1 Guest(s)


(c) 2006-2018 Artica Soluciones Tecnológicas. Contents of this wiki are under Create Common Attribution v3 licence. | pandorafms.com | pandorafms.org

Theme © MyBB Themes