Am Mittwoch, 28. Januar 2015, 13:06:00 schrieb David Lang: > On Wed, 28 Jan 2015, Michael Jerger wrote: > > Am Mittwoch, 28. Januar 2015, 12:09:57 schrieb David Lang: > >> On Wed, 28 Jan 2015, Michael Jerger wrote: > >>> Hi, > >>> > >>> I currently try to write an automated ossec agent deplyment and am > >>> struggeling over setting the agents key. I try on agent system: > >>> > >>> /var/ossec/bin/manage_agents -i somekey > >>> > >>> but get sth. like: > >>> <== Agent information: > >>> <== ID:14 > >>> <== Name:xxx.xxxx.xxxx > >>> <== IP Address:xxx.xxx.xxx.xxx > >>> > >>> <== Confirm adding it?(y/n): > >>> interactive input is dificult for my config management. So my question > >>> is: > >>> Is there a way to set agents-key non-interactive? > >> > >> what I do is create a file containing ip,hostname and then do > >> /var/ossec/bin/manage_agents -f file > > > > This is working for agents? If yes cool :-) > > Docu says " (Manager only)" for this feature. > > Maybe some should fix the docu in this case? > > Yes, this must be done on the server. I thought you were needing to create > the key. > > Before I shifted to this mode, there was a script in place that just blindly > echoed the data into manage_agents, including the 'y'. It worked most of > the time (but not if anything went wrong and the prompts changes)
That's the way, I do in meantime. But as you said, thats quite fragile, so I'm searching for a better one. > Expect is the tool to use for dealing with interactive systems when you want > to handle errors. Okay, I will give it a look - thanks :-) Michael -- --- You received this message because you are subscribed to the Google Groups "ossec-list" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
