Thanks for your instruction Michael. After following it, I run make again. The following is what my cmd shows. Is it right? And how can I use metricbeat locally? What command should I input to start it?
I am pretty new here and asking a lot of details. Thanks for your patience.
I had similar results when I ran metricbeat -e on my Windows 10 laptop.
I think the following message is key. metricbeat may need to run as an administrator on Windows.
Can you try running metricbeat -e when PowerShell is running as Administrator?
2020-01-30T13:14:06.134-0600 WARN system/system_windows.go:27 Metricbeat is running without SeDebugPrivilege, a Windows privilege that allows it to collect metrics from other processes. The user running Metricbeat may not have the appropriate privileges or the security policy disallows it.
If you pull the latest updates from the beats repo, do you see this issue? When I'd tried this earlier I was not seeing the metricset 'system/load' not found message.
PS C:\Users\mjm\go\src\github.com\elastic\beats\metricbeat> mage build 2020/02/04 10:20:03 Found Elastic Beats dir at C:\Users\mjm\go\src\github.com\elastic\beats
>> build: Building metricbeat
PS C:\Users\mjm\go\src\github.com\elastic\beats\metricbeat> .\metricbeat.exe Exiting: 1 error: metricset 'system/load' not found
Since you're building metricbeat from the master branch on WIndows, there's an additional step to adjust system.yml.
You'll need to comment out the line - load in modules.d/system.yml. It should look like this:
- module: system
by_cpu: 5 # include top 5 processes by CPU
by_memory: 5 # include top 5 processes by memory
After saving this update to system.yml, I was able to start metricbeat.
Can you run this with metricbeat.exe -e. You'll likely see much more information about the metricbeat start up process. Please let us know if you see any errors. At a minimum, you'll likely need to configure the output for metricbeat to point to an Elasticsearch instance.
Thanks Michael. I can see the detailed info right now. Thanks you for your patience in this period. Actually, what I am doing now still need to make it work on Linux (AWS Ubuntu). Do you know how to run source code under Linux? Do I still need to install mage?