I have set up a Universal Forwarder(UF) from the script on Machine 2 but UF is not added on Splunk Enterprise(Machine 1).
I have manually added the deployment server and in this case, the UF is added on Splunk Enterprise but the entity is not displayed on Splunk App for Infrastructure for which I have waited for more than 5 mins.
Followed the below link to install SAI on Splunk Enterprise:
https://docs.splunk.com/Documentation/InfraApp/2.0.1/Install/Install
Does the splunkd.log from the UF say anything about whether the data is successfully sending to Machine 1?
In the UF logs on Machine 2 getting the message that it's connected to Machine 1 but when I visited in Forwarder Management tab then it's not displayed there.
For the reference please refer the last few lines of UF logs after starting UF:
01-07-2020 05:35:13.024 -0500 INFO TcpOutputProc - Connected to idx=192.168.1.15:9997, pset=0, reuse=0.
01-07-2020 05:35:13.029 -0500 INFO WatchedFile - Will begin reading at offset=13776943 for file='/data/splunkforwarder/var/log/splunk/metrics.log'.
01-07-2020 05:35:13.032 -0500 INFO WatchedFile - Will begin reading at offset=978 for file='/data/splunkforwarder/var/log/splunk/conf.log'.
01-07-2020 05:35:42.667 -0500 INFO ScheduledViewsReaper - Scheduled views reaper run complete. Reaped count=0 scheduled views
Is the data arriving at Machine 1? If you search index=_internal host=${Machine 2}
or | mcatalog values(metric_name) WHERE host=${Machine 2} AND index=em_metrics
, do you see data?
Yes, Gettings logs at Machine 1 but didn't get the metrics.
I am getting the output of this command:
index=_internal host=${Machine 2}
but didn't get any output of this command:
| mcatalog values(metric_name) WHERE host=${Machine 2} AND index=em_metrics
Check if collectd running or installed on monitored Machine 2..
apt-cache policy collectd
ps -ef | grep collectd
Did you get any errors when you ran the script from "Add Data" page?
Hello @dagarwal_splunk , I'm having the same issue although, is there any alternative for this command?
apt-cache policy collectd
since I can't install it in my UF. It says "No package apt-cache available."
Regards,
Rockie
Yes, collectd is installed and running, verified from the above 2 commands.
Yes, getting error in the collectd.logs:
[2020-01-09 08:31:40] [error] processmon plugin: Error reading /proc/12820/stat
[2020-01-09 08:31:40] [notice] read-function of plugin `processmon' failed. Will suspend it for 120.000 seconds.
Ignore that error. It's just that process died while it was being monitored.
To debug, let's try some steps:
https://docs.splunk.com/Documentation/Splunk/7.3.3/Metrics/GetMetricsInOther#Example_of_sending_metr...
Update token, port and server in the command
[error] write splunk plugin: curl_easy_perform failed to connect to 192.168.1.15:8088 with status 7: Couldn't connect to server
Yes, I have already enabled all the HEC tokens.
In the Global Settings, SSL is already enabled and the port number is 8088(default).
HEC token which I am using has default index as "em_metrics".
HEC token, Server IP and port number in /etc/collectd/collectd.conf file is correct.
Getting the below output of the given curl command:
{"text":"Server is busy","code":9,"invalid-event-number":0}
Yeah, it's working now, I have unchecked the Use Deployment Server option from Global Settings.
Thanks, dagarwal
"Add Data" script installs both collectd(Metrics) and UF(logs) for Linux machine.
Also check, "/etc/collectd/collectd.logs" for any errors.
For machine 2, what is you Linux distro like Centos, Ubuntu? and what version?
For both Machine 1 and Machine 2 I am using Ubuntu 18.04 LTS.
This file doesn't exist on Machine 2(client machine): /etc/collectd/collectd.logs
The specific location of the collectd.log may vary by distro, but the information should be in the collectd.log on Machine 2.
I have reinstalled it from the script and get the below error in the collectd.logs:
[2020-01-09 08:31:40] [error] processmon plugin: Error reading /proc/12820/stat
[2020-01-09 08:31:40] [notice] read-function of plugin `processmon' failed. Will suspend it for 120.000 seconds.