Nagios Plugin via CLI

Yes, the file is read-only. You are not supposed to edit files in the ~/lib directory.

If you want to change the check_snmp file, then you must copy it from ~/lib/nagios/plugins to ~/local/lib/nagios/plugins (notice the local) and edit it there.