Creating custom check. Error "check_command does not exist"

I would like to create a check that monitors the number of postgress processes. I have a custom bash script i created which is under /usr/lib/nagios/plugins and i have made it executable. In the services.conf file I added

}

apply Service “procs” {
import “generic-service”

check_command = “customprocs”
vars.procs_warning = 100
vars.procs_critical = 120
vars.procs_arguments = “10/main”
vars.procs_user = “postgres”

assign where host.name == NodeName
}

In the commands.conf file i added

object CheckCommand “customprocs.sh” {
import “plugin-check-command”
command = [PluginDir + “/customprocs.sh” ]
}

When I reload the icinga service it gives the error mentioned in the title of the post. One thing to mention is the ‘customprocs’ segment in services.conf used to be the check for procs . I’m not sure if replacing that would cause any issues.

does not match with:

I’ve edited it so it matches but still receive the error " customprocs.sh’ of type ‘Service’; Attribute ‘check_command’: Object ‘customprocs.sh’ of type ‘CheckCo
mmand’ does not exist."

I was able to resolve this but I also want to set warning and critical threshold for this. In the services.conf file i have specified

vars.customprocs_warning = 90
vars.customprocs_critical = 120
vars.customprocs_arguments = “10/main”
vars.customprocs_user = “postgres”
But these changes are not reflected on the icingaweb interface