Monitoring of railway freight vehicles using onboard systems