{"id":129,"date":"2008-09-24T09:09:22","date_gmt":"2008-09-24T14:09:22","guid":{"rendered":"http:\/\/stein.everybody.org\/brain\/?p=129"},"modified":"2011-03-10T10:57:27","modified_gmt":"2011-03-10T15:57:27","slug":"cacti-portlet","status":"publish","type":"post","link":"https:\/\/jeremystein.com\/brain\/cacti-portlet\/","title":{"rendered":"Cacti portlet"},"content":{"rendered":"<p><a href=\"http:\/\/www.cacti.net\/\">Cacti<\/a> doesn&#8217;t like to be run as a portlet.  In order to get it to work with HP OpenView Dashboard, I had to modify include\/auth.php to add the following near the top of the file:<\/p>\n<pre>header(\"P3P: CP=\\\"IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA\\\"\");<\/pre>\n<p>And then I created an autologin page to support single sign-on integration:<\/p>\n<pre>&lt;?php\ninclude(\".\/include\/global.php\");\nheader(\"P3P: CP=\\\"IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA\\\"\");\nsetcookie(session_name(),\"\",time() - 3600,\"\/\");\n?&gt;\n&lt;html&gt;\n  &lt;body&gt;\n    &lt;form id=\"loginForm\" method=\"post\" action=\"\/index.php\"&gt;\n      &lt;input type=\"hidden\" name=\"login_username\" value=\"&lt;?php echo $_REQUEST[\"login_username\"]?&gt;\"&gt;\n      &lt;input type=\"hidden\" name=\"login_password\" value=\"&lt;?php echo $_REQUEST[\"login_password\"]?&gt;\"&gt;\n      &lt;input type=\"hidden\" name=\"action\" value=\"login\"&gt;\n    &lt;\/form&gt;\n    &lt;script type=\"text\/javascript\"&gt;\n      document.getElementById(\"loginForm\").submit();\n    &lt;\/script&gt;\n  &lt;\/body&gt;\n&lt;\/html&gt;<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Cacti doesn&#8217;t like to be run as a portlet. In order to get it to work with HP OpenView Dashboard, I had to modify include\/auth.php to add the following near the top of the file: header(&#8220;P3P: CP=\\&#8221;IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA\\&#8221;&#8221;); And then I created an autologin page to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-129","post","type-post","status-publish","format-standard","hentry","category-programming"],"_links":{"self":[{"href":"https:\/\/jeremystein.com\/brain\/wp-json\/wp\/v2\/posts\/129","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jeremystein.com\/brain\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jeremystein.com\/brain\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jeremystein.com\/brain\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jeremystein.com\/brain\/wp-json\/wp\/v2\/comments?post=129"}],"version-history":[{"count":0,"href":"https:\/\/jeremystein.com\/brain\/wp-json\/wp\/v2\/posts\/129\/revisions"}],"wp:attachment":[{"href":"https:\/\/jeremystein.com\/brain\/wp-json\/wp\/v2\/media?parent=129"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jeremystein.com\/brain\/wp-json\/wp\/v2\/categories?post=129"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jeremystein.com\/brain\/wp-json\/wp\/v2\/tags?post=129"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}