{"action":"created","issue":{"url":"https://api.github.com/repos/spotify/puppetexplorer/issues/54","repository_url":"https://api.github.com/repos/spotify/puppetexplorer","labels_url":"https://api.github.com/repos/spotify/puppetexplorer/issues/54/labels{/name}","comments_url":"https://api.github.com/repos/spotify/puppetexplorer/issues/54/comments","events_url":"https://api.github.com/repos/spotify/puppetexplorer/issues/54/events","html_url":"https://github.com/spotify/puppetexplorer/issues/54","id":155748296,"number":54,"title":"Widgets on the dashboard, where \"Pending jobs\" is the most crucial","user":{"login":"elofu17","id":6313897,"avatar_url":"https://avatars.githubusercontent.com/u/6313897?v=3","gravatar_id":"","url":"https://api.github.com/users/elofu17","html_url":"https://github.com/elofu17","followers_url":"https://api.github.com/users/elofu17/followers","following_url":"https://api.github.com/users/elofu17/following{/other_user}","gists_url":"https://api.github.com/users/elofu17/gists{/gist_id}","starred_url":"https://api.github.com/users/elofu17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elofu17/subscriptions","organizations_url":"https://api.github.com/users/elofu17/orgs","repos_url":"https://api.github.com/users/elofu17/repos","events_url":"https://api.github.com/users/elofu17/events{/privacy}","received_events_url":"https://api.github.com/users/elofu17/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-19T14:18:52Z","updated_at":"2016-06-21T13:18:05Z","closed_at":null,"body":"In config.js(.example), please add something like this (I'm no programmer but I think you get the idea):\r\n\r\n```\r\nDASHBOARD_PANELS = [\r\n  {\"name\":\"Nodes with failures\",\"type\":\"danger\",\"query\":\"#node.latest_report_status=\\\"failed\\\"\"},\r\n  {\"name\":\"Nodes with pending jobs\",\"type\":\"warning\",\"query\":\"#report { latest_report?=true and noop=true and status=\\\"unchanged\\\" }\"},\r\n  {\"name\":\"Unresponsive nodes (last ${UNRESPONSIVE_HOURS}h)\",\"type\":\"danger\",\"query\":\"#node.report_timestamp < @\\\"now - $UNRESPONSIVE_HOURS hours\\\"\"},\r\n  {\"name\":\"Nodes in production env\",\"type\":\"success\",\"query\":\"#node.catalog_environment = production\"},\r\n  {{\"name\":\"Nodes in non-production env\",type:\"warning\",query:\"#node.catalog_environment != production\"}}\r\n];\r\n```\r\n\r\n1)\r\nAdd a dashboard for \"Nodes with pending jobs\".\r\n\r\nI have cron run 'puppet agent -t --noop' every now and then on all my nodes.\r\n\r\nNormally these noops show up as grey icons in the Nodes tab in Puppet Explorer, as there's nothing to do. The nodes are up to date. Everything is good.\r\n\r\nHowever, if the noop-run show pending changes, this is indicated with a blue icon in the Node tab.\r\n\r\nIt is crucial to me to have this as a dashboard widget, as it will show how many of my nodes are NOT up to date.\r\n\r\nBefore you can add this dashboard, you need to fix the bug in https://github.com/dalen/node-puppetdbquery/issues/1, since the query contain a questionmark.\r\n    #report { latest_report?=true and noop=true and status=\"unchanged\" }\r\n\r\n\r\n\r\n2)\r\nI almost consider the following a bug:\r\n\r\nIn the 'Unresponsive nodes' widget you're using a static query like this:\r\n'#node.report_timestamp < @\"now - 2 hours\"'\r\n\r\nThis forces the widget to use 2 hours, even though the user can configure the UNRESPONSIVE_HOURS variable to e.g. 24h earlier in the file.\r\n\r\nUpdate to something like this: '#node.report_timestamp < @\"now - $UNRESPONSIVE_HOURS hours\"'\r\n\r\n\r\n\r\n3)\r\nThis is a bit overkill, but it's just a simple if-statement:\r\n\r\nIf the puppet-db only deal with one single environment, \"production\", I think you should hide the 'Nodes in non-production env' widget from the dashboard. Otherwise it will always show \"0\" and just waste screen space for users like me. :-)\r\n\r\nif ( total number of environments > 1 ) then\r\n  show the 'Nodes in non-production env' widget\r\nfi\r\n"},"comment":{"url":"https://api.github.com/repos/spotify/puppetexplorer/issues/comments/227436389","html_url":"https://github.com/spotify/puppetexplorer/issues/54#issuecomment-227436389","issue_url":"https://api.github.com/repos/spotify/puppetexplorer/issues/54","id":227436389,"user":{"login":"elofu17","id":6313897,"avatar_url":"https://avatars.githubusercontent.com/u/6313897?v=3","gravatar_id":"","url":"https://api.github.com/users/elofu17","html_url":"https://github.com/elofu17","followers_url":"https://api.github.com/users/elofu17/followers","following_url":"https://api.github.com/users/elofu17/following{/other_user}","gists_url":"https://api.github.com/users/elofu17/gists{/gist_id}","starred_url":"https://api.github.com/users/elofu17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elofu17/subscriptions","organizations_url":"https://api.github.com/users/elofu17/orgs","repos_url":"https://api.github.com/users/elofu17/repos","events_url":"https://api.github.com/users/elofu17/events{/privacy}","received_events_url":"https://api.github.com/users/elofu17/received_events","type":"User","site_admin":false},"created_at":"2016-06-21T13:18:05Z","updated_at":"2016-06-21T13:18:05Z","body":"Updated the text above a bit after https://github.com/dalen/node-puppetdbquery/issues/1 was updated."}}
{"actor":{"display_login":"elofu17"}}