cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Former Member
Not applicable
Report Inappropriate Content
Message 1 of 1

Query ePO Agent custom properties on Linux?

So I can set the custom properties w/ maconfig...

usage: maconfig -custom

-prop1          value of first custom property

-prop2          value of second custom property

-prop3          value of third custom property

-prop4          value of forth custom property

e.g.

       maconfig -custom -prop1 "value string"

       maconfig -custom -prop2 "value string"

       maconfig -custom -prop3 "value string"

       maconfig -custom -prop4 "value string"

But can I query the properties?

I tried just leaving off the value thinking that `-custom -prop1` might display prop1 instead.  But it doesn't.

I did manage to figure out that they are stored in the SQLite3 database /var/McAfee/agent/db/ma.db, but I would like to avoid doing something like the following to see if a value has already been set to the value I want it set to.  Installing sqlite3 on all of my systems only to find a custom property.

sqlite3 /var/McAfee/agent/db/ma.db "SELECT COUNT(*) FROM AGENT_CHILD WHERE NAME = 'UserProperty1' AND VALUE='Foo';"

I can grep for it, but that seems gross also because I would have to make sure my custom properties are unique as to not collide with other strings in the file.

grep MySuperUniqueValueThatIsNotVeryIntuitive /var/McAfee/agent/db/ma.db

Binary file /var/McAfee/agent/db/ma.db matches

It looks like the name and value columns follow immediately after one another in the SQLite DB but that may not be very reliable and they appear twice for some reason.

grep -ao UserProperty1Foo /var/McAfee/agent/db/ma.db

UserProperty1Foo

UserProperty1Foo

This is for puppet btw.  I am trying to manage the user property.

exec {'set_user_property':

  command => '/opt/McAfee/agent/bin/maconfig -custom -prop1 Foo',

  unless => 'grep -q UserProperty1Foo /var/McAfee/agent/db/ma.db',

}

Thoughts?

-Alan

You Deserve an Award
Don't forget, when your helpful posts earn a kudos or get accepted as a solution you can unlock perks and badges. Those aren't the only badges, either. How many can you collect? Click here to learn more.

Community Help Hub

    New to the forums or need help finding your way around the forums? There's a whole hub of community resources to help you.

  • Find Forum FAQs
  • Learn How to Earn Badges
  • Ask for Help
Go to Community Help

Join the Community

    Thousands of customers use our Community for peer-to-peer and expert product support. Enjoy these benefits with a free membership:

  • Get helpful solutions from product experts.
  • Stay connected to product conversations that matter to you.
  • Participate in product groups led by employees.
Join the Community
Join the Community