Some thoughts:
- Running a memory check without any thresholds does not sound very useful.
- Why don’t you use the already exiting
mem
command that icinga2 ships inside it template library? (see: https://icinga.com/docs/icinga2/latest/doc/10-icinga-template-library/#mem) - If you have trouble correctly defining the new check command and it’s arguments, check the part about check command definition from the docs:
https://icinga.com/docs/icinga2/latest/doc/05-service-monitoring/#checkcommand-definition