The problem is simple - the install.sh is where this is taken care of, but 
no one ever bothered to add the code when they added the variable of 
USER_AGENT_CONFIG_PROFILE.

Take a look at install.sh and find the top bit of code here -- and you will 
see the part I added to fix the PROFILE:

    echo "<ossec_config>" > $NEWCONFIG

    echo "  <client>" >> $NEWCONFIG

    if [ "X${IP}" != "X" ]; then

        echo "    <server-ip>$IP</server-ip>" >> $NEWCONFIG

    elif [ "X${HNAME}" != "X" ]; then

        echo "    <server-hostname>$HNAME</server-hostname>" >> $NEWCONFIG

    fi

    # add this block to check for and add a preset profile name for the 
agent (from preloaded-vars.conf)

    if [ "$X{USER_AGENT_CONFIG_PROFILE}" != "X" ]; then

         PROFILE=${USER_AGENT_CONFIG_PROFILE}

         echo "    <config-profilep>$PROFILE</config-profile>" >> $NEWCONFIG

    fi

    # end of added PROFILE block

    echo "  </client>" >> $NEWCONFIG

    echo "" >> $NEWCONFIG


Cheers
Kat

On Thursday, January 22, 2015 at 4:09:42 AM UTC-6, Slobodan Aleksić wrote:
>
> Hello list, 
>
> I am having trouble setting up agent's ossec.conf by the install.sh 
> script correctly. 
> Setting "USER_AGENT_CONFIG_PROFILE" in "preloaded-vars.conf" to 
> something, doesn't create a <config-profile> setting in ossec.conf .. 
>
> Another thing: How to get a minimal ossec.conf on agents autmatically. 
> So that only server and profile settings are kept in ossec.conf and all 
> the rest only in agent.conf ? 
>
> Thanks in advance 
>
>
> -- 
> Slobodan 
>

-- 

--- 
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 ossec-list+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to