Custom AMS-service for AOS8


Is there any user that has written a custom ams-service for AOS 8 that may share a simple how to. I have started to look at the device-profiling and iot-services (mqtt) and it would be very nice to be able to report other measurements like cpu stats and memory usage, port up-down etc. via the mqtt broker.