# .Events undefined Error while building wmibeats

**URL:** <https://discuss.elastic.co/t/events-undefined-error-while-building-wmibeats/54597>\
**Category:** Beats\
**Created:** [July 3, 2016, 3:59pm UTC](https://discuss.elastic.co/t/events-undefined-error-while-building-wmibeats/54597 "2016-07-03T15:59:57Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![sunilactivity](https://avatars.discourse-cdn.com/v4/letter/s/f14d63/32.png) [@sunilactivity](https://discuss.elastic.co/u/sunilactivity)\
**Post date:** [July 3, 2016, 3:59pm UTC](https://discuss.elastic.co/t/events-undefined-error-while-building-wmibeats/54597/1 "2016-07-03T15:59:57Z")

</div>

I am trying to build the wmibeats code in windows 7 with the following command

E:\Go\_Prj\src\[github.com](http://github.com)\eskibars\wmibeat\>go build

and I get this error

**#[github.com/eskibars/wmibeat/beater](http://github.com/eskibars/wmibeat/beater)**  
\*_beater\wmibeat.go:177: b.Events undefined (type beat.Beat has no field or method Events)_

When I try to run the command  
E:\Go\_Prj\src\[github.com](http://github.com)\eskibars\wmibeat\>make  
i get the following error

**glide update --no-recursive**  
**make: glide: Command not found**  
**make: \*\*\* [Makefile:14: init] Error 127**

I am very new to the go programming language and finding it difficult to debug it.  
Please guide  
Sunil

---

<div class="post-metadata">

**Author:** ![sunilactivity](https://avatars.discourse-cdn.com/v4/letter/s/f14d63/32.png) [@sunilactivity](https://discuss.elastic.co/u/sunilactivity)\
**Post date:** [July 3, 2016, 4:48pm UTC](https://discuss.elastic.co/t/events-undefined-error-while-building-wmibeats/54597/2 "2016-07-03T16:48:56Z")

</div>

Ok, just figured it out. I had to download glide from [here](https://github.com/Masterminds/glide/releases/download/0.10.2/glide-0.10.2-windows-386.zip) and set it an the Path variable.  
That fixed it

---

<div class="post-metadata">

**Author:** ![prakash1243](https://avatars.discourse-cdn.com/v4/letter/p/35a633/32.png) [@prakash1243](https://discuss.elastic.co/u/prakash1243)\
**Post date:** [January 3, 2017, 7:20am UTC](https://discuss.elastic.co/t/events-undefined-error-while-building-wmibeats/54597/3 "2017-01-03T07:20:08Z")

</div>

Hi Sunil-

I have downloaded the Release file ([https://github.com/eskibars/wmibeat/releases](https://github.com/eskibars/wmibeat/releases)) of wmibeats and tried building it with the command (./wmibeat -c wmibeat.yml -e -d "\*") on my windows-7 machine.

But, I get this error message "Start error: loading config file error: Failed to apply config wmibeat.yml: type mismatch. Exiting."

The downloaded release version has only couple of files, wmibeat.exe and .yml files.

Please let me know, how do I resolve this issue. Thanks !

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [January 3, 2017, 5:04pm UTC](https://discuss.elastic.co/t/events-undefined-error-while-building-wmibeats/54597/4 "2017-01-03T17:04:00Z")

</div>

this error message seems to be related to your config file.

---

<div class="post-metadata">

**Author:** ![prakash1243](https://avatars.discourse-cdn.com/v4/letter/p/35a633/32.png) [@prakash1243](https://discuss.elastic.co/u/prakash1243)\
**Post date:** [January 4, 2017, 3:59am UTC](https://discuss.elastic.co/t/events-undefined-error-while-building-wmibeats/54597/5 "2017-01-04T03:59:41Z")

</div>

Thanks for your reply Steffens.  
I downloaded the wimbeat as a zip file from GIt repository; I've got only .exe and .yml files. I don't see any config files.  
Download Path: ([https://github.com/eskibars/wmibeat/releases](https://github.com/eskibars/wmibeat/releases))

I do not want to the build the project again, I was trying to download, configure it and run the service.

Could you please point me to the right path to download the full content of winbeat files. Thanks !

Prakash.

---

<div class="post-metadata">

**Author:** ![tudor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tudor/32/3753_2.png) [@tudor](https://discuss.elastic.co/u/tudor)\
**Post date:** [January 4, 2017, 7:55am UTC](https://discuss.elastic.co/t/events-undefined-error-while-building-wmibeats/54597/6 "2017-01-04T07:55:05Z")

</div>

Can you post the full log file, please? I assume you didn't change anything in the yml file?

---

<div class="post-metadata">

**Author:** ![prakash1243](https://avatars.discourse-cdn.com/v4/letter/p/35a633/32.png) [@prakash1243](https://discuss.elastic.co/u/prakash1243)\
**Post date:** [January 4, 2017, 9:09am UTC](https://discuss.elastic.co/t/events-undefined-error-while-building-wmibeats/54597/7 "2017-01-04T09:09:16Z")

</div>

Hi @tudor

Attached is my YML file

 ![](https://us1.discourse-cdn.com/elastic/original/2X/5/533ba9fdbf785ae8ede5ef239d339af57714e229.png)

I don't have any logs created.

After I download the wimbeat release file, I've had only couple of files wimbeat.exe file and wimbeat.yml file.

---

<div class="post-metadata">

**Author:** ![prakash1243](https://avatars.discourse-cdn.com/v4/letter/p/35a633/32.png) [@prakash1243](https://discuss.elastic.co/u/prakash1243)\
**Post date:** [March 2, 2017, 4:44am UTC](https://discuss.elastic.co/t/events-undefined-error-while-building-wmibeats/54597/8 "2017-03-02T04:44:57Z")

</div>

Could some one help me out here please.  
how do I start the wmibeat ?

---

<div class="post-metadata">

**Author:** ![OfirGranot](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ofirgranot/32/14574_2.png) [@OfirGranot](https://discuss.elastic.co/u/OfirGranot)\
**Post date:** [April 6, 2017, 3:24pm UTC](https://discuss.elastic.co/t/events-undefined-error-while-building-wmibeats/54597/9 "2017-04-06T15:24:11Z")

</div>

Hi,

I gave up when tried to rebuild it because I still had that issue after I completed implemeting for the client windows environment all the prerequired components git & goland & elastic beats & go-ole & glide.

C:\Go\src\[github.com](http://github.com)\eskibars\wmibeat\>go build

# [github.com/eskibars/wmibeat/beater](http://github.com/eskibars/wmibeat/beater)

beater\wmibeat.go:174: [b.Name](http://b.Name) undefined (type \*beat.Beat has no field or method Name)  
beater\wmibeat.go:177: b.Events undefined (type \*beat.Beat has no field or method Events)

so I took and used the relased build which contain the wmibeat.exe & wmibeat.yml, configued the executed it successfully (using wmibeat -c wmibeat.yml -e -d "\*")  
The only issues I had to figure out was for places at the yml config file where I used the TAB key - only regular spaces allowed.  
My sample configuration:

```
################### WMIBeat Configuration Example #########################

############################# wmibeat ######################################

wmibeat:
  # Defines how often an event is sent to the output
  period: 30s
  
  classes:
	- class: Win32_OperatingSystem
	  fields:
	  - FreePhysicalMemory
	  - FreeSpaceInPagingFiles
	  - FreeVirtualMemory
	  - NumberOfProcesses
	  - NumberOfUsers
	- class: Win32_PerfFormattedData_PerfDisk_LogicalDisk
	  fields:
	  - Name
	  - FreeMegabytes
	  - PercentFreeSpace
	  - CurrentDiskQueueLength
	  - DiskReadsPerSec
	  - DiskWritesPerSec
	  - DiskBytesPerSec
	  - PercentDiskReadTime
	  - PercentDiskWriteTime
	  - PercentDiskTime
	  whereclause: Name != "_Total"
	  objecttitlecolumn: Name
	- class: Win32_PerfFormattedData_PerfOS_Memory
	  fields:
	  - CommittedBytes
	  - AvailableBytes
	  - PercentCommittedBytesInUse
output:
  logstash:
	hosts: ["xxx.yy.zzzz.net:5044"]
	# Number of workers per Logstash host.
	worker: 1
	index: wmibeat

	# Optional TLS. By default is off.
	tls:
	  certificate_authorities: ["C:/XXX/logstash-forwarder_xxx.crt"]
############################# Logging #########################################

# There are three options for the log ouput: syslog, file, stderr.
# Under Windows systems, the log files are per default sent to the file output,
# under all other system per default to syslog.
logging:

  # Send all logging output to syslog. On Windows default is false, otherwise
  # default is true.
  #to_syslog: true

  # Write all logging output to files. Beats automatically rotate files if rotateeverybytes
  # limit is reached.
  #to_files: false
  to_files: true
  # To enable logging to files, to_files option has to be set to true
  files:
	# The directory where the log files will written to.
	#path: /var/log/mybeat
	path: C:/XXX/YYY/ELK Stack/wmibeatLog
	# The name of the files where the logs are written to.
	#name: mybeat
	name: wmibeat
	# Configure log file size limit. If limit is reached, log file will be
	# automatically rotated
	rotateeverybytes: 10485760 # = 10MB

	# Number of rotated log files to keep. Oldest files will be deleted first.
	keepfiles: 7

  # Enable debug output for selected components. To enable all selectors use ["*"]
  # Other available selectors are beat, publish, service
  # Multiple selectors can be chained.
  #selectors: []

  # Sets log level. The default log level is error.
  # Available log levels are: critical, error, warning, info, debug
  level: error
```

---

<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:** [July 5, 2017, 9:49pm UTC](https://discuss.elastic.co/t/events-undefined-error-while-building-wmibeats/54597/10 "2017-07-05T21:49:43Z")

</div>


