{"action":"created","issue":{"url":"https://api.github.com/repos/librenms/librenms/issues/3244","repository_url":"https://api.github.com/repos/librenms/librenms","labels_url":"https://api.github.com/repos/librenms/librenms/issues/3244/labels{/name}","comments_url":"https://api.github.com/repos/librenms/librenms/issues/3244/comments","events_url":"https://api.github.com/repos/librenms/librenms/issues/3244/events","html_url":"https://github.com/librenms/librenms/pull/3244","id":140959765,"number":3244,"title":"Nagios Services","user":{"login":"adaniels21487","id":13431617,"avatar_url":"https://avatars.githubusercontent.com/u/13431617?v=3","gravatar_id":"","url":"https://api.github.com/users/adaniels21487","html_url":"https://github.com/adaniels21487","followers_url":"https://api.github.com/users/adaniels21487/followers","following_url":"https://api.github.com/users/adaniels21487/following{/other_user}","gists_url":"https://api.github.com/users/adaniels21487/gists{/gist_id}","starred_url":"https://api.github.com/users/adaniels21487/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adaniels21487/subscriptions","organizations_url":"https://api.github.com/users/adaniels21487/orgs","repos_url":"https://api.github.com/users/adaniels21487/repos","events_url":"https://api.github.com/users/adaniels21487/events{/privacy}","received_events_url":"https://api.github.com/users/adaniels21487/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/librenms/librenms/labels/Core","name":"Core","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2016-03-15T12:33:23Z","updated_at":"2016-04-06T22:45:41Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/librenms/librenms/pulls/3244","html_url":"https://github.com/librenms/librenms/pull/3244","diff_url":"https://github.com/librenms/librenms/pull/3244.diff","patch_url":"https://github.com/librenms/librenms/pull/3244.patch"},"body":"Hi Team,\r\nThis PR has some modifications to Nagios Services.\r\n\r\n- Moved check-services.php to a poller module\r\n- Added performance data collection to the poller\r\n- Centralised DB functions to includes/services.inc.php\r\n- Created add/edit/delete functions off the device, services page\r\n- Removed legacy edit/delete interfaces.\r\n- Moved and modified check.inc scripts\r\n- Documentation Updates\r\n- Modified services table\r\n\r\nSome Notes...\r\n\r\n1. Crontab entry no longer required.\r\nAs this is now a poller module, the cron entry for check-services.php is no longer required.\r\nThe documentation has been updated but what to do where this is already deployed in the field.\r\n\r\n2. Add/Edit/Delete Pages\r\nService Add/Edit/Delete pages now exist on the device, services page.\r\nBut the device, services link doesn't exist until a service is created.\r\nThis means users must add the first service to a device using the narbar 'Add Service', or Device -> Edit and from then on services on this device can be managed within device -> services.\r\nI'm not overly happy with this but I don't know how else to go. If anyone has a suggestion on how to handle this better, Please let me know.\r\n\r\n3. Old check.inc scripts\r\nThese files have been moved up one level and named according to the check. eg. Old: includes/services/icmp/check.inc, New: includes/services/check_icmp.inc.php\r\nThese files used to only run the script, they now populate several variables that are used by the services system. See includes/services/check_icmp.inc.php for an example.\r\n  - $check_cmd - builds the command to be run to execute the check\r\n  - $check_ds - a replacement json array for the one that is discovered, this is used when you want to combine multiple DS's into a single graph. See 4.\r\n  - $check_graph - the graph definitions when DS's are combined.\r\n\r\n\r\n4. Performance data collection\r\nThe collection of performance data is now dynamic. When the service is polled DSs are extracted from the returned data. RRDs are created and DSs are saved in the database for graph creation.\r\nThere are some instances where the check script will return multiple DSs that could be combined into a single graph. For example ICMP, this check returns: rta, rtmin and rtmax. \r\nThis can be done by creating a check script in includes/services/ for the type.\r\n\r\nPlease take a look and let me know what you think.\r\n\r\nAaron\r\n"},"comment":{"url":"https://api.github.com/repos/librenms/librenms/issues/comments/206601152","html_url":"https://github.com/librenms/librenms/pull/3244#issuecomment-206601152","issue_url":"https://api.github.com/repos/librenms/librenms/issues/3244","id":206601152,"user":{"login":"adaniels21487","id":13431617,"avatar_url":"https://avatars.githubusercontent.com/u/13431617?v=3","gravatar_id":"","url":"https://api.github.com/users/adaniels21487","html_url":"https://github.com/adaniels21487","followers_url":"https://api.github.com/users/adaniels21487/followers","following_url":"https://api.github.com/users/adaniels21487/following{/other_user}","gists_url":"https://api.github.com/users/adaniels21487/gists{/gist_id}","starred_url":"https://api.github.com/users/adaniels21487/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adaniels21487/subscriptions","organizations_url":"https://api.github.com/users/adaniels21487/orgs","repos_url":"https://api.github.com/users/adaniels21487/repos","events_url":"https://api.github.com/users/adaniels21487/events{/privacy}","received_events_url":"https://api.github.com/users/adaniels21487/received_events","type":"User","site_admin":false},"created_at":"2016-04-06T22:45:41Z","updated_at":"2016-04-06T22:45:41Z","body":"bump :)"}}