{"action":"created","issue":{"url":"https://api.github.com/repos/mickem/nscp/issues/207","labels_url":"https://api.github.com/repos/mickem/nscp/issues/207/labels{/name}","comments_url":"https://api.github.com/repos/mickem/nscp/issues/207/comments","events_url":"https://api.github.com/repos/mickem/nscp/issues/207/events","html_url":"https://github.com/mickem/nscp/issues/207","id":117609279,"number":207,"title":"Return error when external script not found","user":{"login":"willemdh","id":6462991,"avatar_url":"https://avatars.githubusercontent.com/u/6462991?v=3","gravatar_id":"","url":"https://api.github.com/users/willemdh","html_url":"https://github.com/willemdh","followers_url":"https://api.github.com/users/willemdh/followers","following_url":"https://api.github.com/users/willemdh/following{/other_user}","gists_url":"https://api.github.com/users/willemdh/gists{/gist_id}","starred_url":"https://api.github.com/users/willemdh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willemdh/subscriptions","organizations_url":"https://api.github.com/users/willemdh/orgs","repos_url":"https://api.github.com/users/willemdh/repos","events_url":"https://api.github.com/users/willemdh/events{/privacy}","received_events_url":"https://api.github.com/users/willemdh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2015-11-18T15:20:49Z","updated_at":"2015-12-06T05:54:14Z","closed_at":null,"body":"Is there some way to make NSClient++ return a critical or unknown status when an external script is not present on a monitored server. At this moment this is returned:\r\n```\r\nscripts\\powershell\\check_ms_win_disk_load.ps1 : The module 'scripts' could not\r\nbe loaded. For more information, run 'Import-Module scripts'.\r\n\r\nAt line:1 char:1\r\n\r\n+ scripts\\\\powershell\\\\check_ms_win_disk_load.ps1 -ms 5 -dl C; exit $LastExitCode\r\n\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n\r\n+ CategoryInfo : ObjectNotFound: (scripts\\\\powersh...n_disk_load.p \r\n\r\ns1:String) [], CommandNotFoundException\r\n\r\n+ FullyQualifiedErrorId : CouldNotAutoLoadModule\r\n```\r\nThe problem is the returned status is 'ok', which makes it hard to notice this when an external (Powershell) script is not on the monitored server.\r\n\r\nOr is there already a way to make it exit with status code 2 or 3 when the external script is not present?"},"comment":{"url":"https://api.github.com/repos/mickem/nscp/issues/comments/162275471","html_url":"https://github.com/mickem/nscp/issues/207#issuecomment-162275471","issue_url":"https://api.github.com/repos/mickem/nscp/issues/207","id":162275471,"user":{"login":"mickem","id":1434697,"avatar_url":"https://avatars.githubusercontent.com/u/1434697?v=3","gravatar_id":"","url":"https://api.github.com/users/mickem","html_url":"https://github.com/mickem","followers_url":"https://api.github.com/users/mickem/followers","following_url":"https://api.github.com/users/mickem/following{/other_user}","gists_url":"https://api.github.com/users/mickem/gists{/gist_id}","starred_url":"https://api.github.com/users/mickem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mickem/subscriptions","organizations_url":"https://api.github.com/users/mickem/orgs","repos_url":"https://api.github.com/users/mickem/repos","events_url":"https://api.github.com/users/mickem/events{/privacy}","received_events_url":"https://api.github.com/users/mickem/received_events","type":"User","site_admin":false},"created_at":"2015-12-06T05:54:14Z","updated_at":"2015-12-06T05:54:14Z","body":"But one thing which isimportant is that \"test\" is an actual server instance of NSCLient++ so you have to stop nsclient++ service before you run test (or the servide will be responding to your queries... And chaning the config requires you to stop/start test mode for it to reload."}}