check_memory

CommentThis is the check_memory Nagios plugin, available e.g. in /usr/lib/nagios/plugins/.

File read

This executable can read data from local files.
  1. CommentThe read file content is limited to the first line.
    This function can be performed by any unprivileged user.
    check_memory --extra-opts=@/path/to/input-file
    This function is performed by the privileged user if executed via sudo because the acquired privileges are not dropped.
    RemarksIf there are environment variables involved, they must be passed via sudo VAR=value ... or exported then sudo -E ....
    check_memory --extra-opts=@/path/to/input-file