{"action":"created","issue":{"url":"https://api.github.com/repos/nagios-plugins/nagios-plugins/issues/94","labels_url":"https://api.github.com/repos/nagios-plugins/nagios-plugins/issues/94/labels{/name}","comments_url":"https://api.github.com/repos/nagios-plugins/nagios-plugins/issues/94/comments","events_url":"https://api.github.com/repos/nagios-plugins/nagios-plugins/issues/94/events","html_url":"https://github.com/nagios-plugins/nagios-plugins/issues/94","id":102700376,"number":94,"title":"check_nagios - could not locate a running nagios process","user":{"login":"box293","id":8356113,"avatar_url":"https://avatars.githubusercontent.com/u/8356113?v=3","gravatar_id":"","url":"https://api.github.com/users/box293","html_url":"https://github.com/box293","followers_url":"https://api.github.com/users/box293/followers","following_url":"https://api.github.com/users/box293/following{/other_user}","gists_url":"https://api.github.com/users/box293/gists{/gist_id}","starred_url":"https://api.github.com/users/box293/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/box293/subscriptions","organizations_url":"https://api.github.com/users/box293/orgs","repos_url":"https://api.github.com/users/box293/repos","events_url":"https://api.github.com/users/box293/events{/privacy}","received_events_url":"https://api.github.com/users/box293/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-08-24T04:04:42Z","updated_at":"2015-11-12T12:29:03Z","closed_at":null,"body":"Originally reported here on Debian 7.8:\r\nhttps://support.nagios.com/forum/viewtopic.php?f=35&t=34331\r\n\r\nI've confirmed the same behaviour on CentOS 6.5.\r\n\r\nWith check_nagios it gives the error that it could not located a nagios process.\r\n\r\nNagios Plugins v 2.1.1\r\n```\r\nCommand:\r\n./check_nagios -t 20 -e 5 -F /usr/local/nagios/var/status.dat -C /usr/local/nagios/bin/nagios\r\n\r\nOutput:\r\nNAGIOS CRITICAL: Could not locate a running Nagios process!\r\n```\r\n\r\nNagios Plugins v 2.0.3\r\n```\r\nCommand:\r\n./check_nagios -t 20 -e 5 -F /usr/local/nagios/var/status.dat -C /usr/local/nagios/bin/nagios\r\n\r\nOutput:\r\nNAGIOS OK: 6 processes, status log updated 3 seconds ago\r\n```\r\n\r\nAlso, I tired using the -v flag to produce verbose troubleshooting output but it did not show anything, it wasn't until I tried -vv that I go info. This is the same in 2.0.3 and 2.0.1. This verbosity level feels broken in my opinion.\r\n```\r\nCommand with -v\r\n./check_nagios -t 20 -e 5 -F /usr/local/nagios/var/status.dat -C /usr/local/nagios/bin/nagios -v\r\n\r\nOutput:\r\nNAGIOS CRITICAL: Could not locate a running Nagios process!\r\n\r\nCommand with -vv\r\n./check_nagios -t 20 -e 5 -F /usr/local/nagios/var/status.dat -C /usr/local/nagios/bin/nagios -vv\r\n\r\nOutput:\r\ncommand: /bin/ps axwo 'stat uid pid ppid vsz rss pcpu cgroup:256 comm args'\r\nNAGIOS CRITICAL: Could not locate a running Nagios process!\r\n```\r\n\r\nAfter getting the verbose output I compared the commands used in both versions:\r\n\r\nv2.0.3:\r\n```\r\ncommand: /bin/ps axwo 'stat uid pid ppid vsz rss pcpu comm args'\r\n```\r\nv2.1.1\r\n```\r\ncommand: /bin/ps axwo 'stat uid pid ppid vsz rss pcpu cgroup:256 comm args'\r\n```\r\n\r\nThey seem slightly different, I'm sure this is the key to the problem."},"comment":{"url":"https://api.github.com/repos/nagios-plugins/nagios-plugins/issues/comments/156091770","html_url":"https://github.com/nagios-plugins/nagios-plugins/issues/94#issuecomment-156091770","issue_url":"https://api.github.com/repos/nagios-plugins/nagios-plugins/issues/94","id":156091770,"user":{"login":"PierrePezot","id":6087177,"avatar_url":"https://avatars.githubusercontent.com/u/6087177?v=3","gravatar_id":"","url":"https://api.github.com/users/PierrePezot","html_url":"https://github.com/PierrePezot","followers_url":"https://api.github.com/users/PierrePezot/followers","following_url":"https://api.github.com/users/PierrePezot/following{/other_user}","gists_url":"https://api.github.com/users/PierrePezot/gists{/gist_id}","starred_url":"https://api.github.com/users/PierrePezot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PierrePezot/subscriptions","organizations_url":"https://api.github.com/users/PierrePezot/orgs","repos_url":"https://api.github.com/users/PierrePezot/repos","events_url":"https://api.github.com/users/PierrePezot/events{/privacy}","received_events_url":"https://api.github.com/users/PierrePezot/received_events","type":"User","site_admin":false},"created_at":"2015-11-12T12:29:03Z","updated_at":"2015-11-12T12:29:03Z","body":"I added the zombie check in my code. I will work on cleaning the code and using nagios-plugins libs in order to make a proper pull request."}}