Issue
When sending the SPI data manually from Admin > Reports > Status report page, under Acquia SPI, by clicking manually send SPI data, Acquia Insight works fine. But when using a server cron process to send the information, as mentioned here, https://docs.acquia.com/cloud-platform/insight/config/#connector-when-connects, you are not receiving any data.
Resolution
Firstly try to run the run the scheduled job against the server with a verbose output, as follows -
abc@web-00001:/var/www/html/abc.prod/docroot$ /usr/bin/wget -O - -t 1 https://abc.prod.acquia-sites.com/system/acquia-spi-send?key=86edfae833ae7564c0773248b19fea9c70a6be72 -vvv
If you receive the following error -
--2021-01-07 06:17:46-- https://abc.prod.acquia-sites.com/system/acquia-spi-send?key=86edfae833ae7564c0773248b19fea9c70a6be72
Resolving abc.prod.acquia-sites.com (abc.prod.acquia-sites.com)... 3.96.42.183
Connecting to abc.prod.acquia-sites.com (abc.prod.acquia-sites.com)|3.96.42.183|:443... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Username/Password Authentication Failed.
This Username/Password Authentication Failed
occurs because of having Basic Authentication enabled, so please check if you have PHP Authentication shield
enabled on the site.
Now try to run the scheduled job again with the Authentication credentials, considering Username is `xxx` and Password is `yyy`, as follows :-
/usr/bin/wget --user=xxx --password=yyy -O - -q -t 1 https://abc.prod.acquia-sites.com/system/acquia-spi-send?key=86edfae833ae7564c0773248b19fea9c70a6be72
You will see output something like this -
abc@web-38595:/var/www/html/abc.prod/docroot$ /usr/bin/wget --user=xxx --password=yyy -O - -t 1 https://abc.prod.acquia-sites.com/system/acquia-spi-send?key=86edfae833ae7564c0773248b19fea9c70a6be72 -vvv
--2021-01-07 06:36:19-- https://abc.prod.acquia-sites.com/system/acquia-spi-send?key=86edfae833ae7564c0773248b19fea9c70a6be72
Resolving abc.prod.acquia-sites.com (abc.prod.acquia-sites.com)... 3.96.42.183
Connecting to abc.prod.acquia-sites.com (abc.prod.acquia-sites.com)|3.96.42.183|:443... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Authentication selected: Basic realm="Hello!"
Reusing existing connection to abc.prod.acquia-sites.com:443.
HTTP request sent, awaiting response... 200 OK
Length: 0 [text/plain]
Saving to: ‘STDOUT’
- [ <=> ] 0 --.-KB/s in 0s
2021-01-07 06:36:31 (0.00 B/s) - written to stdout [0/0]
This shows that the cron is working now, so now edit the Scheduled Jobs in the Cloud Account and add the credentials in the command
/usr/bin/wget --user=xxx --password=yyy -O - -q -t 1 https://abc.prod.acquia-sites.com/system/acquia-spi-send?key=86edfae833ae7564c0773248b19fea9c70a6be72
If you are still facing the issue, on getting the cron job work, please feel free to contact the Acquia Support.