Sometimes it is necessary to re-install an existing collector on a new or existing server for numerous reasons such as the collector failing to uninstall with an error like this in Windows.
No JVM could be found on your system. Please define EXE4J JAVA HOME to point to an installed 64-bit JDK or JRE or download a JRE from www.Java.com.
- First, generate a sources.json file of the old collector configuration using this link by going to Manage Data -> Collection and clicking on the "i" or information button at the far right side of the collector name.
- Update the JSON file to make sure the cutoffTimestamp parameter is set correctly to the time you wish to restart collection (use epochconverter.com to calculate the correct time in milliseconds, 13 digits. A value of 0 means all time.). Failure to do this might result in the reingestion of already ingested data. Update this on all sources defined.
- Rename the old collector directory if reinstalling on the same server. You can delete it later after confirming that the new collector is up and working as expected.
- Rename the old collector in the UI in the Manage -> Collection dashboard. This will free up the name so it can be used for the new collector install in the next step and the same collector name metadata will be associated with the new collector agent. If this is not done, you will see an epoch timestamp suffixed to the new collector's name. After the new collector has been installed and confirmed that is working as expected, then you can delete the old collector from the UI.
- Install the collector on the server per the documents below
sudo ./SumoCollector.sh -q -Vsumo.accessid=<accessId> -Vsumo.accesskey=<accessKey>
sudo ./SumoCollector.exe -console -q -Vsumo.accessid=<accessId> -Vsumo.accesskey=<accessKey>