# Parsing McAfee ePO Logs

**URL:** <https://discuss.elastic.co/t/parsing-mcafee-epo-logs/81880>\
**Category:** Logstash\
**Created:** [April 10, 2017, 10:27pm UTC](https://discuss.elastic.co/t/parsing-mcafee-epo-logs/81880 "2017-04-10T22:27:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![julemik](https://avatars.discourse-cdn.com/v4/letter/j/e36b37/32.png) [@julemik](https://discuss.elastic.co/u/julemik)\
**Post date:** [April 10, 2017, 10:27pm UTC](https://discuss.elastic.co/t/parsing-mcafee-epo-logs/81880/1 "2017-04-10T22:27:35Z")

</div>

McAfee has recently supported forwarding messages via syslog, and after a bit of groking. I'm left with the meat and potatoes portion of the message that is xml. Here is how I'm parsing it...

xml {  
source =\> "epo\_xml"  
target =\> "epo\_xml\_parsed"  
store\_xml =\> true  
add\_tag =\> ["xml\_parse\_success"]  
}  
...

Provides the following result:  
...  
"tags":["xml\_parse\_success"],  
"epo\_xml\_parsed":  
{  
"MachineInfo":[  
{  
"RawMACAddress":["F0921CDC9999"],  
"MachineName":["aa-somehost"],  
"AgentVersion":["5.0.0"],  
"AgentGUID":["{50997d14-0b4a-11e7-2bcc-f12222226f21}"],  
"OSName":["Windows 7"],  
"IPAddress":["192.168.1.1"],  
"TimeZoneBias":["420"]  
}  
],  
"McAfeeCommonUpdater":[  
{  
"ProductFamily":"TVD",  
"ProductName":"McAfee Agent",  
"ProductVersion":"5.0.0",  
"UpdateEvent":[  
{  
"Locale":["0409"],  
"InitiatorID":["EPOAGENT3000"],  
"Type":["Update"],  
"SiteName":["ePO\_SRV-NAME"],  
"Version":["N/A"],  
"EventID":["2402"],  
"Error":["26"],  
"Severity":["4"],  
"ProductID":["EPOAGENT3000"],  
"GMTTime":["2017-03-30T07:00:00"],  
"InitiatorType":["UpdateTask"]  
}  
]  
}  
]  
},  
...  
Now I'd like to create the "machinename" field with the appropriate value. How?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 11, 2017, 8:22am UTC](https://discuss.elastic.co/t/parsing-mcafee-epo-logs/81880/2 "2017-04-11T08:22:20Z")

</div>

> [@julemik](#):
>
> Now I'd like to create the "machinename" field with the appropriate value. How?

You mean like it has in the sample?

---

<div class="post-metadata">

**Author:** ![julemik](https://avatars.discourse-cdn.com/v4/letter/j/e36b37/32.png) [@julemik](https://discuss.elastic.co/u/julemik)\
**Post date:** [April 11, 2017, 1:44pm UTC](https://discuss.elastic.co/t/parsing-mcafee-epo-logs/81880/3 "2017-04-11T13:44:47Z")

</div>

It hasn't yet in the sample. MachineName currently has a value that appears to be an array. And it is a part of a hash whose parent is MachineInfo. I'd like to assign a whole knew variable "machinename"=${[MachineInfo][MachineName]}, but when I do, logstash hangs, and I get a ton of ruby errors in logstash-plain.log. so what am I doing wrong?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 9, 2017, 1:50pm UTC](https://discuss.elastic.co/t/parsing-mcafee-epo-logs/81880/4 "2017-05-09T13:50:25Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
