<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://coolscript.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Matthias</id>
	<title>Coolscript - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://coolscript.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Matthias"/>
	<link rel="alternate" type="text/html" href="https://coolscript.net/index.php/Special:Contributions/Matthias"/>
	<updated>2026-06-02T15:04:29Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.1</generator>
	<entry>
		<id>https://coolscript.net/index.php?title=I2Mobile&amp;diff=118</id>
		<title>I2Mobile</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=I2Mobile&amp;diff=118"/>
		<updated>2016-07-01T19:29:29Z</updated>

		<summary type="html">&lt;p&gt;Matthias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
i2Mobile (beta) is a lightweight web interface for Icinga2, designed for mobile clients, running on Apache, this is based on the API (Rest) interface of [https://www.icinga.org/ Icinga2].&amp;lt;br&amp;gt;&lt;br /&gt;
The aim of this is to have a simple, easy and fast client for mobile phones.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{|align=right&lt;br /&gt;
 |__TOC__&lt;br /&gt;
 |}&lt;br /&gt;
&#039;&#039;&#039;Features&#039;&#039;&#039;&lt;br /&gt;
*Use the Icinga2 API to retrieve the status - no more use of status.cgi (nagios/icinga1)&lt;br /&gt;
*Fast and bandwidth friendly (less data)&lt;br /&gt;
*Display hosts and services with the state of error, warning and ok&lt;br /&gt;
*Mobile silence&lt;br /&gt;
**Hide hosts and services whenever they have been acknowledged&lt;br /&gt;
**Hide hosts and services which state is unknown&lt;br /&gt;
**Hide host and services by custom attributes (optional)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Requirements=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* Linux, Apache and Perl&lt;br /&gt;
* Access to the already existing Icinga2 API Host&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Screenshots=&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;All hosts and services are running&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-allgood.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Warnings present&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvwarn.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Critical Errors&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvandhosterror.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Warnings and Crticals&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvandhostwarnanderror.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Service List&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvlist.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Service Detail&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvdetail.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Installation=&lt;br /&gt;
&#039;&#039;&#039;Note: The scripts has been tested on Debian 8 with Apache 2.4&#039;&#039;&#039;&lt;br /&gt;
*Get the tar file from the link below&lt;br /&gt;
*Copy the entire web directory to your www root, in this example /var/www/i2mobile&lt;br /&gt;
*Make your Apache user (eg www-data) owner of the new www directory and files&lt;br /&gt;
*Copy the configuration example to /etc/i2mobile.xml&lt;br /&gt;
*Copy the web config template to /etc/apache2/sites-available/i2mobile.domain.com.conf&lt;br /&gt;
**Configure and rename the web config to your requriements&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*Setup Apache, enable the web site and switch on the cgi module, example:&lt;br /&gt;
 a2ensite i2mobile.domain.com&lt;br /&gt;
 a2enmod cgi&lt;br /&gt;
&lt;br /&gt;
*Install the required perl modules using MCPAN:&lt;br /&gt;
 # perl -MCPAN -e &#039;install REST::Client&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install JSON&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install MIME::Base64&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install Data::Dumper&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install Data::GUID&#039;&lt;br /&gt;
&lt;br /&gt;
=Configure i2Mobile=&lt;br /&gt;
Configuration is done in /etc/i2mobile.xml. These are the minimum settings:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;IcingaHost=&#039;&#039;&#039;URL and Port to the Icinga2 Host&lt;br /&gt;
*&#039;&#039;&#039;Password=&#039;&#039;&#039;The password&lt;br /&gt;
*&#039;&#039;&#039;CookieAuthentication=&#039;&#039;&#039;Optional authentication using a session cookie&lt;br /&gt;
*&#039;&#039;&#039;Contact=&#039;&#039;&#039;Optional contact information&lt;br /&gt;
*&#039;&#039;&#039;URL=&#039;&#039;&#039;=Optional Site URL&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;CONFIG&amp;gt;&lt;br /&gt;
  &amp;lt;System &lt;br /&gt;
   IcingaHost=&amp;quot;https://your.ip.here:5665&amp;quot; &lt;br /&gt;
   Password=&amp;quot;user:123456789&amp;quot; &lt;br /&gt;
   CookieAuthentication=&amp;quot;0&amp;quot; &lt;br /&gt;
   Contact=&amp;quot;you@domain.com&amp;quot; &lt;br /&gt;
   URL=&amp;quot;http://i2mobile.domain.com&amp;quot;&amp;gt;&amp;lt;/System&amp;gt;&lt;br /&gt;
 &amp;lt;/CONFIG&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Thats it, setup is finsihed.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Display options=&lt;br /&gt;
Services and hosts can be hided in i2Mobile, the idea is to show only important information and hide services and hosts which are not interested for the mobile user&lt;br /&gt;
*Service sample&lt;br /&gt;
 apply Service &amp;quot;Something&amp;quot; {&lt;br /&gt;
  ...&lt;br /&gt;
  //this will hide the service from i2Mobile&lt;br /&gt;
  vars.is_ignore = &amp;quot;1&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
*Host sample&lt;br /&gt;
 apply Host &amp;quot;Something&amp;quot; {&lt;br /&gt;
  ...&lt;br /&gt;
  //this will hide the host from i2Mobile&lt;br /&gt;
  vars.is_ignore = &amp;quot;1&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=Authentication options=&lt;br /&gt;
Authentication can be established using the Apache htaccess options, however, there is the alternative option to work with session cookies which is &#039;&#039;&#039;less secure&#039;&#039;&#039; but&amp;lt;br&amp;gt;&lt;br /&gt;
allows the i2Mobile user to access the web quickly without prompting for authentication.&amp;lt;br&amp;gt;&lt;br /&gt;
The idea of session cookies is to create a GUID and then keep them local in i2mobile.xml and use it as reference for each web user.&amp;lt;br&amp;gt;&lt;br /&gt;
A helper page is available to add the session cookie to the client mobile browser, the mobile client should then receive a email or sms including the link to add the session cookie.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Sample&#039;&#039;&#039;&lt;br /&gt;
*CookieID=&amp;quot;aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&amp;quot;&lt;br /&gt;
*Link to add the session cookie to the client browser:&lt;br /&gt;
**http://i2mobile.domain.com/setsessioncookie.pl?id=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&lt;br /&gt;
**Client can now access the page without additional authentication&lt;br /&gt;
&#039;&#039;&#039;Full configuration sample&#039;&#039;&#039;&lt;br /&gt;
*i2mobile.xml&lt;br /&gt;
 &amp;lt;Authentication &lt;br /&gt;
  Enabled=&amp;quot;1&amp;quot; &lt;br /&gt;
  CookieID=&amp;quot;aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&amp;quot; &lt;br /&gt;
  Name=&amp;quot;John Public&amp;quot; &lt;br /&gt;
  MailTo=&amp;quot;jp@domain.com&amp;quot; &lt;br /&gt;
  Expire=&amp;quot;20180701&amp;quot;&lt;br /&gt;
 &amp;lt;/Authentication&amp;gt;&lt;br /&gt;
From the above sample it is possible to immediate disable the web access by setting Enabled to 0 or set the Expire to yesterday.&amp;lt;br&amp;gt;&lt;br /&gt;
You may also use a small helper tool called addsc.pl which is available within the web directory, this tool creates the GUID and Link for the mobile client.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Debugging&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
See the status page which is available to obtain the validly of the session cookie&lt;br /&gt;
*http://i2mobile.domain.com/env.pl&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 70%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:30%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Download the script&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Version 1.0 - 16KB&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Download.png|60px|link=http://coolscript.org/download/i2mobile.1.0.tar.gz|Download]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|style=&amp;quot;width:70%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;hr&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Feedbacks or comments are very welcome, no matter which direction. Please drop a email to postmaster at coolscript.org&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=I2Mobile&amp;diff=117</id>
		<title>I2Mobile</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=I2Mobile&amp;diff=117"/>
		<updated>2016-07-01T19:28:58Z</updated>

		<summary type="html">&lt;p&gt;Matthias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
i2Mobile (beta) is a lightweight web interface for Icinga2, designed for mobile clients, running on Apache, this is based on the API (Rest) interface of [https://www.icinga.org/ Icinga2].&amp;lt;br&amp;gt;&lt;br /&gt;
The aim of this is to have a simple, easy and fast client for mobile phones.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{|align=right&lt;br /&gt;
 |__TOC__&lt;br /&gt;
 |}&lt;br /&gt;
&#039;&#039;&#039;Features&#039;&#039;&#039;&lt;br /&gt;
*Use the Icinga2 API to retrieve the status - no more (nagios/icinga) status.cgi &lt;br /&gt;
*Fast and bandwidth friendly (less data)&lt;br /&gt;
*Display hosts and services with the state of error, warning and ok&lt;br /&gt;
*Mobile silence&lt;br /&gt;
**Hide hosts and services whenever they have been acknowledged&lt;br /&gt;
**Hide hosts and services which state is unknown&lt;br /&gt;
**Hide host and services by custom attributes (optional)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Requirements=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* Linux, Apache and Perl&lt;br /&gt;
* Access to the already existing Icinga2 API Host&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Screenshots=&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;All hosts and services are running&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-allgood.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Warnings present&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvwarn.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Critical Errors&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvandhosterror.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Warnings and Crticals&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvandhostwarnanderror.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Service List&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvlist.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Service Detail&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvdetail.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Installation=&lt;br /&gt;
&#039;&#039;&#039;Note: The scripts has been tested on Debian 8 with Apache 2.4&#039;&#039;&#039;&lt;br /&gt;
*Get the tar file from the link below&lt;br /&gt;
*Copy the entire web directory to your www root, in this example /var/www/i2mobile&lt;br /&gt;
*Make your Apache user (eg www-data) owner of the new www directory and files&lt;br /&gt;
*Copy the configuration example to /etc/i2mobile.xml&lt;br /&gt;
*Copy the web config template to /etc/apache2/sites-available/i2mobile.domain.com.conf&lt;br /&gt;
**Configure and rename the web config to your requriements&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*Setup Apache, enable the web site and switch on the cgi module, example:&lt;br /&gt;
 a2ensite i2mobile.domain.com&lt;br /&gt;
 a2enmod cgi&lt;br /&gt;
&lt;br /&gt;
*Install the required perl modules using MCPAN:&lt;br /&gt;
 # perl -MCPAN -e &#039;install REST::Client&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install JSON&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install MIME::Base64&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install Data::Dumper&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install Data::GUID&#039;&lt;br /&gt;
&lt;br /&gt;
=Configure i2Mobile=&lt;br /&gt;
Configuration is done in /etc/i2mobile.xml. These are the minimum settings:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;IcingaHost=&#039;&#039;&#039;URL and Port to the Icinga2 Host&lt;br /&gt;
*&#039;&#039;&#039;Password=&#039;&#039;&#039;The password&lt;br /&gt;
*&#039;&#039;&#039;CookieAuthentication=&#039;&#039;&#039;Optional authentication using a session cookie&lt;br /&gt;
*&#039;&#039;&#039;Contact=&#039;&#039;&#039;Optional contact information&lt;br /&gt;
*&#039;&#039;&#039;URL=&#039;&#039;&#039;=Optional Site URL&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;CONFIG&amp;gt;&lt;br /&gt;
  &amp;lt;System &lt;br /&gt;
   IcingaHost=&amp;quot;https://your.ip.here:5665&amp;quot; &lt;br /&gt;
   Password=&amp;quot;user:123456789&amp;quot; &lt;br /&gt;
   CookieAuthentication=&amp;quot;0&amp;quot; &lt;br /&gt;
   Contact=&amp;quot;you@domain.com&amp;quot; &lt;br /&gt;
   URL=&amp;quot;http://i2mobile.domain.com&amp;quot;&amp;gt;&amp;lt;/System&amp;gt;&lt;br /&gt;
 &amp;lt;/CONFIG&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Thats it, setup is finsihed.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Display options=&lt;br /&gt;
Services and hosts can be hided in i2Mobile, the idea is to show only important information and hide services and hosts which are not interested for the mobile user&lt;br /&gt;
*Service sample&lt;br /&gt;
 apply Service &amp;quot;Something&amp;quot; {&lt;br /&gt;
  ...&lt;br /&gt;
  //this will hide the service from i2Mobile&lt;br /&gt;
  vars.is_ignore = &amp;quot;1&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
*Host sample&lt;br /&gt;
 apply Host &amp;quot;Something&amp;quot; {&lt;br /&gt;
  ...&lt;br /&gt;
  //this will hide the host from i2Mobile&lt;br /&gt;
  vars.is_ignore = &amp;quot;1&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=Authentication options=&lt;br /&gt;
Authentication can be established using the Apache htaccess options, however, there is the alternative option to work with session cookies which is &#039;&#039;&#039;less secure&#039;&#039;&#039; but&amp;lt;br&amp;gt;&lt;br /&gt;
allows the i2Mobile user to access the web quickly without prompting for authentication.&amp;lt;br&amp;gt;&lt;br /&gt;
The idea of session cookies is to create a GUID and then keep them local in i2mobile.xml and use it as reference for each web user.&amp;lt;br&amp;gt;&lt;br /&gt;
A helper page is available to add the session cookie to the client mobile browser, the mobile client should then receive a email or sms including the link to add the session cookie.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Sample&#039;&#039;&#039;&lt;br /&gt;
*CookieID=&amp;quot;aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&amp;quot;&lt;br /&gt;
*Link to add the session cookie to the client browser:&lt;br /&gt;
**http://i2mobile.domain.com/setsessioncookie.pl?id=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&lt;br /&gt;
**Client can now access the page without additional authentication&lt;br /&gt;
&#039;&#039;&#039;Full configuration sample&#039;&#039;&#039;&lt;br /&gt;
*i2mobile.xml&lt;br /&gt;
 &amp;lt;Authentication &lt;br /&gt;
  Enabled=&amp;quot;1&amp;quot; &lt;br /&gt;
  CookieID=&amp;quot;aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&amp;quot; &lt;br /&gt;
  Name=&amp;quot;John Public&amp;quot; &lt;br /&gt;
  MailTo=&amp;quot;jp@domain.com&amp;quot; &lt;br /&gt;
  Expire=&amp;quot;20180701&amp;quot;&lt;br /&gt;
 &amp;lt;/Authentication&amp;gt;&lt;br /&gt;
From the above sample it is possible to immediate disable the web access by setting Enabled to 0 or set the Expire to yesterday.&amp;lt;br&amp;gt;&lt;br /&gt;
You may also use a small helper tool called addsc.pl which is available within the web directory, this tool creates the GUID and Link for the mobile client.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Debugging&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
See the status page which is available to obtain the validly of the session cookie&lt;br /&gt;
*http://i2mobile.domain.com/env.pl&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 70%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:30%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Download the script&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Version 1.0 - 16KB&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Download.png|60px|link=http://coolscript.org/download/i2mobile.1.0.tar.gz|Download]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|style=&amp;quot;width:70%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;hr&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Feedbacks or comments are very welcome, no matter which direction. Please drop a email to postmaster at coolscript.org&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=I2Mobile&amp;diff=116</id>
		<title>I2Mobile</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=I2Mobile&amp;diff=116"/>
		<updated>2016-07-01T19:24:10Z</updated>

		<summary type="html">&lt;p&gt;Matthias: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
i2Mobile (beta) is a lightweight web interface for Icinga2, designed for mobile clients, running on Apache, this is based on the API (Rest) interface of [https://www.icinga.org/ Icinga2].&amp;lt;br&amp;gt;&lt;br /&gt;
The aim of this is to have a simple, easy and fast client for mobile phones.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{|align=right&lt;br /&gt;
 |__TOC__&lt;br /&gt;
 |}&lt;br /&gt;
&#039;&#039;&#039;Features&#039;&#039;&#039;&lt;br /&gt;
*Use the Icinga2 API to retrieve the status - no more status.cgi&lt;br /&gt;
*Fast and bandwidth friendly (less data)&lt;br /&gt;
*Display hosts and services with the state of error, warning and ok&lt;br /&gt;
*Mobile silence&lt;br /&gt;
**Hide hosts and services whenever they have been acknowledged&lt;br /&gt;
**Hide hosts and services which state is unknown&lt;br /&gt;
**Hide host and services by custom attributes (optional)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Requirements=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* Linux, Apache and Perl&lt;br /&gt;
* Access to the already existing Icinga2 API Host&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Screenshots=&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;All hosts and services are running&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-allgood.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Warnings present&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvwarn.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Critical Errors&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvandhosterror.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Warnings and Crticals&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvandhostwarnanderror.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Service List&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvlist.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Service Detail&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvdetail.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Installation=&lt;br /&gt;
&#039;&#039;&#039;Note: The scripts has been tested on Debian 8 with Apache 2.4&#039;&#039;&#039;&lt;br /&gt;
*Get the tar file from the link below&lt;br /&gt;
*Copy the entire web directory to your www root, in this example /var/www/i2mobile&lt;br /&gt;
*Make your Apache user (eg www-data) owner of the new www directory and files&lt;br /&gt;
*Copy the configuration example to /etc/i2mobile.xml&lt;br /&gt;
*Copy the web config template to /etc/apache2/sites-available/i2mobile.domain.com.conf&lt;br /&gt;
**Configure and rename the web config to your requriements&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*Setup Apache, enable the web site and switch on the cgi module, example:&lt;br /&gt;
 a2ensite i2mobile.domain.com&lt;br /&gt;
 a2enmod cgi&lt;br /&gt;
&lt;br /&gt;
*Install the required perl modules using MCPAN:&lt;br /&gt;
 # perl -MCPAN -e &#039;install REST::Client&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install JSON&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install MIME::Base64&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install Data::Dumper&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install Data::GUID&#039;&lt;br /&gt;
&lt;br /&gt;
=Configure i2Mobile=&lt;br /&gt;
Configuration is done in /etc/i2mobile.xml. These are the minimum settings:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;IcingaHost=&#039;&#039;&#039;URL and Port to the Icinga2 Host&lt;br /&gt;
*&#039;&#039;&#039;Password=&#039;&#039;&#039;The password&lt;br /&gt;
*&#039;&#039;&#039;CookieAuthentication=&#039;&#039;&#039;Optional authentication using a session cookie&lt;br /&gt;
*&#039;&#039;&#039;Contact=&#039;&#039;&#039;Optional contact information&lt;br /&gt;
*&#039;&#039;&#039;URL=&#039;&#039;&#039;=Optional Site URL&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;CONFIG&amp;gt;&lt;br /&gt;
  &amp;lt;System &lt;br /&gt;
   IcingaHost=&amp;quot;https://your.ip.here:5665&amp;quot; &lt;br /&gt;
   Password=&amp;quot;user:123456789&amp;quot; &lt;br /&gt;
   CookieAuthentication=&amp;quot;0&amp;quot; &lt;br /&gt;
   Contact=&amp;quot;you@domain.com&amp;quot; &lt;br /&gt;
   URL=&amp;quot;http://i2mobile.domain.com&amp;quot;&amp;gt;&amp;lt;/System&amp;gt;&lt;br /&gt;
 &amp;lt;/CONFIG&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Thats it, setup is finsihed.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Display options=&lt;br /&gt;
Services and hosts can be hided in i2Mobile, the idea is to show only important information and hide services and hosts which are not interested for the mobile user&lt;br /&gt;
*Service sample&lt;br /&gt;
 apply Service &amp;quot;Something&amp;quot; {&lt;br /&gt;
  ...&lt;br /&gt;
  //this will hide the service from i2Mobile&lt;br /&gt;
  vars.is_ignore = &amp;quot;1&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
*Host sample&lt;br /&gt;
 apply Host &amp;quot;Something&amp;quot; {&lt;br /&gt;
  ...&lt;br /&gt;
  //this will hide the host from i2Mobile&lt;br /&gt;
  vars.is_ignore = &amp;quot;1&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=Authentication options=&lt;br /&gt;
Authentication can be established using the Apache htaccess options, however, there is the alternative option to work with session cookies which is &#039;&#039;&#039;less secure&#039;&#039;&#039; but&amp;lt;br&amp;gt;&lt;br /&gt;
allows the i2Mobile user to access the web quickly without prompting for authentication.&amp;lt;br&amp;gt;&lt;br /&gt;
The idea of session cookies is to create a GUID and then keep them local in i2mobile.xml and use it as reference for each web user.&amp;lt;br&amp;gt;&lt;br /&gt;
A helper page is available to add the session cookie to the client mobile browser, the mobile client should then receive a email or sms including the link to add the session cookie.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Sample&#039;&#039;&#039;&lt;br /&gt;
*CookieID=&amp;quot;aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&amp;quot;&lt;br /&gt;
*Link to add the session cookie to the client browser:&lt;br /&gt;
**http://i2mobile.domain.com/setsessioncookie.pl?id=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&lt;br /&gt;
**Client can now access the page without additional authentication&lt;br /&gt;
&#039;&#039;&#039;Full configuration sample&#039;&#039;&#039;&lt;br /&gt;
*i2mobile.xml&lt;br /&gt;
 &amp;lt;Authentication &lt;br /&gt;
  Enabled=&amp;quot;1&amp;quot; &lt;br /&gt;
  CookieID=&amp;quot;aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&amp;quot; &lt;br /&gt;
  Name=&amp;quot;John Public&amp;quot; &lt;br /&gt;
  MailTo=&amp;quot;jp@domain.com&amp;quot; &lt;br /&gt;
  Expire=&amp;quot;20180701&amp;quot;&lt;br /&gt;
 &amp;lt;/Authentication&amp;gt;&lt;br /&gt;
From the above sample it is possible to immediate disable the web access by setting Enabled to 0 or set the Expire to yesterday.&amp;lt;br&amp;gt;&lt;br /&gt;
You may also use a small helper tool called addsc.pl which is available within the web directory, this tool creates the GUID and Link for the mobile client.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Debugging&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
See the status page which is available to obtain the validly of the session cookie&lt;br /&gt;
*http://i2mobile.domain.com/env.pl&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 70%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:30%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Download the script&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Version 1.0 - 16KB&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Download.png|60px|link=http://coolscript.org/download/i2mobile.1.0.tar.gz|Download]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|style=&amp;quot;width:70%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;hr&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Feedbacks or comments are very welcome, no matter which direction. Please drop a email to postmaster at coolscript.org&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=I2Mobile&amp;diff=115</id>
		<title>I2Mobile</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=I2Mobile&amp;diff=115"/>
		<updated>2016-06-30T19:38:21Z</updated>

		<summary type="html">&lt;p&gt;Matthias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
i2Mobile (beta) is a lightweight web interface for Icinga2, designed for mobile clients, running on Apache, this is based on the API (Rest) interface of [https://www.icinga.org/ Icinga2].&amp;lt;br&amp;gt;&lt;br /&gt;
The aim of this is to have a simple, easy and fast client for mobile phones.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{|align=right&lt;br /&gt;
 |__TOC__&lt;br /&gt;
 |}&lt;br /&gt;
&#039;&#039;&#039;Features&#039;&#039;&#039;&lt;br /&gt;
*Use the Icinga2 API to retrieve the status - no more status.cgi&lt;br /&gt;
*Fast and bandwidth friendly (less data)&lt;br /&gt;
*Display hosts and services with the state of error, warning and ok&lt;br /&gt;
*Mobile silence&lt;br /&gt;
**Hide hosts and services whenever they have been acknowledged&lt;br /&gt;
**Hide hosts and services which state is unknown&lt;br /&gt;
**Hide host and services by custom attributes (optional)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Requirements=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* Linux, Apache and Perl&lt;br /&gt;
* Access to the already existing Icinga2 API Host&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Screenshots=&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;All hosts and services are running&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-allgood.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Warnings present&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvwarn.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Critical Errors&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvandhosterror.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Warnings and Crticals&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvandhostwarnanderror.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Service List&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvlist.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Service Detail&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvdetail.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Installation=&lt;br /&gt;
&#039;&#039;&#039;Note: The scripts has been tested on Debian 8 with Apache 2.4&#039;&#039;&#039;&lt;br /&gt;
*Get the tar file from the link below&lt;br /&gt;
*Unextract&lt;br /&gt;
*Copy the entire web directory to your www root, in this example /var/www/i2mobile&lt;br /&gt;
*Make your Apache user (eg www-data) owner of the new www directory and files&lt;br /&gt;
*Copy the configuration example to /etc/i2mobile.xml&lt;br /&gt;
*Copy the web config template to /etc/apache2/sites-available/i2mobile.domain.com.conf&lt;br /&gt;
**Configure and rename the web config to your requriements&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*Setup Apache, enable the web site and switch on the cgi module, example:&lt;br /&gt;
 a2ensite i2mobile.domain.com&lt;br /&gt;
 a2enmod cgi&lt;br /&gt;
&lt;br /&gt;
*Install the required perl modules using MCPAN:&lt;br /&gt;
 # perl -MCPAN -e &#039;install REST::Client&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install JSON&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install MIME::Base64&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install Data::Dumper&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install Data::GUID&#039;&lt;br /&gt;
&lt;br /&gt;
=Configure i2Mobile=&lt;br /&gt;
Configuration is done in /etc/i2mobile.xml. These are the minimum settings:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;IcingaHost=&#039;&#039;&#039;URL and Port to the Icinga2 Host&lt;br /&gt;
*&#039;&#039;&#039;Password=&#039;&#039;&#039;The password&lt;br /&gt;
*&#039;&#039;&#039;CookieAuthentication=&#039;&#039;&#039;Optional authentication using a session cookie&lt;br /&gt;
*&#039;&#039;&#039;Contact=&#039;&#039;&#039;Optional contact information&lt;br /&gt;
*&#039;&#039;&#039;URL=&#039;&#039;&#039;=Optional Site URL&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;CONFIG&amp;gt;&lt;br /&gt;
  &amp;lt;System &lt;br /&gt;
   IcingaHost=&amp;quot;https://your.ip.here:5665&amp;quot; &lt;br /&gt;
   Password=&amp;quot;user:123456789&amp;quot; &lt;br /&gt;
   CookieAuthentication=&amp;quot;0&amp;quot; &lt;br /&gt;
   Contact=&amp;quot;you@domain.com&amp;quot; &lt;br /&gt;
   URL=&amp;quot;http://i2mobile.domain.com&amp;quot;&amp;gt;&amp;lt;/System&amp;gt;&lt;br /&gt;
 &amp;lt;/CONFIG&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Thats it, setup is finsihed.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Display options=&lt;br /&gt;
Services and hosts can be hided in i2Mobile, the idea is to show only important information and hide services and hosts which are not interested for the mobile user&lt;br /&gt;
*Service sample&lt;br /&gt;
 apply Service &amp;quot;Something&amp;quot; {&lt;br /&gt;
  ...&lt;br /&gt;
  //this will hide the service from i2Mobile&lt;br /&gt;
  vars.is_ignore = &amp;quot;1&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
*Host sample&lt;br /&gt;
 apply Host &amp;quot;Something&amp;quot; {&lt;br /&gt;
  ...&lt;br /&gt;
  //this will hide the host from i2Mobile&lt;br /&gt;
  vars.is_ignore = &amp;quot;1&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=Authentication options=&lt;br /&gt;
Authentication can be established using the Apache htaccess options, however, there is the alternative option to work with session cookies which is &#039;&#039;&#039;less secure&#039;&#039;&#039; but&amp;lt;br&amp;gt;&lt;br /&gt;
allows the i2Mobile user to access the web quickly without prompting for authentication.&amp;lt;br&amp;gt;&lt;br /&gt;
The idea of session cookies is to create a GUID and then keep them local in i2mobile.xml and use it as reference for each web user.&amp;lt;br&amp;gt;&lt;br /&gt;
A helper page is available to add the session cookie to the client mobile browser, the mobile client should then receive a email or sms including the link to add the session cookie.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Sample&#039;&#039;&#039;&lt;br /&gt;
*CookieID=&amp;quot;aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&amp;quot;&lt;br /&gt;
*Link to add the session cookie to the client browser:&lt;br /&gt;
**http://i2mobile.domain.com/setsessioncookie.pl?id=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&lt;br /&gt;
**Client can now access the page without additional authentication&lt;br /&gt;
&#039;&#039;&#039;Full configuration sample&#039;&#039;&#039;&lt;br /&gt;
*i2mobile.xml&lt;br /&gt;
 &amp;lt;Authentication &lt;br /&gt;
  Enabled=&amp;quot;1&amp;quot; &lt;br /&gt;
  CookieID=&amp;quot;aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&amp;quot; &lt;br /&gt;
  Name=&amp;quot;John Public&amp;quot; &lt;br /&gt;
  MailTo=&amp;quot;jp@domain.com&amp;quot; &lt;br /&gt;
  Expire=&amp;quot;20180701&amp;quot;&lt;br /&gt;
 &amp;lt;/Authentication&amp;gt;&lt;br /&gt;
From the above sample it is possible to immediate disable the web access by setting Enabled to 0 or set the Expire to yesterday.&amp;lt;br&amp;gt;&lt;br /&gt;
You may also use a small helper tool called addsc.pl which is available within the web directory, this tool creates the GUID and Link for the mobile client.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Debugging&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
See the status page which is available to obtain the validly of the session cookie&lt;br /&gt;
*http://i2mobile.domain.com/env.pl&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 70%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:30%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Download the script&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Version 1.0 - 16KB&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Download.png|60px|link=http://coolscript.org/download/i2mobile.1.0.tar.gz|Download]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|style=&amp;quot;width:70%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;hr&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Feedbacks or comments are very welcome, no matter which direction. Please drop a email to postmaster at coolscript.org&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=I2Mobile&amp;diff=114</id>
		<title>I2Mobile</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=I2Mobile&amp;diff=114"/>
		<updated>2016-06-30T19:36:01Z</updated>

		<summary type="html">&lt;p&gt;Matthias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
i2Mobile (beta) is a lightweight web interface for Icinga2, designed for mobile clients, running on Apache, this is based on the API (Rest) interface of [https://www.icinga.org/ Icinga2].&amp;lt;br&amp;gt;&lt;br /&gt;
The aim of this is to have a simple, easy and fast client for mobile phones.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{|align=right&lt;br /&gt;
 |__TOC__&lt;br /&gt;
 |}&lt;br /&gt;
&#039;&#039;&#039;Features&#039;&#039;&#039;&lt;br /&gt;
*Use the Icinga2 API to retrieve the status - no more status.cgi&lt;br /&gt;
*Fast and bandwidth friendly (less data)&lt;br /&gt;
*Display hosts and services with the state of error, warning and ok&lt;br /&gt;
*Mobile silence&lt;br /&gt;
**Hide hosts and services whenever they have been acknowledged&lt;br /&gt;
**Hide hosts and services which state is unknown&lt;br /&gt;
**Hide host and services by custom attributes (optional)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Requirements=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* Linux, Apache and Perl&lt;br /&gt;
* Access to the already existing Icinga2 API Host&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Screenshots=&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;All hosts and services are running&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-allgood.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Warnings present&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvwarn.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Critical Errors&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvandhosterror.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Warnings and Crticals&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvandhostwarnanderror.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Service List&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvlist.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Service Detail&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvdetail.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Installation=&lt;br /&gt;
&#039;&#039;&#039;Note: The scripts has been tested on Debian 8 with Apache 2.4&#039;&#039;&#039;&lt;br /&gt;
*Get the tar file from the link below&lt;br /&gt;
*Unextract&lt;br /&gt;
*Copy the entire web directory to your www root, in this example /var/www/i2mobile&lt;br /&gt;
*Make your Apache user (eg www-data) owner of the new www directory and files&lt;br /&gt;
*Copy the configuration example to /etc/i2mobile.xml&lt;br /&gt;
*Copy the web config template to /etc/apache2/sites-available/i2mobile.domain.com.conf&lt;br /&gt;
**Configure and rename the web config to your requriements&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*Setup Apache, enable the web site and switch on the cgi module, example:&lt;br /&gt;
 a2ensite i2mobile.domain.com&lt;br /&gt;
 a2enmod cgi&lt;br /&gt;
&lt;br /&gt;
*Install the required perl modules using MCPAN:&lt;br /&gt;
 # perl -MCPAN -e &#039;install REST::Client&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install JSON&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install MIME::Base64&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install Data::Dumper&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install Data::GUID&#039;&lt;br /&gt;
&lt;br /&gt;
=Configure i2Mobile=&lt;br /&gt;
Configuration is done in /etc/i2mobile.xml. These are the minimum settings:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;IcingaHost=&#039;&#039;&#039;URL and Port to the Icinga2 Host&lt;br /&gt;
*&#039;&#039;&#039;Password=&#039;&#039;&#039;The password&lt;br /&gt;
*&#039;&#039;&#039;CookieAuthentication=&#039;&#039;&#039;Optional authentication using a session cookie&lt;br /&gt;
*&#039;&#039;&#039;Contact=&#039;&#039;&#039;Optional contact information&lt;br /&gt;
*&#039;&#039;&#039;URL=&#039;&#039;&#039;=Optional Site URL&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;CONFIG&amp;gt;&lt;br /&gt;
  &amp;lt;System &lt;br /&gt;
   IcingaHost=&amp;quot;https://your.ip.here:5665&amp;quot; &lt;br /&gt;
   Password=&amp;quot;user:123456789&amp;quot; &lt;br /&gt;
   CookieAuthentication=&amp;quot;0&amp;quot; &lt;br /&gt;
   Contact=&amp;quot;you@domain.com&amp;quot; &lt;br /&gt;
   URL=&amp;quot;http://i2mobile.domain.com&amp;quot;&amp;gt;&amp;lt;/System&amp;gt;&lt;br /&gt;
 &amp;lt;/CONFIG&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Thats it, setup is finsihed.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Display options=&lt;br /&gt;
Services and hosts can be hided in i2Mobile, the idea is to show only important information and hide services and hosts which are not interested for the mobile user&lt;br /&gt;
*Service sample&lt;br /&gt;
 apply Service &amp;quot;Something&amp;quot; {&lt;br /&gt;
  ...&lt;br /&gt;
  //this will hide the service from i2Mobile&lt;br /&gt;
  vars.is_ignore = &amp;quot;1&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
*Host sample&lt;br /&gt;
 apply Host &amp;quot;Something&amp;quot; {&lt;br /&gt;
  ...&lt;br /&gt;
  //this will hide the host from i2Mobile&lt;br /&gt;
  vars.is_ignore = &amp;quot;1&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=Authentication options=&lt;br /&gt;
Authentication can be established using the Apache htaccess options, however, there is the alternative option to work with session cookies which is &#039;&#039;&#039;less secure&#039;&#039;&#039; but&amp;lt;br&amp;gt;&lt;br /&gt;
allows the i2Mobile user to access the web quickly without prompting for authentication.&amp;lt;br&amp;gt;&lt;br /&gt;
The idea of session cookies is to create a GUID and then keep it local in i2mobile.xml to use as reference for each web user.&amp;lt;br&amp;gt;&lt;br /&gt;
A helper page is available to add the session cookie to the client mobile browser, the mobile client should then receive a email or sms including the link to add the session cookie.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Sample&#039;&#039;&#039;&lt;br /&gt;
*CookieID=&amp;quot;aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&amp;quot;&lt;br /&gt;
*Link to add the session cookie to the client browser:&lt;br /&gt;
**http://i2mobile.domain.com/setsessioncookie.pl?id=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&lt;br /&gt;
**Client can now access the page without additional authentication&lt;br /&gt;
&#039;&#039;&#039;Full configuration sample&#039;&#039;&#039;&lt;br /&gt;
*i2mobile.xml&lt;br /&gt;
 &amp;lt;Authentication &lt;br /&gt;
  Enabled=&amp;quot;1&amp;quot; &lt;br /&gt;
  CookieID=&amp;quot;aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&amp;quot; &lt;br /&gt;
  Name=&amp;quot;John Public&amp;quot; &lt;br /&gt;
  MailTo=&amp;quot;jp@domain.com&amp;quot; &lt;br /&gt;
  Expire=&amp;quot;20180701&amp;quot;&lt;br /&gt;
 &amp;lt;/Authentication&amp;gt;&lt;br /&gt;
From the above sample it is possible to immediate disable the web access by setting Enabled to 0 or set the Expire to yesterday.&amp;lt;br&amp;gt;&lt;br /&gt;
You may also use a small helper tool called addsc.pl which is available within the web directory, this tool creates the GUID and Link for the mobile client.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Debugging&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
See the status page which is available to obtain the validly of the session cookie&lt;br /&gt;
*http://i2mobile.domain.com/env.pl&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 70%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:30%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Download the script&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Version 1.0 - 16KB&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Download.png|60px|link=http://coolscript.org/download/i2mobile.1.0.tar.gz|Download]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|style=&amp;quot;width:70%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;hr&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Feedbacks or comments are very welcome, no matter which direction. Please drop a email to postmaster at coolscript.org&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=I2Mobile&amp;diff=113</id>
		<title>I2Mobile</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=I2Mobile&amp;diff=113"/>
		<updated>2016-06-30T19:33:17Z</updated>

		<summary type="html">&lt;p&gt;Matthias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
i2Mobile (beta) is a lightweight web interface for Icinga2, designed for mobile clients, running on Apache, it is based on the API (Rest) interface of [https://www.icinga.org/ Icinga2].&amp;lt;br&amp;gt;&lt;br /&gt;
The aim of this is to have a simple, easy and fast client for mobile phones.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{|align=right&lt;br /&gt;
 |__TOC__&lt;br /&gt;
 |}&lt;br /&gt;
&#039;&#039;&#039;Features&#039;&#039;&#039;&lt;br /&gt;
*Use the Icinga2 API to retrieve the status - no more status.cgi&lt;br /&gt;
*Fast and bandwidth friendly (less data)&lt;br /&gt;
*Display hosts and services with the state of error, warning and ok&lt;br /&gt;
*Mobile silence&lt;br /&gt;
**Hide hosts and services whenever they have been acknowledged&lt;br /&gt;
**Hide hosts and services which state is unknown&lt;br /&gt;
**Hide host and services by custom attributes (optional)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Requirements=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* Linux, Apache and Perl&lt;br /&gt;
* Access to the already existing Icinga2 API Host&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Screenshots=&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;All hosts and services are running&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-allgood.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Warnings present&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvwarn.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Critical Errors&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvandhosterror.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Warnings and Crticals&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvandhostwarnanderror.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Service List&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvlist.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Service Detail&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvdetail.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Installation=&lt;br /&gt;
&#039;&#039;&#039;Note: The scripts has been tested on Debian 8 with Apache 2.4&#039;&#039;&#039;&lt;br /&gt;
*Get the tar file from the link below&lt;br /&gt;
*Unextract&lt;br /&gt;
*Copy the entire web directory to your www root, in this example /var/www/i2mobile&lt;br /&gt;
*Make your Apache user (eg www-data) owner of the new www directory and files&lt;br /&gt;
*Copy the configuration example to /etc/i2mobile.xml&lt;br /&gt;
*Copy the web config template to /etc/apache2/sites-available/i2mobile.domain.com.conf&lt;br /&gt;
**Configure and rename the web config to your requriements&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*Setup Apache, enable the web site and switch on the cgi module, example:&lt;br /&gt;
 a2ensite i2mobile.domain.com&lt;br /&gt;
 a2enmod cgi&lt;br /&gt;
&lt;br /&gt;
*Install the required perl modules using MCPAN:&lt;br /&gt;
 # perl -MCPAN -e &#039;install REST::Client&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install JSON&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install MIME::Base64&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install Data::Dumper&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install Data::GUID&#039;&lt;br /&gt;
&lt;br /&gt;
=Configure i2Mobile=&lt;br /&gt;
Configuration is done in /etc/i2mobile.xml. These are the minimum settings:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;IcingaHost=&#039;&#039;&#039;URL and Port to the Icinga2 Host&lt;br /&gt;
*&#039;&#039;&#039;Password=&#039;&#039;&#039;The password&lt;br /&gt;
*&#039;&#039;&#039;CookieAuthentication=&#039;&#039;&#039;Optional authentication using a session cookie&lt;br /&gt;
*&#039;&#039;&#039;Contact=&#039;&#039;&#039;Optional contact information&lt;br /&gt;
*&#039;&#039;&#039;URL=&#039;&#039;&#039;=Optional Site URL&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;CONFIG&amp;gt;&lt;br /&gt;
  &amp;lt;System &lt;br /&gt;
   IcingaHost=&amp;quot;https://your.ip.here:5665&amp;quot; &lt;br /&gt;
   Password=&amp;quot;user:123456789&amp;quot; &lt;br /&gt;
   CookieAuthentication=&amp;quot;0&amp;quot; &lt;br /&gt;
   Contact=&amp;quot;you@domain.com&amp;quot; &lt;br /&gt;
   URL=&amp;quot;http://i2mobile.domain.com&amp;quot;&amp;gt;&amp;lt;/System&amp;gt;&lt;br /&gt;
 &amp;lt;/CONFIG&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Thats it, setup is finsihed.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Display options=&lt;br /&gt;
Services and hosts can be hided in i2Mobile, the idea is to show only important information and hide services and hosts which are not interested for the mobile user&lt;br /&gt;
*Service sample&lt;br /&gt;
 apply Service &amp;quot;Something&amp;quot; {&lt;br /&gt;
  ...&lt;br /&gt;
  //this will hide the service from i2Mobile&lt;br /&gt;
  vars.is_ignore = &amp;quot;1&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
*Host sample&lt;br /&gt;
 apply Host &amp;quot;Something&amp;quot; {&lt;br /&gt;
  ...&lt;br /&gt;
  //this will hide the host from i2Mobile&lt;br /&gt;
  vars.is_ignore = &amp;quot;1&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=Authentication options=&lt;br /&gt;
Authentication can be established using the Apache htaccess options, however, there is the alternative option to work with session cookies which is &#039;&#039;&#039;less secure&#039;&#039;&#039; but&amp;lt;br&amp;gt;&lt;br /&gt;
allows the i2Mobile user to access the web quickly without prompting for authentication.&amp;lt;br&amp;gt;&lt;br /&gt;
The idea of session cookies is to create a GUID and then keep it local in i2mobile.xml to use as reference for each web user.&amp;lt;br&amp;gt;&lt;br /&gt;
A helper page is available to add the session cookie to the client mobile browser, the mobile client should then receive a email or sms including the link to add the session cookie.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Sample&#039;&#039;&#039;&lt;br /&gt;
*CookieID=&amp;quot;aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&amp;quot;&lt;br /&gt;
*Link to add the session cookie to the client browser:&lt;br /&gt;
**http://i2mobile.domain.com/setsessioncookie.pl?id=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&lt;br /&gt;
**Client can now access the page without additional authentication&lt;br /&gt;
&#039;&#039;&#039;Full configuration sample&#039;&#039;&#039;&lt;br /&gt;
*i2mobile.xml&lt;br /&gt;
 &amp;lt;Authentication &lt;br /&gt;
  Enabled=&amp;quot;1&amp;quot; &lt;br /&gt;
  CookieID=&amp;quot;aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&amp;quot; &lt;br /&gt;
  Name=&amp;quot;John Public&amp;quot; &lt;br /&gt;
  MailTo=&amp;quot;jp@domain.com&amp;quot; &lt;br /&gt;
  Expire=&amp;quot;20180701&amp;quot;&lt;br /&gt;
 &amp;lt;/Authentication&amp;gt;&lt;br /&gt;
From the above sample it is possible to immediate disable the web access by setting Enabled to 0 or set the Expire to yesterday.&amp;lt;br&amp;gt;&lt;br /&gt;
You may also use a small helper tool called addsc.pl which is available within the web directory, this tool creates the GUID and Link for the mobile client.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Debugging&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
See the status page which is available to obtain the validly of the session cookie&lt;br /&gt;
*http://i2mobile.domain.com/env.pl&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 70%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:30%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Download the script&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Version 1.0 - 16KB&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Download.png|60px|link=http://coolscript.org/download/i2mobile.1.0.tar.gz|Download]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|style=&amp;quot;width:70%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;hr&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Feedbacks or comments are very welcome, no matter which direction. Please drop a email to postmaster at coolscript.org&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=I2Mobile&amp;diff=112</id>
		<title>I2Mobile</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=I2Mobile&amp;diff=112"/>
		<updated>2016-06-30T19:22:13Z</updated>

		<summary type="html">&lt;p&gt;Matthias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
i2Mobile (beta) is a lightweight web interface for Icinga2, designed for mobile clients, running on Apache, it is based on the API (Rest) interface of [https://www.icinga.org/ Icinga2].&amp;lt;br&amp;gt;&lt;br /&gt;
The aim of this is to have a simple, easy and fast client for mobile phones.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{|align=right&lt;br /&gt;
 |__TOC__&lt;br /&gt;
 |}&lt;br /&gt;
&#039;&#039;&#039;Features&#039;&#039;&#039;&lt;br /&gt;
*Using the Icinga2 API to retrieve the status, no more status.cgi&lt;br /&gt;
*Fast and bandwidth friendly (less data)&lt;br /&gt;
*Display hosts and services with the state of error, warning and ok&lt;br /&gt;
*Mobile silence&lt;br /&gt;
**Hide hosts and services whenever they have been acknowledged&lt;br /&gt;
**Hide hosts and services which state is unknown&lt;br /&gt;
**Hide host and services by custom attributes (optional)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Requirements=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* Linux, Apache and Perl&lt;br /&gt;
* Access to the already existing Icinga2 API Host&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Screenshots=&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;All hosts and services are running&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-allgood.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Warnings present&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvwarn.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Critical Errors&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvandhosterror.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Warnings and Crticals&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvandhostwarnanderror.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Service List&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvlist.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Service Detail&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvdetail.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Installation=&lt;br /&gt;
&#039;&#039;&#039;Note: The scripts has been tested on Debian 8 with Apache 2.4&#039;&#039;&#039;&lt;br /&gt;
*Get the tar file from the link below&lt;br /&gt;
*Unextract&lt;br /&gt;
*Copy the entire web directory to your www root, in this example /var/www/i2mobile&lt;br /&gt;
*Make your Apache user (eg www-data) owner of the new www directory and files&lt;br /&gt;
*Copy the configuration example to /etc/i2mobile.xml&lt;br /&gt;
*Copy the web config template to /etc/apache2/sites-available/i2mobile.domain.com.conf&lt;br /&gt;
**Configure and rename the web config to your requriements&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*Setup Apache, enable the web site and switch on the cgi module, example:&lt;br /&gt;
 a2ensite i2mobile.domain.com&lt;br /&gt;
 a2enmod cgi&lt;br /&gt;
&lt;br /&gt;
*Install the required perl modules using MCPAN:&lt;br /&gt;
 # perl -MCPAN -e &#039;install REST::Client&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install JSON&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install MIME::Base64&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install Data::Dumper&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install Data::GUID&#039;&lt;br /&gt;
&lt;br /&gt;
=Configure i2Mobile=&lt;br /&gt;
Configuration is done in /etc/i2mobile.xml. These are the minimum settings:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;IcingaHost=&#039;&#039;&#039;URL and Port to the Icinga2 Host&lt;br /&gt;
*&#039;&#039;&#039;Password=&#039;&#039;&#039;The password&lt;br /&gt;
*&#039;&#039;&#039;CookieAuthentication=&#039;&#039;&#039;Optional authentication using a session cookie&lt;br /&gt;
*&#039;&#039;&#039;Contact=&#039;&#039;&#039;Optional contact information&lt;br /&gt;
*&#039;&#039;&#039;URL=&#039;&#039;&#039;=Optional Site URL&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;CONFIG&amp;gt;&lt;br /&gt;
  &amp;lt;System &lt;br /&gt;
   IcingaHost=&amp;quot;https://your.ip.here:5665&amp;quot; &lt;br /&gt;
   Password=&amp;quot;user:123456789&amp;quot; &lt;br /&gt;
   CookieAuthentication=&amp;quot;0&amp;quot; &lt;br /&gt;
   Contact=&amp;quot;you@domain.com&amp;quot; &lt;br /&gt;
   URL=&amp;quot;http://i2mobile.domain.com&amp;quot;&amp;gt;&amp;lt;/System&amp;gt;&lt;br /&gt;
 &amp;lt;/CONFIG&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Thats it, setup is finsihed.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Display options=&lt;br /&gt;
Services and hosts can be hided in i2Mobile, the idea is to show only important information and hide services and hosts which are not interested for the mobile user&lt;br /&gt;
*Service sample&lt;br /&gt;
 apply Service &amp;quot;Something&amp;quot; {&lt;br /&gt;
  ...&lt;br /&gt;
  //this will hide the service from i2Mobile&lt;br /&gt;
  vars.is_ignore = &amp;quot;1&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
*Host sample&lt;br /&gt;
 apply Host &amp;quot;Something&amp;quot; {&lt;br /&gt;
  ...&lt;br /&gt;
  //this will hide the host from i2Mobile&lt;br /&gt;
  vars.is_ignore = &amp;quot;1&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=Authentication options=&lt;br /&gt;
Authentication can be established using the Apache htaccess options, however, there is the alternative option to work with session cookies which is &#039;&#039;&#039;less secure&#039;&#039;&#039; but&amp;lt;br&amp;gt;&lt;br /&gt;
allows the i2Mobile user to access the web quickly without prompting for authentication.&amp;lt;br&amp;gt;&lt;br /&gt;
The idea of session cookies is to create a GUID and then keep it local in i2mobile.xml to use as reference for each web user.&amp;lt;br&amp;gt;&lt;br /&gt;
A helper page is available to add the session cookie to the client mobile browser, the mobile client should then receive a email or sms including the link to add the session cookie.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Sample&#039;&#039;&#039;&lt;br /&gt;
*CookieID=&amp;quot;aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&amp;quot;&lt;br /&gt;
*Link to add the session cookie to the client browser:&lt;br /&gt;
**http://i2mobile.domain.com/setsessioncookie.pl?id=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&lt;br /&gt;
**Client can now access the page without additional authentication&lt;br /&gt;
&#039;&#039;&#039;Full configuration sample&#039;&#039;&#039;&lt;br /&gt;
*i2mobile.xml&lt;br /&gt;
 &amp;lt;Authentication &lt;br /&gt;
  Enabled=&amp;quot;1&amp;quot; &lt;br /&gt;
  CookieID=&amp;quot;aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&amp;quot; &lt;br /&gt;
  Name=&amp;quot;John Public&amp;quot; &lt;br /&gt;
  MailTo=&amp;quot;jp@domain.com&amp;quot; &lt;br /&gt;
  Expire=&amp;quot;20180701&amp;quot;&lt;br /&gt;
 &amp;lt;/Authentication&amp;gt;&lt;br /&gt;
From the above sample it is possible to immediate disable the web access by setting Enabled to 0 or set the Expire to yesterday.&amp;lt;br&amp;gt;&lt;br /&gt;
You may also use a small helper tool called addsc.pl which is available within the web directory, this tool creates the GUID and Link for the mobile client.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Debugging&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
See the status page which is available to obtain the validly of the session cookie&lt;br /&gt;
*http://i2mobile.domain.com/env.pl&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 70%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:30%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Download the script&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Version 1.0 - 16KB&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Download.png|60px|link=http://coolscript.org/download/i2mobile.1.0.tar.gz|Download]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|style=&amp;quot;width:70%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;hr&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Feedbacks or comments are very welcome, no matter which direction. Please drop a email to postmaster at coolscript.org&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=I2Mobile&amp;diff=111</id>
		<title>I2Mobile</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=I2Mobile&amp;diff=111"/>
		<updated>2016-06-30T19:14:36Z</updated>

		<summary type="html">&lt;p&gt;Matthias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
i2Mobile (beta) is a lightweight web interface for Icinga2, designed for mobile clients, running on Apache, it is based on the API (Rest) interface of [https://www.icinga.org/ Icinga2].&amp;lt;br&amp;gt;&lt;br /&gt;
The aim of this is to have a simple, easy and fast client for mobile phones.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{|align=right&lt;br /&gt;
 |__TOC__&lt;br /&gt;
 |}&lt;br /&gt;
&#039;&#039;&#039;Features&#039;&#039;&#039;&lt;br /&gt;
*Using the Icinga2 API to retrieve the status, no more status.cgi&lt;br /&gt;
*Fast and bandwidth friendly (less data)&lt;br /&gt;
*Display hosts and services with the state of error, warning and ok&lt;br /&gt;
*Mobile silence&lt;br /&gt;
**Hide hosts and services whenever they have been acknowledged&lt;br /&gt;
**Hide hosts and services which state is unknown&lt;br /&gt;
**Hide host and services by custom attributes (optional)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Requirements=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* Linux, Apache and Perl&lt;br /&gt;
* Access to the already existing Icinga2 API Host&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Screenshots=&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;All hosts and services are running&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-allgood.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Warnings present&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvwarn.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Critical Errors&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvandhosterror.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Warnings and Crticals&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvandhostwarnanderror.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Service List&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvlist.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Service Detail&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvdetail.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Installation=&lt;br /&gt;
&#039;&#039;&#039;Note: The scripts has been tested on Debian 8 with Apache 2.4&#039;&#039;&#039;&lt;br /&gt;
*Get the tar file from the link below&lt;br /&gt;
*Unextract&lt;br /&gt;
*Copy the entire web directory to your www root, in this example /var/www/i2mobile&lt;br /&gt;
*Make your Apache user (eg www-data) owner of the new www directory and files&lt;br /&gt;
*Copy the configuration example to /etc/i2mobile.xml&lt;br /&gt;
*Copy the web config template to /etc/apache2/sites-available/i2mobile.domain.com.conf&lt;br /&gt;
**Configure and rename the web config to your requriements&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*Setup Apache, enable the web site and switch on the cgi module, example:&lt;br /&gt;
 a2ensite i2mobile.domain.com&lt;br /&gt;
 a2enmod cgi&lt;br /&gt;
&lt;br /&gt;
*Install the required perl modules using MCPAN:&lt;br /&gt;
 # perl -MCPAN -e &#039;install REST::Client&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install JSON&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install MIME::Base64&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install Data::Dumper&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install Data::GUID&#039;&lt;br /&gt;
&lt;br /&gt;
=Configure i2Mobile=&lt;br /&gt;
Configuration is done in /etc/i2mobile.xml. These are the minimum settings:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;IcingaHost=&#039;&#039;&#039;URL and Port to the Icinga2 Host&lt;br /&gt;
*&#039;&#039;&#039;Password=&#039;&#039;&#039;The password&lt;br /&gt;
*&#039;&#039;&#039;CookieAuthentication=&#039;&#039;&#039;Optional authentication using a session cookie&lt;br /&gt;
*&#039;&#039;&#039;Contact=&#039;&#039;&#039;Optional contact information&lt;br /&gt;
*&#039;&#039;&#039;URL=&#039;&#039;&#039;=Optional Site URL&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;CONFIG&amp;gt;&lt;br /&gt;
  &amp;lt;System &lt;br /&gt;
   IcingaHost=&amp;quot;https://your.ip.here:5665&amp;quot; &lt;br /&gt;
   Password=&amp;quot;user:123456789&amp;quot; &lt;br /&gt;
   CookieAuthentication=&amp;quot;0&amp;quot; &lt;br /&gt;
   Contact=&amp;quot;you@domain.com&amp;quot; &lt;br /&gt;
   URL=&amp;quot;http://i2mobile.domain.com&amp;quot;&amp;gt;&amp;lt;/System&amp;gt;&lt;br /&gt;
 &amp;lt;/CONFIG&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Thats it, setup is finsihed.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Display options=&lt;br /&gt;
Services and hosts can be hided in i2Mobile, the idea is to show only important information and hide services and hosts which are not interested for the mobile user&lt;br /&gt;
*Service sample&lt;br /&gt;
 apply Service &amp;quot;Something&amp;quot; {&lt;br /&gt;
  ...&lt;br /&gt;
  //this will hide the service from i2Mobile&lt;br /&gt;
  vars.is_ignore = &amp;quot;1&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
*Host sample&lt;br /&gt;
 apply Host &amp;quot;Something&amp;quot; {&lt;br /&gt;
  ...&lt;br /&gt;
  //this will hide the host from i2Mobile&lt;br /&gt;
  vars.is_ignore = &amp;quot;1&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=Authentication options=&lt;br /&gt;
Authentication can be established using the Apache htaccess options, however, there is the alternative option to work with session cookies which is &#039;&#039;&#039;less secure&#039;&#039;&#039; but&amp;lt;br&amp;gt;&lt;br /&gt;
allows the i2Mobile user to access the web quickly without prompting for authentication.&amp;lt;br&amp;gt;&lt;br /&gt;
The idea of session cookies is to create a GUID and then keep it local in i2mobile.xml to use as reference for each web user.&amp;lt;br&amp;gt;&lt;br /&gt;
A helper page is available to add the session cookie to the client mobile browser, the mobile client should then receive a email or sms including the link to add the session cookie.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Sample&#039;&#039;&#039;&lt;br /&gt;
*CookieID=&amp;quot;aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&amp;quot;&lt;br /&gt;
*Link to add the session cookie to the client browser:&lt;br /&gt;
**http://i2mobile.domain.com/setsessioncookie.pl?id=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&lt;br /&gt;
**Client can now access the page without additional authentication&lt;br /&gt;
&#039;&#039;&#039;Full configuration sample&#039;&#039;&#039;&lt;br /&gt;
*i2mobile.xml&lt;br /&gt;
 &amp;lt;Authentication &lt;br /&gt;
  Enabled=&amp;quot;1&amp;quot; &lt;br /&gt;
  CookieID=&amp;quot;aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&amp;quot; &lt;br /&gt;
  Name=&amp;quot;John Public&amp;quot; &lt;br /&gt;
  MailTo=&amp;quot;jp@domain.com&amp;quot; &lt;br /&gt;
  Expire=&amp;quot;20180701&amp;quot;&lt;br /&gt;
 &amp;lt;/Authentication&amp;gt;&lt;br /&gt;
From the above sample it is possible to immediate disable the web access by setting Enabled to 0 or set the Expire to yesterday.&amp;lt;br&amp;gt;&lt;br /&gt;
You may also use a small helper tool called addsc.pl which is available within the web directory, this will add the record to the configuration.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Debugging&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
A status page is available to obtain the validly of the session cookie&lt;br /&gt;
*http://i2mobile.domain.com/env.pl&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 70%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:30%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Download the script&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Version 1.0 - 16KB&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Download.png|60px|link=http://coolscript.org/download/i2mobile.1.0.tar.gz|Download]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|style=&amp;quot;width:70%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;hr&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Feedbacks or comments are very welcome, no matter which direction. Please send to postmaster at coolscript.org&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=I2Mobile&amp;diff=110</id>
		<title>I2Mobile</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=I2Mobile&amp;diff=110"/>
		<updated>2016-06-30T18:45:52Z</updated>

		<summary type="html">&lt;p&gt;Matthias: /* Authentication options */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
i2Mobile (beta) is a lightweight web interface for Icinga2, designed for mobile clients, running on Apache, it is based on the API (Rest) interface of [https://www.icinga.org/ Icinga2].&amp;lt;br&amp;gt;&lt;br /&gt;
The aim of this is to have a simple, easy and fast client for mobile phones.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{|align=right&lt;br /&gt;
 |__TOC__&lt;br /&gt;
 |}&lt;br /&gt;
&#039;&#039;&#039;Features&#039;&#039;&#039;&lt;br /&gt;
*Using the Icinga2 API to retrieve the status, no more status.cgi&lt;br /&gt;
*Fast and bandwidth friendly (less data)&lt;br /&gt;
*Display hosts and services with the state of error, warning and ok&lt;br /&gt;
*Hide hosts and services whenever they have been confirmed as acknowledged&lt;br /&gt;
*Hide hosts and services which state is unknown&lt;br /&gt;
*Additional hide host and services within i2Mobile by custom attributes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Requirements=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* Linux, Apache and Perl&lt;br /&gt;
* Access to the already existing Icinga2 API Host&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Screenshots=&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;All hosts and services are running&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-allgood.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Warnings present&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvwarn.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Critical Errors&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvandhosterror.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Warnings and Crticals&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvandhostwarnanderror.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Service List&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvlist.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Service Detail&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvdetail.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Installation=&lt;br /&gt;
&#039;&#039;&#039;Note: The scripts has been tested on Debian 8 with Apache 2.4&#039;&#039;&#039;&lt;br /&gt;
*Get the tar file from the link below&lt;br /&gt;
*Unextract&lt;br /&gt;
*Copy the entire web directory to your www root, in this example /var/www/i2mobile&lt;br /&gt;
*Make your Apache user (eg www-data) owner of the new www directory and files&lt;br /&gt;
*Copy the configuration example to /etc/i2mobile.xml&lt;br /&gt;
*Copy the web config template to /etc/apache2/sites-available/i2mobile.domain.com.conf&lt;br /&gt;
**Configure and rename the web config to your requriements&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*Setup Apache, enable the web site and switch on the cgi module, example:&lt;br /&gt;
 a2ensite i2mobile.domain.com&lt;br /&gt;
 a2enmod cgi&lt;br /&gt;
&lt;br /&gt;
*Install the required perl modules using MCPAN:&lt;br /&gt;
 # perl -MCPAN -e &#039;install REST::Client&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install JSON&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install MIME::Base64&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install Data::Dumper&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install Data::GUID&#039;&lt;br /&gt;
&lt;br /&gt;
=Configure i2Mobile=&lt;br /&gt;
Configuration is done in /etc/i2mobile.xml. These are the minimum settings:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;IcingaHost=&#039;&#039;&#039;URL and Port to the Icinga2 Host&lt;br /&gt;
*&#039;&#039;&#039;Password=&#039;&#039;&#039;The password&lt;br /&gt;
*&#039;&#039;&#039;CookieAuthentication=&#039;&#039;&#039;Optional authentication using a session cookie&lt;br /&gt;
*&#039;&#039;&#039;Contact=&#039;&#039;&#039;Optional contact information&lt;br /&gt;
*&#039;&#039;&#039;URL=&#039;&#039;&#039;=Optional Site URL&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;CONFIG&amp;gt;&lt;br /&gt;
  &amp;lt;System &lt;br /&gt;
   IcingaHost=&amp;quot;https://your.ip.here:5665&amp;quot; &lt;br /&gt;
   Password=&amp;quot;user:123456789&amp;quot; &lt;br /&gt;
   CookieAuthentication=&amp;quot;0&amp;quot; &lt;br /&gt;
   Contact=&amp;quot;you@domain.com&amp;quot; &lt;br /&gt;
   URL=&amp;quot;http://i2mobile.domain.com&amp;quot;&amp;gt;&amp;lt;/System&amp;gt;&lt;br /&gt;
 &amp;lt;/CONFIG&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Thats it, setup is finsihed.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Display options=&lt;br /&gt;
Services and hosts can be hided in i2Mobile, the idea is to show only important information and hide services and hosts which are not interested for the mobile user&lt;br /&gt;
*Service sample&lt;br /&gt;
 apply Service &amp;quot;Something&amp;quot; {&lt;br /&gt;
  ...&lt;br /&gt;
  //this will hide the service from i2Mobile&lt;br /&gt;
  vars.is_ignore = &amp;quot;1&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
*Host sample&lt;br /&gt;
 apply Host &amp;quot;Something&amp;quot; {&lt;br /&gt;
  ...&lt;br /&gt;
  //this will hide the host from i2Mobile&lt;br /&gt;
  vars.is_ignore = &amp;quot;1&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=Authentication options=&lt;br /&gt;
Authentication can be established using the Apache htaccess options, however, there is the alternative option to work with session cookies which is &#039;&#039;&#039;less secure&#039;&#039;&#039; but&amp;lt;br&amp;gt;&lt;br /&gt;
allows the i2Mobile user to access the web quickly without prompting for authentication.&amp;lt;br&amp;gt;&lt;br /&gt;
The idea of session cookies is to create a GUID and then keep it local in i2mobile.xml to use as reference for each web user.&amp;lt;br&amp;gt;&lt;br /&gt;
A helper page is available to add the session cookie to the client mobile browser, the mobile client should then receive a email or sms including the link to add the session cookie.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Sample&#039;&#039;&#039;&lt;br /&gt;
*CookieID=&amp;quot;aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&amp;quot;&lt;br /&gt;
*Link to add the session cookie to the client browser:&lt;br /&gt;
**http://i2mobile.domain.com/setsessioncookie.pl?id=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&lt;br /&gt;
**Client can now access the page without additional authentication&lt;br /&gt;
&#039;&#039;&#039;Full configuration sample&#039;&#039;&#039;&lt;br /&gt;
*i2mobile.xml&lt;br /&gt;
 &amp;lt;Authentication &lt;br /&gt;
  Enabled=&amp;quot;1&amp;quot; &lt;br /&gt;
  CookieID=&amp;quot;aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&amp;quot; &lt;br /&gt;
  Name=&amp;quot;John Public&amp;quot; &lt;br /&gt;
  MailTo=&amp;quot;jp@domain.com&amp;quot; &lt;br /&gt;
  Expire=&amp;quot;20180701&amp;quot;&lt;br /&gt;
 &amp;lt;/Authentication&amp;gt;&lt;br /&gt;
From the above sample it is possible to immediate disable the web access by setting Enabled to 0 or set the Expire to yesterday.&amp;lt;br&amp;gt;&lt;br /&gt;
You may also use a small helper tool called addsc.pl which is available within the web directory, this will add the record to the configuration.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Debugging&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
A status page is available to obtain the validly of the session cookie&lt;br /&gt;
*http://i2mobile.domain.com/env.pl&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 70%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:30%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Download the script&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Version 1.0 - 16KB&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Download.png|60px|link=http://coolscript.org/download/i2mobile.1.0.tar.gz|Download]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|style=&amp;quot;width:70%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;hr&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Feedbacks or comments are very welcome, no matter which direction. Please send to postmaster at coolscript.org&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=I2Mobile&amp;diff=109</id>
		<title>I2Mobile</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=I2Mobile&amp;diff=109"/>
		<updated>2016-06-30T18:44:03Z</updated>

		<summary type="html">&lt;p&gt;Matthias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
i2Mobile (beta) is a lightweight web interface for Icinga2, designed for mobile clients, running on Apache, it is based on the API (Rest) interface of [https://www.icinga.org/ Icinga2].&amp;lt;br&amp;gt;&lt;br /&gt;
The aim of this is to have a simple, easy and fast client for mobile phones.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{|align=right&lt;br /&gt;
 |__TOC__&lt;br /&gt;
 |}&lt;br /&gt;
&#039;&#039;&#039;Features&#039;&#039;&#039;&lt;br /&gt;
*Using the Icinga2 API to retrieve the status, no more status.cgi&lt;br /&gt;
*Fast and bandwidth friendly (less data)&lt;br /&gt;
*Display hosts and services with the state of error, warning and ok&lt;br /&gt;
*Hide hosts and services whenever they have been confirmed as acknowledged&lt;br /&gt;
*Hide hosts and services which state is unknown&lt;br /&gt;
*Additional hide host and services within i2Mobile by custom attributes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Requirements=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* Linux, Apache and Perl&lt;br /&gt;
* Access to the already existing Icinga2 API Host&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Screenshots=&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;All hosts and services are running&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-allgood.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Warnings present&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvwarn.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Critical Errors&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvandhosterror.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Warnings and Crticals&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvandhostwarnanderror.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Service List&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvlist.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Service Detail&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvdetail.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Installation=&lt;br /&gt;
&#039;&#039;&#039;Note: The scripts has been tested on Debian 8 with Apache 2.4&#039;&#039;&#039;&lt;br /&gt;
*Get the tar file from the link below&lt;br /&gt;
*Unextract&lt;br /&gt;
*Copy the entire web directory to your www root, in this example /var/www/i2mobile&lt;br /&gt;
*Make your Apache user (eg www-data) owner of the new www directory and files&lt;br /&gt;
*Copy the configuration example to /etc/i2mobile.xml&lt;br /&gt;
*Copy the web config template to /etc/apache2/sites-available/i2mobile.domain.com.conf&lt;br /&gt;
**Configure and rename the web config to your requriements&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*Setup Apache, enable the web site and switch on the cgi module, example:&lt;br /&gt;
 a2ensite i2mobile.domain.com&lt;br /&gt;
 a2enmod cgi&lt;br /&gt;
&lt;br /&gt;
*Install the required perl modules using MCPAN:&lt;br /&gt;
 # perl -MCPAN -e &#039;install REST::Client&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install JSON&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install MIME::Base64&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install Data::Dumper&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install Data::GUID&#039;&lt;br /&gt;
&lt;br /&gt;
=Configure i2Mobile=&lt;br /&gt;
Configuration is done in /etc/i2mobile.xml. These are the minimum settings:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;IcingaHost=&#039;&#039;&#039;URL and Port to the Icinga2 Host&lt;br /&gt;
*&#039;&#039;&#039;Password=&#039;&#039;&#039;The password&lt;br /&gt;
*&#039;&#039;&#039;CookieAuthentication=&#039;&#039;&#039;Optional authentication using a session cookie&lt;br /&gt;
*&#039;&#039;&#039;Contact=&#039;&#039;&#039;Optional contact information&lt;br /&gt;
*&#039;&#039;&#039;URL=&#039;&#039;&#039;=Optional Site URL&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;CONFIG&amp;gt;&lt;br /&gt;
  &amp;lt;System &lt;br /&gt;
   IcingaHost=&amp;quot;https://your.ip.here:5665&amp;quot; &lt;br /&gt;
   Password=&amp;quot;user:123456789&amp;quot; &lt;br /&gt;
   CookieAuthentication=&amp;quot;0&amp;quot; &lt;br /&gt;
   Contact=&amp;quot;you@domain.com&amp;quot; &lt;br /&gt;
   URL=&amp;quot;http://i2mobile.domain.com&amp;quot;&amp;gt;&amp;lt;/System&amp;gt;&lt;br /&gt;
 &amp;lt;/CONFIG&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Thats it, setup is finsihed.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Display options=&lt;br /&gt;
Services and hosts can be hided in i2Mobile, the idea is to show only important information and hide services and hosts which are not interested for the mobile user&lt;br /&gt;
*Service sample&lt;br /&gt;
 apply Service &amp;quot;Something&amp;quot; {&lt;br /&gt;
  ...&lt;br /&gt;
  //this will hide the service from i2Mobile&lt;br /&gt;
  vars.is_ignore = &amp;quot;1&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
*Host sample&lt;br /&gt;
 apply Host &amp;quot;Something&amp;quot; {&lt;br /&gt;
  ...&lt;br /&gt;
  //this will hide the host from i2Mobile&lt;br /&gt;
  vars.is_ignore = &amp;quot;1&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=Authentication options=&lt;br /&gt;
Authentication can be established using the Apache htaccess options, however, there is the alternative option to work with session cookies which is &#039;&#039;&#039;less secure&#039;&#039;&#039; but&amp;lt;br&amp;gt;&lt;br /&gt;
allows the i2Mobile user to access the web quickly without prompting for authentication.&amp;lt;br&amp;gt;&lt;br /&gt;
The idea of session cookies is to create a GUID and then keep it local in i2mobile.xml to use as reference for each web user.&amp;lt;br&amp;gt;&lt;br /&gt;
A helper page is available to add the session cookie to the client mobile browser, the mobile client will then receive a email or sms including the link to add the session cookie.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Sample&#039;&#039;&#039;&lt;br /&gt;
*CookieID=&amp;quot;aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&amp;quot;&lt;br /&gt;
*Link to add the session cookie to the client browser:&lt;br /&gt;
**http://i2mobile.domain.com/setsessioncookie.pl?id=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&lt;br /&gt;
**Client can now access the page without additional authentication&lt;br /&gt;
&#039;&#039;&#039;Full configuration sample&#039;&#039;&#039;&lt;br /&gt;
*i2mobile.xml&lt;br /&gt;
 &amp;lt;Authentication &lt;br /&gt;
  Enabled=&amp;quot;1&amp;quot; &lt;br /&gt;
  CookieID=&amp;quot;aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&amp;quot; &lt;br /&gt;
  Name=&amp;quot;John Public&amp;quot; &lt;br /&gt;
  MailTo=&amp;quot;jp@domain.com&amp;quot; &lt;br /&gt;
  Expire=&amp;quot;20180701&amp;quot;&lt;br /&gt;
 &amp;lt;/Authentication&amp;gt;&lt;br /&gt;
From the above sample it is possible to immediate disable the web access by setting Enabled to 0 or set the Expire to yesterday.&amp;lt;br&amp;gt;&lt;br /&gt;
You may also use a small helper tool called addsc.pl which is available within the web directory, this will add the record to the configuration.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Debugging&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
A status page is available to obtain the validly of the session cookie&lt;br /&gt;
*http://i2mobile.domain.com/env.pl&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 70%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:30%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Download the script&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Version 1.0 - 16KB&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Download.png|60px|link=http://coolscript.org/download/i2mobile.1.0.tar.gz|Download]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|style=&amp;quot;width:70%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;hr&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Feedbacks or comments are very welcome, no matter which direction. Please send to postmaster at coolscript.org&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=I2Mobile&amp;diff=108</id>
		<title>I2Mobile</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=I2Mobile&amp;diff=108"/>
		<updated>2016-06-30T18:33:39Z</updated>

		<summary type="html">&lt;p&gt;Matthias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
i2Mobile (beta) is a lightweight web interface for Icinga2, designed for mobile clients, running on Apache, it is based on the API (Rest) interface of [https://www.icinga.org/ Icinga2].&amp;lt;br&amp;gt;&lt;br /&gt;
The aim of this is to have a simple, easy and fast client for mobile phones.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{|align=right&lt;br /&gt;
 |__TOC__&lt;br /&gt;
 |}&lt;br /&gt;
&#039;&#039;&#039;Features&#039;&#039;&#039;&lt;br /&gt;
*Using the Icinga2 API to retrieve the status, no more status.cgi&lt;br /&gt;
*Fast and bandwidth friendly (less data)&lt;br /&gt;
*Display hosts and services with the state of error, warning and ok&lt;br /&gt;
*Hide hosts and services whenever they have been confirmed as acknowledged&lt;br /&gt;
*Hide hosts and services which state is unknown&lt;br /&gt;
*Additional hide host and services within i2Mobile by custom attributes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Requirements=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* Linux, Apache and Perl&lt;br /&gt;
* Access to the already existing Icinga2 API Host&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Screenshots=&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;All hosts and services are running&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-allgood.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Warnings present&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvwarn.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Critical Errors&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvandhosterror.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Warnings and Crticals&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvandhostwarnanderror.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Service List&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvlist.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Service Detail&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvdetail.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Installation=&lt;br /&gt;
&#039;&#039;&#039;Note: The scripts has been tested on Debian 8 with Apache 2.4&#039;&#039;&#039;&lt;br /&gt;
*Get the tar file from the link below&lt;br /&gt;
*Unextract&lt;br /&gt;
*Copy the entire web directory to your www root, in this example /var/www/i2mobile&lt;br /&gt;
*Make your Apache user (eg www-data) owner of the new www directory and files&lt;br /&gt;
*Copy the configuration example to /etc/i2mobile.xml&lt;br /&gt;
*Copy the web config template to /etc/apache2/sites-available/i2mobile.domain.com.conf&lt;br /&gt;
**Configure and rename the web config to your requriements&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*Setup Apache, enable the web site and switch on the cgi module, example:&lt;br /&gt;
 a2ensite i2mobile.domain.com&lt;br /&gt;
 a2enmod cgi&lt;br /&gt;
&lt;br /&gt;
*Install the required perl modules using MCPAN:&lt;br /&gt;
 # perl -MCPAN -e &#039;install REST::Client&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install JSON&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install MIME::Base64&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install Data::Dumper&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install Data::GUID&#039;&lt;br /&gt;
&lt;br /&gt;
=Configure i2Mobile=&lt;br /&gt;
Configuration is done in /etc/i2mobile.xml. These are the minimum settings:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;IcingaHost=&#039;&#039;&#039;URL and Port to the Icinga2 Host&lt;br /&gt;
*&#039;&#039;&#039;Password=&#039;&#039;&#039;The password&lt;br /&gt;
*&#039;&#039;&#039;CookieAuthentication=&#039;&#039;&#039;Optional authentication using a session cookie&lt;br /&gt;
*&#039;&#039;&#039;Contact=&#039;&#039;&#039;Optional contact information&lt;br /&gt;
*&#039;&#039;&#039;URL=&#039;&#039;&#039;=Optional Site URL&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;CONFIG&amp;gt;&lt;br /&gt;
  &amp;lt;System &lt;br /&gt;
   IcingaHost=&amp;quot;https://your.ip.here:5665&amp;quot; &lt;br /&gt;
   Password=&amp;quot;user:123456789&amp;quot; &lt;br /&gt;
   CookieAuthentication=&amp;quot;0&amp;quot; &lt;br /&gt;
   Contact=&amp;quot;you@domain.com&amp;quot; &lt;br /&gt;
   URL=&amp;quot;http://i2mobile.domain.com&amp;quot;&amp;gt;&amp;lt;/System&amp;gt;&lt;br /&gt;
 &amp;lt;/CONFIG&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Thats it, setup is finsihed.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Display options=&lt;br /&gt;
Services and hosts can be hided in i2Mobile, the idea is to show only important information and hide services and hosts which are not interested for the mobile user&lt;br /&gt;
*Service sample&lt;br /&gt;
 apply Service &amp;quot;Something&amp;quot; {&lt;br /&gt;
  ...&lt;br /&gt;
  //this will hide the service from i2Mobile&lt;br /&gt;
  vars.is_ignore = &amp;quot;1&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
*Host sample&lt;br /&gt;
 apply Host &amp;quot;Something&amp;quot; {&lt;br /&gt;
  ...&lt;br /&gt;
  //this will hide the host from i2Mobile&lt;br /&gt;
  vars.is_ignore = &amp;quot;1&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=Authentication options=&lt;br /&gt;
Authentication can be established using the Apache htaccess options, however, there is the alternative option to work with session cookies which is &#039;&#039;&#039;less secure&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
but allows the i2Mobile user to access the web quickly with no authentication prompt. The idea of session cookies is to create a GUID, keep it local in i2mobile.xml&lt;br /&gt;
and use it as reference.&amp;lt;br&amp;gt;A helper page is available to add the session cookie on the client mobile browser.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Sample&#039;&#039;&#039;&lt;br /&gt;
*CookieID=&amp;quot;aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&amp;quot;&lt;br /&gt;
*Link to add the session cookie to the client browser:&lt;br /&gt;
**http://i2mobile.domain.com/setsessioncookie.pl?id=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&lt;br /&gt;
**Client can now access the page without additional authentication&lt;br /&gt;
&#039;&#039;&#039;Full configuration sample&#039;&#039;&#039;&lt;br /&gt;
*i2mobile.xml&lt;br /&gt;
 &amp;lt;Authentication &lt;br /&gt;
  Enabled=&amp;quot;1&amp;quot; &lt;br /&gt;
  CookieID=&amp;quot;aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&amp;quot; &lt;br /&gt;
  Name=&amp;quot;John Public&amp;quot; &lt;br /&gt;
  MailTo=&amp;quot;jp@domain.com&amp;quot; &lt;br /&gt;
  Expire=&amp;quot;20180701&amp;quot;&lt;br /&gt;
 &amp;lt;/Authentication&amp;gt;&lt;br /&gt;
From the above sample it is possible to immediate disable the web access by setting Enabled to 0 or set the Expire to yesterday.&amp;lt;br&amp;gt;&lt;br /&gt;
You may also use a small tool called addsc.pl which is available within the web directory, this will add the record to the configuration.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Debugging&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
A status page is available to obtain the validly of the session cookie&lt;br /&gt;
*http://i2mobile.domain.com/env.pl&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 70%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:30%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Download the script&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Version 1.0 - 16KB&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Download.png|60px|link=http://coolscript.org/download/i2mobile.1.0.tar.gz|Download]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|style=&amp;quot;width:70%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;hr&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Feedbacks or comments are very welcome, no matter which direction. Please send to postmaster at coolscript.org&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=I2Mobile&amp;diff=107</id>
		<title>I2Mobile</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=I2Mobile&amp;diff=107"/>
		<updated>2016-06-30T18:28:11Z</updated>

		<summary type="html">&lt;p&gt;Matthias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
i2Mobile (beta) is a lightweight web interface for Icinga2, designed for mobile clients, running on Apache, it is based on the API (Rest) interface of [https://www.icinga.org/ Icinga2].&amp;lt;br&amp;gt;&lt;br /&gt;
The aim of this is to have a simple, easy and fast client for mobile phones.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{|align=right&lt;br /&gt;
 |__TOC__&lt;br /&gt;
 |}&lt;br /&gt;
&#039;&#039;&#039;Features&#039;&#039;&#039;&lt;br /&gt;
*Using the Icinga2 API to retrieve the status, no more status.cgi&lt;br /&gt;
*Fast and Bandwidth friendly (less data)&lt;br /&gt;
*Display hosts and services with the state of error, warning and ok&lt;br /&gt;
*Hide hosts and services when they are acknowledged or unknown.&lt;br /&gt;
*Additional hide host and services by custom attributes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Requirements=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* Linux, Apache and Perl for the WebUI&lt;br /&gt;
* Access to the Icinga2 API Host&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Screenshots=&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;All hosts and services are running&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-allgood.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Warnings present&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvwarn.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Critical Errors&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvandhosterror.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Warnings and Crticals&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvandhostwarnanderror.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Service List&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvlist.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Service Detail&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvdetail.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Installation=&lt;br /&gt;
&#039;&#039;&#039;Note: The scripts has been tested on Debian 8 with Apache 2.4&#039;&#039;&#039;&lt;br /&gt;
*Get the tar file from the link below&lt;br /&gt;
*Unextract&lt;br /&gt;
*Copy the entire web directory to your www root, in this example /var/www/i2mobile&lt;br /&gt;
*Make your Apache user (eg www-data) owner of the new www directory and files&lt;br /&gt;
*Copy the configuration example to /etc/i2mobile.xml&lt;br /&gt;
*Copy the web config template to /etc/apache2/sites-available/i2mobile.domain.com.conf&lt;br /&gt;
**Configure and rename the web config to your requriements&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*Setup Apache, enable the web site and switch on the cgi module, example:&lt;br /&gt;
 a2ensite i2mobile.domain.com&lt;br /&gt;
 a2enmod cgi&lt;br /&gt;
&lt;br /&gt;
*Install the required perl modules using MCPAN:&lt;br /&gt;
 # perl -MCPAN -e &#039;install REST::Client&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install JSON&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install MIME::Base64&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install Data::Dumper&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install Data::GUID&#039;&lt;br /&gt;
&lt;br /&gt;
=Configure i2Mobile=&lt;br /&gt;
Configuration is done in /etc/i2mobile.xml. These are the minimum settings:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;IcingaHost=&#039;&#039;&#039;URL and Port to the Icinga2 Host&lt;br /&gt;
*&#039;&#039;&#039;Password=&#039;&#039;&#039;The password&lt;br /&gt;
*&#039;&#039;&#039;CookieAuthentication=&#039;&#039;&#039;Optional authentication using a session cookie&lt;br /&gt;
*&#039;&#039;&#039;Contact=&#039;&#039;&#039;Optional contact information&lt;br /&gt;
*&#039;&#039;&#039;URL=&#039;&#039;&#039;=Optional Site URL&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;CONFIG&amp;gt;&lt;br /&gt;
  &amp;lt;System &lt;br /&gt;
   IcingaHost=&amp;quot;https://your.ip.here:5665&amp;quot; &lt;br /&gt;
   Password=&amp;quot;user:123456789&amp;quot; &lt;br /&gt;
   CookieAuthentication=&amp;quot;0&amp;quot; &lt;br /&gt;
   Contact=&amp;quot;you@domain.com&amp;quot; &lt;br /&gt;
   URL=&amp;quot;http://i2mobile.domain.com&amp;quot;&amp;gt;&amp;lt;/System&amp;gt;&lt;br /&gt;
 &amp;lt;/CONFIG&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Thats it, setup is finsihed.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Display options=&lt;br /&gt;
Services and hosts can be hided in i2Mobile, the idea is to show only important information and hide services and hosts which are not interested for the mobile user&lt;br /&gt;
*Service sample&lt;br /&gt;
 apply Service &amp;quot;Something&amp;quot; {&lt;br /&gt;
  ...&lt;br /&gt;
  //this will hide the service from i2Mobile&lt;br /&gt;
  vars.is_ignore = &amp;quot;1&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
*Host sample&lt;br /&gt;
 apply Host &amp;quot;Something&amp;quot; {&lt;br /&gt;
  ...&lt;br /&gt;
  //this will hide the host from i2Mobile&lt;br /&gt;
  vars.is_ignore = &amp;quot;1&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=Authentication options=&lt;br /&gt;
Authentication can be established using the Apache htaccess options, however, there is the alternative option to work with session cookies which is &#039;&#039;&#039;less secure&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
but allows the i2Mobile user to access the web quickly with no authentication prompt. The idea of session cookies is to create a GUID, keep it local in i2mobile.xml&lt;br /&gt;
and use it as reference.&amp;lt;br&amp;gt;A helper page is available to add the session cookie on the client mobile browser.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Sample&#039;&#039;&#039;&lt;br /&gt;
*CookieID=&amp;quot;aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&amp;quot;&lt;br /&gt;
*Link to add the session cookie to the client browser:&lt;br /&gt;
**http://i2mobile.domain.com/setsessioncookie.pl?id=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&lt;br /&gt;
**Client can now access the page without additional authentication&lt;br /&gt;
&#039;&#039;&#039;Full configuration sample&#039;&#039;&#039;&lt;br /&gt;
*i2mobile.xml&lt;br /&gt;
 &amp;lt;Authentication &lt;br /&gt;
  Enabled=&amp;quot;1&amp;quot; &lt;br /&gt;
  CookieID=&amp;quot;aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&amp;quot; &lt;br /&gt;
  Name=&amp;quot;John Public&amp;quot; &lt;br /&gt;
  MailTo=&amp;quot;jp@domain.com&amp;quot; &lt;br /&gt;
  Expire=&amp;quot;20180701&amp;quot;&lt;br /&gt;
 &amp;lt;/Authentication&amp;gt;&lt;br /&gt;
From the above sample it is possible to immediate disable the web access by setting Enabled to 0 or set the Expire to yesterday.&amp;lt;br&amp;gt;&lt;br /&gt;
You may also use a small tool called addsc.pl which is available within the web directory, this will add the record to the configuration.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Debugging&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
A status page is available to obtain the validly of the session cookie&lt;br /&gt;
*http://i2mobile.domain.com/env.pl&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 70%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:30%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Download the script&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Version 1.0 - 16KB&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Download.png|60px|link=http://coolscript.org/download/i2mobile.1.0.tar.gz|Download]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|style=&amp;quot;width:70%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;hr&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Feedbacks or comments are very welcome, no matter which direction. Please send to postmaster at coolscript.org&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=I2Mobile&amp;diff=106</id>
		<title>I2Mobile</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=I2Mobile&amp;diff=106"/>
		<updated>2016-06-30T18:23:10Z</updated>

		<summary type="html">&lt;p&gt;Matthias: /* Display options */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
i2Mobile (beta) is a lightweight web interface for Icinga2, designed for mobile clients, running on Apache, it is based on the API (Rest) interface of [https://www.icinga.org/ Icinga2].&amp;lt;br&amp;gt;&lt;br /&gt;
The aim of this is to have a simple, easy and fast client for mobile phones.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{|align=right&lt;br /&gt;
 |__TOC__&lt;br /&gt;
 |}&lt;br /&gt;
&#039;&#039;&#039;Features&#039;&#039;&#039;&lt;br /&gt;
*Using the Icinga2 API to retrieve the status, no more status.cgi&lt;br /&gt;
*Fast and Bandwidth friendly (less data)&lt;br /&gt;
*Display hosts and services with the state of error, warning and ok&lt;br /&gt;
*Hide hosts and services when they are acknowledged or unknown.&lt;br /&gt;
*Additional hide host and services by custom attributes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Requirements=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* Linux, Apache and Perl for the WebUI&lt;br /&gt;
* Access to the Icinga2 API Host&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Screenshots=&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;All hosts and services are running&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-allgood.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Warnings present&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvwarn.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Critical Errors&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvandhosterror.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Warnings and Crticals&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvandhostwarnanderror.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Service List&#039;&#039;&#039;&lt;br /&gt;
[[image:i2mobile-srvlist.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Service Detail&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvdetail.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
&#039;&#039;&#039;Note: The scripts has been tested on Debian 8 with Apache 2.4&#039;&#039;&#039;&lt;br /&gt;
*Get the tar file from the link below&lt;br /&gt;
*Unextract&lt;br /&gt;
*Copy the entire web directory to your www root, in this example we assume: /var/www/i2mobile&lt;br /&gt;
*Make your Apache user owner of the new target directory and files&lt;br /&gt;
*Copy the configuration example to /etc/i2mobile.xml&lt;br /&gt;
*Copy the web config template to /etc/apache2/sites-available/i2mobile.domain.com.conf&lt;br /&gt;
**Configure and rename the web config to your requriements&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*Setup Apache, enable the web site and switch on the cgi module, example:&lt;br /&gt;
 a2ensite i2mobile.domain.com&lt;br /&gt;
 a2enmod cgi&lt;br /&gt;
&lt;br /&gt;
*Install the required perl modules using MCPAN:&lt;br /&gt;
 # perl -MCPAN -e &#039;install REST::Client&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install JSON&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install MIME::Base64&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install Data::Dumper&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install Data::GUID&#039;&lt;br /&gt;
&lt;br /&gt;
=Configure i2Mobile=&lt;br /&gt;
Configuration is done in /etc/i2mobile.xml. These are the minimum settings:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;IcingaHost=&#039;&#039;&#039;URL and Port to the Icinga2 Host&lt;br /&gt;
*&#039;&#039;&#039;Password=&#039;&#039;&#039;The password&lt;br /&gt;
*&#039;&#039;&#039;CookieAuthentication=&#039;&#039;&#039;Optional authentication using a session cookie&lt;br /&gt;
*&#039;&#039;&#039;Contact=&#039;&#039;&#039;Optional contact information&lt;br /&gt;
*&#039;&#039;&#039;URL=&#039;&#039;&#039;=Optional Site URL&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;CONFIG&amp;gt;&lt;br /&gt;
  &amp;lt;System &lt;br /&gt;
   IcingaHost=&amp;quot;https://your.ip.here:5665&amp;quot; &lt;br /&gt;
   Password=&amp;quot;user:123456789&amp;quot; &lt;br /&gt;
   CookieAuthentication=&amp;quot;0&amp;quot; &lt;br /&gt;
   Contact=&amp;quot;you@domain.com&amp;quot; &lt;br /&gt;
   URL=&amp;quot;http://i2mobile.domain.com&amp;quot;&amp;gt;&amp;lt;/System&amp;gt;&lt;br /&gt;
 &amp;lt;/CONFIG&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Thats it, setup is finsihed.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Display options=&lt;br /&gt;
Services and hosts can be hided in i2Mobile, the idea is to show only important information and hide services and hosts which are not interested for the mobile user&lt;br /&gt;
*Service sample&lt;br /&gt;
 apply Service &amp;quot;Something&amp;quot; {&lt;br /&gt;
  ...&lt;br /&gt;
  //this will hide the service from i2Mobile&lt;br /&gt;
  vars.is_ignore = &amp;quot;1&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
*Host sample&lt;br /&gt;
 apply Host &amp;quot;Something&amp;quot; {&lt;br /&gt;
  ...&lt;br /&gt;
  //this will hide the host from i2Mobile&lt;br /&gt;
  vars.is_ignore = &amp;quot;1&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Authentication options=&lt;br /&gt;
Authentication can be established using the Apache htaccess options, however, there is the alternative option to work with session cookies which is &#039;&#039;&#039;less secure&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
but allows the i2Mobile user to access the web quickly with no authentication prompt. The idea of session cookies is to create a GUID, keep it local in i2mobile.xml&lt;br /&gt;
and use it as reference.&amp;lt;br&amp;gt;A helper page is available to add the session cookie on the client mobile browser.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Sample&#039;&#039;&#039;&lt;br /&gt;
*CookieID=&amp;quot;aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&amp;quot;&lt;br /&gt;
*Link to add the session cookie to the client browser:&lt;br /&gt;
**http://i2mobile.domain.com/setsessioncookie.pl?id=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&lt;br /&gt;
**Client can now access the page without additional authentication&lt;br /&gt;
&#039;&#039;&#039;Full configuration sample&#039;&#039;&#039;&lt;br /&gt;
*i2mobile.xml&lt;br /&gt;
 &amp;lt;Authentication &lt;br /&gt;
  Enabled=&amp;quot;1&amp;quot; &lt;br /&gt;
  CookieID=&amp;quot;aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&amp;quot; &lt;br /&gt;
  Name=&amp;quot;John Public&amp;quot; &lt;br /&gt;
  MailTo=&amp;quot;jp@domain.com&amp;quot; &lt;br /&gt;
  Expire=&amp;quot;20180701&amp;quot;&lt;br /&gt;
 &amp;lt;/Authentication&amp;gt;&lt;br /&gt;
From the above sample it is possible to immediate disable the web access by setting Enabled to 0 or set the Expire to yesterday.&amp;lt;br&amp;gt;&lt;br /&gt;
You may also use a small tool called addsc.pl which is available within the web directory, this will add the record to the configuration.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Debugging&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
A status page is available to obtain the validly of the session cookie&lt;br /&gt;
*http://i2mobile.domain.com/env.pl&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 70%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:30%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Download the script&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Version 1.0 - 16KB&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Download.png|60px|link=http://coolscript.org/download/i2mobile.1.0.tar.gz|Download]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|style=&amp;quot;width:70%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;hr&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Feedbacks or comments are very welcome, no matter which direction. Please send to postmaster at coolscript.org&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=I2Mobile&amp;diff=105</id>
		<title>I2Mobile</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=I2Mobile&amp;diff=105"/>
		<updated>2016-06-30T18:22:29Z</updated>

		<summary type="html">&lt;p&gt;Matthias: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
i2Mobile (beta) is a lightweight web interface for Icinga2, designed for mobile clients, running on Apache, it is based on the API (Rest) interface of [https://www.icinga.org/ Icinga2].&amp;lt;br&amp;gt;&lt;br /&gt;
The aim of this is to have a simple, easy and fast client for mobile phones.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{|align=right&lt;br /&gt;
 |__TOC__&lt;br /&gt;
 |}&lt;br /&gt;
&#039;&#039;&#039;Features&#039;&#039;&#039;&lt;br /&gt;
*Using the Icinga2 API to retrieve the status, no more status.cgi&lt;br /&gt;
*Fast and Bandwidth friendly (less data)&lt;br /&gt;
*Display hosts and services with the state of error, warning and ok&lt;br /&gt;
*Hide hosts and services when they are acknowledged or unknown.&lt;br /&gt;
*Additional hide host and services by custom attributes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Requirements=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* Linux, Apache and Perl for the WebUI&lt;br /&gt;
* Access to the Icinga2 API Host&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Screenshots=&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;All hosts and services are running&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-allgood.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Warnings present&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvwarn.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Critical Errors&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvandhosterror.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Warnings and Crticals&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvandhostwarnanderror.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Service List&#039;&#039;&#039;&lt;br /&gt;
[[image:i2mobile-srvlist.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Service Detail&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvdetail.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
&#039;&#039;&#039;Note: The scripts has been tested on Debian 8 with Apache 2.4&#039;&#039;&#039;&lt;br /&gt;
*Get the tar file from the link below&lt;br /&gt;
*Unextract&lt;br /&gt;
*Copy the entire web directory to your www root, in this example we assume: /var/www/i2mobile&lt;br /&gt;
*Make your Apache user owner of the new target directory and files&lt;br /&gt;
*Copy the configuration example to /etc/i2mobile.xml&lt;br /&gt;
*Copy the web config template to /etc/apache2/sites-available/i2mobile.domain.com.conf&lt;br /&gt;
**Configure and rename the web config to your requriements&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*Setup Apache, enable the web site and switch on the cgi module, example:&lt;br /&gt;
 a2ensite i2mobile.domain.com&lt;br /&gt;
 a2enmod cgi&lt;br /&gt;
&lt;br /&gt;
*Install the required perl modules using MCPAN:&lt;br /&gt;
 # perl -MCPAN -e &#039;install REST::Client&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install JSON&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install MIME::Base64&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install Data::Dumper&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install Data::GUID&#039;&lt;br /&gt;
&lt;br /&gt;
=Configure i2Mobile=&lt;br /&gt;
Configuration is done in /etc/i2mobile.xml. These are the minimum settings:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;IcingaHost=&#039;&#039;&#039;URL and Port to the Icinga2 Host&lt;br /&gt;
*&#039;&#039;&#039;Password=&#039;&#039;&#039;The password&lt;br /&gt;
*&#039;&#039;&#039;CookieAuthentication=&#039;&#039;&#039;Optional authentication using a session cookie&lt;br /&gt;
*&#039;&#039;&#039;Contact=&#039;&#039;&#039;Optional contact information&lt;br /&gt;
*&#039;&#039;&#039;URL=&#039;&#039;&#039;=Optional Site URL&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;CONFIG&amp;gt;&lt;br /&gt;
  &amp;lt;System &lt;br /&gt;
   IcingaHost=&amp;quot;https://your.ip.here:5665&amp;quot; &lt;br /&gt;
   Password=&amp;quot;user:123456789&amp;quot; &lt;br /&gt;
   CookieAuthentication=&amp;quot;0&amp;quot; &lt;br /&gt;
   Contact=&amp;quot;you@domain.com&amp;quot; &lt;br /&gt;
   URL=&amp;quot;http://i2mobile.domain.com&amp;quot;&amp;gt;&amp;lt;/System&amp;gt;&lt;br /&gt;
 &amp;lt;/CONFIG&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Thats it, setup is finsihed.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Display options=&lt;br /&gt;
Services and hosts can be hided in i2Mobile, the idea is to show only important information and hide services and hosts which are not interested for the mobile user&lt;br /&gt;
*Service sample&lt;br /&gt;
 apply Service &amp;quot;Something&amp;quot; {&lt;br /&gt;
  ...&lt;br /&gt;
  //this will hide the service from i2Mobile&lt;br /&gt;
  vars.is_ignore = &amp;quot;1&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
*Host sample&lt;br /&gt;
 apply Host &amp;quot;Something&amp;quot; {&lt;br /&gt;
  ...&lt;br /&gt;
  //this will hide the host from i2Mobile&lt;br /&gt;
  vars.is_ignore = &amp;quot;1&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=Authentication options=&lt;br /&gt;
Authentication can be established using the Apache htaccess options, however, there is the alternative option to work with session cookies which is &#039;&#039;&#039;less secure&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
but allows the i2Mobile user to access the web quickly with no authentication prompt. The idea of session cookies is to create a GUID, keep it local in i2mobile.xml&lt;br /&gt;
and use it as reference.&amp;lt;br&amp;gt;A helper page is available to add the session cookie on the client mobile browser.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Sample&#039;&#039;&#039;&lt;br /&gt;
*CookieID=&amp;quot;aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&amp;quot;&lt;br /&gt;
*Link to add the session cookie to the client browser:&lt;br /&gt;
**http://i2mobile.domain.com/setsessioncookie.pl?id=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&lt;br /&gt;
**Client can now access the page without additional authentication&lt;br /&gt;
&#039;&#039;&#039;Full configuration sample&#039;&#039;&#039;&lt;br /&gt;
*i2mobile.xml&lt;br /&gt;
 &amp;lt;Authentication &lt;br /&gt;
  Enabled=&amp;quot;1&amp;quot; &lt;br /&gt;
  CookieID=&amp;quot;aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&amp;quot; &lt;br /&gt;
  Name=&amp;quot;John Public&amp;quot; &lt;br /&gt;
  MailTo=&amp;quot;jp@domain.com&amp;quot; &lt;br /&gt;
  Expire=&amp;quot;20180701&amp;quot;&lt;br /&gt;
 &amp;lt;/Authentication&amp;gt;&lt;br /&gt;
From the above sample it is possible to immediate disable the web access by setting Enabled to 0 or set the Expire to yesterday.&amp;lt;br&amp;gt;&lt;br /&gt;
You may also use a small tool called addsc.pl which is available within the web directory, this will add the record to the configuration.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Debugging&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
A status page is available to obtain the validly of the session cookie&lt;br /&gt;
*http://i2mobile.domain.com/env.pl&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 70%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:30%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Download the script&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Version 1.0 - 16KB&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Download.png|60px|link=http://coolscript.org/download/i2mobile.1.0.tar.gz|Download]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|style=&amp;quot;width:70%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;hr&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Feedbacks or comments are very welcome, no matter which direction. Please send to postmaster at coolscript.org&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=I2Mobile&amp;diff=104</id>
		<title>I2Mobile</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=I2Mobile&amp;diff=104"/>
		<updated>2016-06-30T18:21:54Z</updated>

		<summary type="html">&lt;p&gt;Matthias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
i2Mobile (beta) is a lightweight web interface for Icinga2, designed for mobile clients, running on Apache, it is based on the API (Rest) interface of [https://www.icinga.org/ Icinga2].&amp;lt;br&amp;gt;&lt;br /&gt;
The aim of this is to have a simple, easy and fast client for mobile phones.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{|align=right&lt;br /&gt;
 |__TOC__&lt;br /&gt;
 |}&lt;br /&gt;
&#039;&#039;&#039;Features&#039;&#039;&#039;&lt;br /&gt;
*Using the Icinga2 API to retrieve the status, no more status.cgi&lt;br /&gt;
*Fast and Bandwidth friendly (less data)&lt;br /&gt;
*Display hosts and services with the state of error, warning and ok&lt;br /&gt;
*Hide hosts and services when they are acknowledged or unknown.&lt;br /&gt;
*Additional hide host and services by custom attributes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Requirements=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* Linux, Apache and Perl for the WebUI&lt;br /&gt;
* Access to the Icinga2 API Host&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Screenshots=&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;All hosts and services are running&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-allgood.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Warnings present&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvwarn.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Critical Errors&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvandhosterror.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Warnings and Crticals&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvandhostwarnanderror.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Service List&#039;&#039;&#039;&lt;br /&gt;
[[image:i2mobile-srvlist.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Service Detail&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvdetail.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
&#039;&#039;&#039;Note: The scripts has been tested on Debian 8 with Apache 2.4&#039;&#039;&#039;&lt;br /&gt;
*Get the tar file from the link below&lt;br /&gt;
*Unextract&lt;br /&gt;
*Copy the entire web directory to your www root, in this example /var/www/i2mobile&lt;br /&gt;
*Make your Apache user owner of the new target directory and files&lt;br /&gt;
*Copy the configuration example to /etc/i2mobile.xml&lt;br /&gt;
*Copy the web config template to /etc/apache2/sites-available/i2mobile.domain.com.conf&lt;br /&gt;
**Configure and rename the web config to your requriements&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*Setup Apache, enable the web site and switch on the cgi module, example:&lt;br /&gt;
 a2ensite i2mobile.domain.com&lt;br /&gt;
 a2enmod cgi&lt;br /&gt;
&lt;br /&gt;
*Install the required perl modules using MCPAN:&lt;br /&gt;
 # perl -MCPAN -e &#039;install REST::Client&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install JSON&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install MIME::Base64&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install Data::Dumper&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install Data::GUID&#039;&lt;br /&gt;
&lt;br /&gt;
=Configure i2Mobile=&lt;br /&gt;
Configuration is done in /etc/i2mobile.xml. These are the minimum settings:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;IcingaHost=&#039;&#039;&#039;URL and Port to the Icinga2 Host&lt;br /&gt;
*&#039;&#039;&#039;Password=&#039;&#039;&#039;The password&lt;br /&gt;
*&#039;&#039;&#039;CookieAuthentication=&#039;&#039;&#039;Optional authentication using a session cookie&lt;br /&gt;
*&#039;&#039;&#039;Contact=&#039;&#039;&#039;Optional contact information&lt;br /&gt;
*&#039;&#039;&#039;URL=&#039;&#039;&#039;=Optional Site URL&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;CONFIG&amp;gt;&lt;br /&gt;
  &amp;lt;System &lt;br /&gt;
   IcingaHost=&amp;quot;https://your.ip.here:5665&amp;quot; &lt;br /&gt;
   Password=&amp;quot;user:123456789&amp;quot; &lt;br /&gt;
   CookieAuthentication=&amp;quot;0&amp;quot; &lt;br /&gt;
   Contact=&amp;quot;you@domain.com&amp;quot; &lt;br /&gt;
   URL=&amp;quot;http://i2mobile.domain.com&amp;quot;&amp;gt;&amp;lt;/System&amp;gt;&lt;br /&gt;
 &amp;lt;/CONFIG&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Thats it, setup is finsihed.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Display options=&lt;br /&gt;
Services and hosts can be hided in i2Mobile, the idea is to show only important information and hide services and hosts which are not interested for the mobile user&lt;br /&gt;
*Service sample&lt;br /&gt;
 apply Service &amp;quot;Something&amp;quot; {&lt;br /&gt;
  ...&lt;br /&gt;
  //this will hide the service from i2Mobile&lt;br /&gt;
  vars.is_ignore = &amp;quot;1&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
*Host sample&lt;br /&gt;
 apply Host &amp;quot;Something&amp;quot; {&lt;br /&gt;
  ...&lt;br /&gt;
  //this will hide the host from i2Mobile&lt;br /&gt;
  vars.is_ignore = &amp;quot;1&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=Authentication options=&lt;br /&gt;
Authentication can be established using the Apache htaccess options, however, there is the alternative option to work with session cookies which is &#039;&#039;&#039;less secure&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
but allows the i2Mobile user to access the web quickly with no authentication prompt. The idea of session cookies is to create a GUID, keep it local in i2mobile.xml&lt;br /&gt;
and use it as reference.&amp;lt;br&amp;gt;A helper page is available to add the session cookie on the client mobile browser.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Sample&#039;&#039;&#039;&lt;br /&gt;
*CookieID=&amp;quot;aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&amp;quot;&lt;br /&gt;
*Link to add the session cookie to the client browser:&lt;br /&gt;
**http://i2mobile.domain.com/setsessioncookie.pl?id=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&lt;br /&gt;
**Client can now access the page without additional authentication&lt;br /&gt;
&#039;&#039;&#039;Full configuration sample&#039;&#039;&#039;&lt;br /&gt;
*i2mobile.xml&lt;br /&gt;
 &amp;lt;Authentication &lt;br /&gt;
  Enabled=&amp;quot;1&amp;quot; &lt;br /&gt;
  CookieID=&amp;quot;aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&amp;quot; &lt;br /&gt;
  Name=&amp;quot;John Public&amp;quot; &lt;br /&gt;
  MailTo=&amp;quot;jp@domain.com&amp;quot; &lt;br /&gt;
  Expire=&amp;quot;20180701&amp;quot;&lt;br /&gt;
 &amp;lt;/Authentication&amp;gt;&lt;br /&gt;
From the above sample it is possible to immediate disable the web access by setting Enabled to 0 or set the Expire to yesterday.&amp;lt;br&amp;gt;&lt;br /&gt;
You may also use a small tool called addsc.pl which is available within the web directory, this will add the record to the configuration.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Debugging&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
A status page is available to obtain the validly of the session cookie&lt;br /&gt;
*http://i2mobile.domain.com/env.pl&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 70%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:30%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Download the script&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Version 1.0 - 16KB&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Download.png|60px|link=http://coolscript.org/download/i2mobile.1.0.tar.gz|Download]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|style=&amp;quot;width:70%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;hr&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Feedbacks or comments are very welcome, no matter which direction. Please send to postmaster at coolscript.org&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=File:I2mobile-srvlist.png&amp;diff=103</id>
		<title>File:I2mobile-srvlist.png</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=File:I2mobile-srvlist.png&amp;diff=103"/>
		<updated>2016-06-30T18:20:31Z</updated>

		<summary type="html">&lt;p&gt;Matthias: Matthias uploaded a new version of File:I2mobile-srvlist.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=I2Mobile&amp;diff=102</id>
		<title>I2Mobile</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=I2Mobile&amp;diff=102"/>
		<updated>2016-06-30T18:19:38Z</updated>

		<summary type="html">&lt;p&gt;Matthias: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
i2Mobile (beta) is a lightweight web interface for Icinga2, designed for mobile clients, running on Apache, it is based on the API (Rest) interface of [https://www.icinga.org/ Icinga2].&amp;lt;br&amp;gt;&lt;br /&gt;
The aim of this is to have a simple, easy and fast client for mobile phones.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{|align=right&lt;br /&gt;
 |__TOC__&lt;br /&gt;
 |}&lt;br /&gt;
&#039;&#039;&#039;Features&#039;&#039;&#039;&lt;br /&gt;
*Using the Icinga2 API to retrieve the status, no more status.cgi&lt;br /&gt;
*Fast and Bandwidth friendly (less data)&lt;br /&gt;
*Display hosts and services with the state of error, warning and ok&lt;br /&gt;
*Suppress hosts and services when they are acknowledged or unknown.&lt;br /&gt;
*Additional suppress host and services by custom attributes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Requirements=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* Linux, Apache and Perl for the WebUI&lt;br /&gt;
* Access to the Icinga2 API Host&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Screenshots=&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;All hosts and services are running&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-allgood.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Warnings present&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvwarn.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Critical Errors&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvandhosterror.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Warnings and Crticals&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvandhostwarnanderror.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Service List&#039;&#039;&#039;&lt;br /&gt;
[[image:i2mobile-srvlist.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Service Detail&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvdetail.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
&#039;&#039;&#039;Note: The scripts has been tested on Debian 8 with Apache 2.4&#039;&#039;&#039;&lt;br /&gt;
*Get the tar file from the link below&lt;br /&gt;
*Unextract&lt;br /&gt;
*Copy the entire web directory to your www root, in this example /var/www/i2mobile&lt;br /&gt;
*Make your Apache user owner of the new target directory and files&lt;br /&gt;
*Copy the configuration example to /etc/i2mobile.xml&lt;br /&gt;
*Copy the web config template to /etc/apache2/sites-available/i2mobile.domain.com.conf&lt;br /&gt;
**Configure and rename the web config to your requriements&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*Setup Apache, enable the web site and switch on the cgi module, example:&lt;br /&gt;
 a2ensite i2mobile.domain.com&lt;br /&gt;
 a2enmod cgi&lt;br /&gt;
&lt;br /&gt;
*Install the required perl modules using MCPAN:&lt;br /&gt;
 # perl -MCPAN -e &#039;install REST::Client&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install JSON&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install MIME::Base64&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install Data::Dumper&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install Data::GUID&#039;&lt;br /&gt;
&lt;br /&gt;
=Configure i2Mobile=&lt;br /&gt;
Configuration is done in /etc/i2mobile.xml. These are the minimum settings:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;IcingaHost=&#039;&#039;&#039;URL and Port to the Icinga2 Host&lt;br /&gt;
*&#039;&#039;&#039;Password=&#039;&#039;&#039;The password&lt;br /&gt;
*&#039;&#039;&#039;CookieAuthentication=&#039;&#039;&#039;Optional authentication using a session cookie&lt;br /&gt;
*&#039;&#039;&#039;Contact=&#039;&#039;&#039;Optional contact information&lt;br /&gt;
*&#039;&#039;&#039;URL=&#039;&#039;&#039;=Optional Site URL&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;CONFIG&amp;gt;&lt;br /&gt;
  &amp;lt;System &lt;br /&gt;
   IcingaHost=&amp;quot;https://your.ip.here:5665&amp;quot; &lt;br /&gt;
   Password=&amp;quot;user:123456789&amp;quot; &lt;br /&gt;
   CookieAuthentication=&amp;quot;0&amp;quot; &lt;br /&gt;
   Contact=&amp;quot;you@domain.com&amp;quot; &lt;br /&gt;
   URL=&amp;quot;http://i2mobile.domain.com&amp;quot;&amp;gt;&amp;lt;/System&amp;gt;&lt;br /&gt;
 &amp;lt;/CONFIG&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Thats it, setup is finsihed.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Display options=&lt;br /&gt;
Services and hosts can be hided in i2Mobile, the idea is to show only important information and hide services and hosts which are not interested for the mobile user&lt;br /&gt;
*Service sample&lt;br /&gt;
 apply Service &amp;quot;Something&amp;quot; {&lt;br /&gt;
  ...&lt;br /&gt;
  //this will hide the service from i2Mobile&lt;br /&gt;
  vars.is_ignore = &amp;quot;1&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
*Host sample&lt;br /&gt;
 apply Host &amp;quot;Something&amp;quot; {&lt;br /&gt;
  ...&lt;br /&gt;
  //this will hide the host from i2Mobile&lt;br /&gt;
  vars.is_ignore = &amp;quot;1&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=Authentication options=&lt;br /&gt;
Authentication can be established using the Apache htaccess options, however, there is the alternative option to work with session cookies which is &#039;&#039;&#039;less secure&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
but allows the i2Mobile user to access the web quickly with no authentication prompt. The idea of session cookies is to create a GUID, keep it local in i2mobile.xml&lt;br /&gt;
and use it as reference.&amp;lt;br&amp;gt;A helper page is available to add the session cookie on the client mobile browser.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Sample&#039;&#039;&#039;&lt;br /&gt;
*CookieID=&amp;quot;aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&amp;quot;&lt;br /&gt;
*Link to add the session cookie to the client browser:&lt;br /&gt;
**http://i2mobile.domain.com/setsessioncookie.pl?id=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&lt;br /&gt;
**Client can now access the page without additional authentication&lt;br /&gt;
&#039;&#039;&#039;Full configuration sample&#039;&#039;&#039;&lt;br /&gt;
*i2mobile.xml&lt;br /&gt;
 &amp;lt;Authentication &lt;br /&gt;
  Enabled=&amp;quot;1&amp;quot; &lt;br /&gt;
  CookieID=&amp;quot;aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&amp;quot; &lt;br /&gt;
  Name=&amp;quot;John Public&amp;quot; &lt;br /&gt;
  MailTo=&amp;quot;jp@domain.com&amp;quot; &lt;br /&gt;
  Expire=&amp;quot;20180701&amp;quot;&lt;br /&gt;
 &amp;lt;/Authentication&amp;gt;&lt;br /&gt;
From the above sample it is possible to immediate disable the web access by setting Enabled to 0 or set the Expire to yesterday.&amp;lt;br&amp;gt;&lt;br /&gt;
You may also use a small tool called addsc.pl which is available within the web directory, this will add the record to the configuration.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Debugging&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
A status page is available to obtain the validly of the session cookie&lt;br /&gt;
*http://i2mobile.domain.com/env.pl&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 70%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:30%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Download the script&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Version 1.0 - 16KB&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Download.png|60px|link=http://coolscript.org/download/i2mobile.1.0.tar.gz|Download]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|style=&amp;quot;width:70%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;hr&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Feedbacks or comments are very welcome, no matter which direction. Please send to postmaster at coolscript.org&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=Main_Page&amp;diff=101</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=Main_Page&amp;diff=101"/>
		<updated>2016-06-30T18:16:06Z</updated>

		<summary type="html">&lt;p&gt;Matthias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Welcome to Coolscript&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
These are just a few scripts which you may use for your IT-System purposes. This site is almost new and more scripts will follow soon.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| Logrotation and file archive management script: || &#039;&#039;&#039;[[Logd]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Eventlog to Firewall script for Windows 2008: || &#039;&#039;&#039;[[Eventlog to Firewall]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Syslog to Firewall script for Linux: || &#039;&#039;&#039;[[Syslog_to_Firewall]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Scheduled Task for Windows: || &#039;&#039;&#039;[[Scheduled Task for Windows]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Spamassassin Plugin for Geo purposes: || &#039;&#039;&#039;[[GeoMailSearch]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Raspberry Projects || &#039;&#039;&#039;[[RaspberryProjects]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| PSAD to Iptables: || &#039;&#039;&#039;[[psad2ipt]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Icinga2 Web Interface for Smartphones || &#039;&#039;&#039;[[i2Mobile]]&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
My other sites which might be useful&lt;br /&gt;
{|&lt;br /&gt;
| All about IP 4/6 and locations to lat/lon: || http://coolgeo.org&lt;br /&gt;
|-&lt;br /&gt;
|   The Coolgeo XML API Wiki: || http://wiki.coolgeo.org&lt;br /&gt;
|-&lt;br /&gt;
| Another password creator || http://coolpassword.org&lt;br /&gt;
|-&lt;br /&gt;
| Analyze your mail header: || http://mailheader.org&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Questions, feedback or recommendations are welcome, drop me a mail to postmaster at coolscript.org.&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=Main_Page&amp;diff=100</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=Main_Page&amp;diff=100"/>
		<updated>2016-06-30T18:14:55Z</updated>

		<summary type="html">&lt;p&gt;Matthias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Welcome to Coolscript&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
These are just a few scripts which you may use for your IT-System purposes. This site is almost new and more scripts will follow soon.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| Logrotation and file archive management script: || &#039;&#039;&#039;[[Logd]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Eventlog to Firewall script for Windows 2008: || &#039;&#039;&#039;[[Eventlog to Firewall]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Syslog to Firewall script for Linux: || &#039;&#039;&#039;[[Syslog_to_Firewall]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Scheduled Task for Windows: || &#039;&#039;&#039;[[Scheduled Task for Windows]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Spamassassin Plugin for Geo purposes: || &#039;&#039;&#039;[[GeoMailSearch]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Raspberry Projects || &#039;&#039;&#039;[[RaspberryProjects]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| PSAD to Iptables: || &#039;&#039;&#039;[[psad2ipt]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Icinga2 Web Interface for Smartphones || &#039;&#039;&#039;[[i2Mobile]]&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
My other sites which might be useful&lt;br /&gt;
{|&lt;br /&gt;
| All about IP 4/6 and locations to lat/lon: || http://coolgeo.org&lt;br /&gt;
|-&lt;br /&gt;
|   The Coolgeo XML API Wiki: || http://wiki.coolgeo.org&lt;br /&gt;
|-&lt;br /&gt;
| Another password creator || http://coolpassword.org&lt;br /&gt;
|-&lt;br /&gt;
| Analyze your mail header: || http://mailheader.org&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Questions, feedback or recommendations are welcome, drop a mail to postmaster at coolscript.org.&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=Main_Page&amp;diff=99</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=Main_Page&amp;diff=99"/>
		<updated>2016-06-30T17:56:39Z</updated>

		<summary type="html">&lt;p&gt;Matthias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Welcome to Coolscript&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
These are just a few scripts which you may use for your IT-System purposes. This site is almost new and more scripts will follow soon.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| Logrotation and file archive management script: || &#039;&#039;&#039;[[Logd]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Eventlog to Firewall script for Windows 2008: || &#039;&#039;&#039;[[Eventlog to Firewall]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Syslog to Firewall script for Linux: || &#039;&#039;&#039;[[Syslog_to_Firewall]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Scheduled Task for Windows: || &#039;&#039;&#039;[[Scheduled Task for Windows]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Spamassassin Plugin for Geo purposes: || &#039;&#039;&#039;[[GeoMailSearch]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Raspberry Projects || &#039;&#039;&#039;[[RaspberryProjects]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| PSAD to Iptables: || &#039;&#039;&#039;[[psad2ipt]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Icinga2 Web Interface for Smartphones || &#039;&#039;&#039;[[i2Mobile]]&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Questions, feedback or recommendations are welcome, mailto postmaster at coolscript.org.&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=Main_Page&amp;diff=98</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=Main_Page&amp;diff=98"/>
		<updated>2016-06-30T17:56:22Z</updated>

		<summary type="html">&lt;p&gt;Matthias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Welcome to Coolscript&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
These are just a few scripts which you may use for your IT-System purposes. This site is new and more scripts will follow soon.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| Logrotation and file archive management script: || &#039;&#039;&#039;[[Logd]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Eventlog to Firewall script for Windows 2008: || &#039;&#039;&#039;[[Eventlog to Firewall]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Syslog to Firewall script for Linux: || &#039;&#039;&#039;[[Syslog_to_Firewall]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Scheduled Task for Windows: || &#039;&#039;&#039;[[Scheduled Task for Windows]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Spamassassin Plugin for Geo purposes: || &#039;&#039;&#039;[[GeoMailSearch]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Raspberry Projects || &#039;&#039;&#039;[[RaspberryProjects]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| PSAD to Iptables: || &#039;&#039;&#039;[[psad2ipt]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Icinga2 Web Interface for Smartphones || &#039;&#039;&#039;[[i2Mobile]]&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Questions, feedback or recommendations are welcome, mailto postmaster at coolscript.org.&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=Main_Page&amp;diff=97</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=Main_Page&amp;diff=97"/>
		<updated>2016-06-30T17:49:51Z</updated>

		<summary type="html">&lt;p&gt;Matthias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Welcome to Coolscript&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Bla&lt;br /&gt;
These are just a few scripts which you may use for your IT-System purposes. This site is new and more scripts will follow soon.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| Logrotation and file archive management script: || &#039;&#039;&#039;[[Logd]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Eventlog to Firewall script for Windows 2008: || &#039;&#039;&#039;[[Eventlog to Firewall]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Syslog to Firewall script for Linux: || &#039;&#039;&#039;[[Syslog_to_Firewall]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Scheduled Task for Windows: || &#039;&#039;&#039;[[Scheduled Task for Windows]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Spamassassin Plugin for Geo purposes: || &#039;&#039;&#039;[[GeoMailSearch]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Raspberry Projects || &#039;&#039;&#039;[[RaspberryProjects]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| PSAD to Iptables: || &#039;&#039;&#039;[[psad2ipt]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Icinga2 Web Interface for Smartphones || &#039;&#039;&#039;[[i2Mobile]]&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Questions, feedback or recommendations are welcome, mailto postmaster at coolscript.org.&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=I2Mobile&amp;diff=96</id>
		<title>I2Mobile</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=I2Mobile&amp;diff=96"/>
		<updated>2016-06-30T14:46:24Z</updated>

		<summary type="html">&lt;p&gt;Matthias: /* Screenshots */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
i2Mobile (beta) is a lightweight web interface for Icinga2, designed for mobile clients, running on Apache, it is based on the API (Rest) interface of [https://www.icinga.org/ Icinga2].&amp;lt;br&amp;gt;&lt;br /&gt;
The aim of this is to have a simple, easy and fast client for mobile phones.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{|align=right&lt;br /&gt;
 |__TOC__&lt;br /&gt;
 |}&lt;br /&gt;
&#039;&#039;&#039;Features&#039;&#039;&#039;&lt;br /&gt;
*Using the Icinga2 API to retrieve the status, no more status.cgi&lt;br /&gt;
*Fast and Bandwidth friendly (less data)&lt;br /&gt;
*Display hosts and services with the state of error, warning and ok&lt;br /&gt;
*Suppress hosts and services when they are acknowledged or unknown.&lt;br /&gt;
*Additional suppress host and services by custom attributes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Requirements=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* Linux, Apache and Perl for the WebUI&lt;br /&gt;
* Access to the Icinga2 API Host&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Screenshots=&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;All hosts and services are running&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-allgood.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Warnings present&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvwarn.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Critical Errors&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvandhosterror.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Warnings and Crticals&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvandhostwarnanderror.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Service List&#039;&#039;&#039;&lt;br /&gt;
[[image:i2mobile-srvlist.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Service Detail&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvdetail.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
&#039;&#039;&#039;Note: The scripts has been tested on Debian 8 with Apache 2.4&#039;&#039;&#039;&lt;br /&gt;
*Get the tar file from the link below&lt;br /&gt;
*Unextract&lt;br /&gt;
*Copy the entire web directory to your www root, in this example /var/www/i2mobile&lt;br /&gt;
*Make your Apache user of the new target directory and files&lt;br /&gt;
*Copy the configuration example to /etc/i2mobile.xml&lt;br /&gt;
*Copy the web config template to /etc/apache2/sites-available/i2mobile.domain.com.conf&lt;br /&gt;
**Configure and rename the web config to your requriements&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*Setup Apache, enable the web site and switch on the cgi module, example:&lt;br /&gt;
 a2ensite i2mobile.domain.com&lt;br /&gt;
 a2enmod cgi&lt;br /&gt;
&lt;br /&gt;
*Install the required perl modules using MCPAN:&lt;br /&gt;
 # perl -MCPAN -e &#039;install REST::Client&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install JSON&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install MIME::Base64&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install Data::Dumper&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install Data::GUID&#039;&lt;br /&gt;
=Configure i2Mobile=&lt;br /&gt;
Configuration is done in /etc/i2mobile.xml. These are the minimum settings:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;IcingaHost=&#039;&#039;&#039;URL and Port to the Icinga2 Host&lt;br /&gt;
*&#039;&#039;&#039;Password=&#039;&#039;&#039;The password&lt;br /&gt;
*&#039;&#039;&#039;CookieAuthentication=&#039;&#039;&#039;Optional authentication using a session cookie&lt;br /&gt;
*&#039;&#039;&#039;Contact=&#039;&#039;&#039;Optional contact information&lt;br /&gt;
*&#039;&#039;&#039;URL=&#039;&#039;&#039;=Optional Site URL&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;CONFIG&amp;gt;&lt;br /&gt;
  &amp;lt;System &lt;br /&gt;
   IcingaHost=&amp;quot;https://your.ip.here:5665&amp;quot; &lt;br /&gt;
   Password=&amp;quot;user:123456789&amp;quot; &lt;br /&gt;
   CookieAuthentication=&amp;quot;0&amp;quot; &lt;br /&gt;
   Contact=&amp;quot;you@domain.com&amp;quot; &lt;br /&gt;
   URL=&amp;quot;http://i2mobile.domain.com&amp;quot;&amp;gt;&amp;lt;/System&amp;gt;&lt;br /&gt;
 &amp;lt;/CONFIG&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Thats it, setup is finsihed.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Display options=&lt;br /&gt;
Services and hosts can be hided in i2Mobile, the idea is to show only important information and hide services and hosts which are not interested for the mobile user&lt;br /&gt;
*Service sample&lt;br /&gt;
 apply Service &amp;quot;Something&amp;quot; {&lt;br /&gt;
  ...&lt;br /&gt;
  //this will hide the service from i2Mobile&lt;br /&gt;
  vars.is_ignore = &amp;quot;1&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
*Host sample&lt;br /&gt;
 apply Host &amp;quot;Something&amp;quot; {&lt;br /&gt;
  ...&lt;br /&gt;
  //this will hide the host from i2Mobile&lt;br /&gt;
  vars.is_ignore = &amp;quot;1&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=Authentication options=&lt;br /&gt;
Authentication can be established using the Apache htaccess options, however, there is the alternative option to work with session cookies which is &#039;&#039;&#039;less secure&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
but allows the i2Mobile user to access the web quickly with no authentication prompt. The idea of session cookies is to create a GUID, keep it local in i2mobile.xml&lt;br /&gt;
and use it as reference.&amp;lt;br&amp;gt;A helper page is available to add the session cookie on the client mobile browser.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Sample&#039;&#039;&#039;&lt;br /&gt;
*CookieID=&amp;quot;aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&amp;quot;&lt;br /&gt;
*Link to add the session cookie to the client browser:&lt;br /&gt;
**http://i2mobile.domain.com/setsessioncookie.pl?id=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&lt;br /&gt;
**Client can now access the page without additional authentication&lt;br /&gt;
&#039;&#039;&#039;Full configuration sample&#039;&#039;&#039;&lt;br /&gt;
*i2mobile.xml&lt;br /&gt;
 &amp;lt;Authentication &lt;br /&gt;
  Enabled=&amp;quot;1&amp;quot; &lt;br /&gt;
  CookieID=&amp;quot;aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&amp;quot; &lt;br /&gt;
  Name=&amp;quot;John Public&amp;quot; &lt;br /&gt;
  MailTo=&amp;quot;jp@domain.com&amp;quot; &lt;br /&gt;
  Expire=&amp;quot;20180701&amp;quot;&lt;br /&gt;
 &amp;lt;/Authentication&amp;gt;&lt;br /&gt;
From the above sample it is possible to immediate disable the web access by setting Enabled to 0 or set the Expire to yesterday.&amp;lt;br&amp;gt;&lt;br /&gt;
You may also use a small tool called addsc.pl which is available within the web directory, this will add the record to the configuration.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Debugging&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
A status page is available to obtain the validly of the session cookie&lt;br /&gt;
*http://i2mobile.domain.com/env.pl&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 70%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:30%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Download the script&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Version 1.0 - 16KB&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Download.png|60px|link=http://coolscript.org/download/i2mobile.1.0.tar.gz|Download]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|style=&amp;quot;width:70%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;hr&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Feedbacks or comments are very welcome, no matter which direction. Please send to postmaster at coolscript.org&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=File:I2mobile-srvlist.png&amp;diff=95</id>
		<title>File:I2mobile-srvlist.png</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=File:I2mobile-srvlist.png&amp;diff=95"/>
		<updated>2016-06-30T14:45:22Z</updated>

		<summary type="html">&lt;p&gt;Matthias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=I2Mobile&amp;diff=94</id>
		<title>I2Mobile</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=I2Mobile&amp;diff=94"/>
		<updated>2016-06-30T14:44:19Z</updated>

		<summary type="html">&lt;p&gt;Matthias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
i2Mobile (beta) is a lightweight web interface for Icinga2, designed for mobile clients, running on Apache, it is based on the API (Rest) interface of [https://www.icinga.org/ Icinga2].&amp;lt;br&amp;gt;&lt;br /&gt;
The aim of this is to have a simple, easy and fast client for mobile phones.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{|align=right&lt;br /&gt;
 |__TOC__&lt;br /&gt;
 |}&lt;br /&gt;
&#039;&#039;&#039;Features&#039;&#039;&#039;&lt;br /&gt;
*Using the Icinga2 API to retrieve the status, no more status.cgi&lt;br /&gt;
*Fast and Bandwidth friendly (less data)&lt;br /&gt;
*Display hosts and services with the state of error, warning and ok&lt;br /&gt;
*Suppress hosts and services when they are acknowledged or unknown.&lt;br /&gt;
*Additional suppress host and services by custom attributes&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Requirements=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
* Linux, Apache and Perl for the WebUI&lt;br /&gt;
* Access to the Icinga2 API Host&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Screenshots=&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;All hosts and services are running&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-allgood.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Warnings present&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvwarn.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Critical Errors&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvandhosterror.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Warnings and Crticals&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvandhostwarnanderror.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Service List&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvlist.png|320px|left]]&lt;br /&gt;
|style=&amp;quot;width:40%; vertical-align: top;&amp;quot;|&lt;br /&gt;
*&#039;&#039;&#039;Service Detail&#039;&#039;&#039;&lt;br /&gt;
[[image:I2mobile-srvdetail.png|320px|left]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=Installation=&lt;br /&gt;
&#039;&#039;&#039;Note: The scripts has been tested on Debian 8 with Apache 2.4&#039;&#039;&#039;&lt;br /&gt;
*Get the tar file from the link below&lt;br /&gt;
*Unextract&lt;br /&gt;
*Copy the entire web directory to your www root, in this example /var/www/i2mobile&lt;br /&gt;
*Make your Apache user of the new target directory and files&lt;br /&gt;
*Copy the configuration example to /etc/i2mobile.xml&lt;br /&gt;
*Copy the web config template to /etc/apache2/sites-available/i2mobile.domain.com.conf&lt;br /&gt;
**Configure and rename the web config to your requriements&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
*Setup Apache, enable the web site and switch on the cgi module, example:&lt;br /&gt;
 a2ensite i2mobile.domain.com&lt;br /&gt;
 a2enmod cgi&lt;br /&gt;
&lt;br /&gt;
*Install the required perl modules using MCPAN:&lt;br /&gt;
 # perl -MCPAN -e &#039;install REST::Client&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install JSON&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install MIME::Base64&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install Data::Dumper&#039;&lt;br /&gt;
 # perl -MCPAN -e &#039;install Data::GUID&#039;&lt;br /&gt;
=Configure i2Mobile=&lt;br /&gt;
Configuration is done in /etc/i2mobile.xml. These are the minimum settings:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;IcingaHost=&#039;&#039;&#039;URL and Port to the Icinga2 Host&lt;br /&gt;
*&#039;&#039;&#039;Password=&#039;&#039;&#039;The password&lt;br /&gt;
*&#039;&#039;&#039;CookieAuthentication=&#039;&#039;&#039;Optional authentication using a session cookie&lt;br /&gt;
*&#039;&#039;&#039;Contact=&#039;&#039;&#039;Optional contact information&lt;br /&gt;
*&#039;&#039;&#039;URL=&#039;&#039;&#039;=Optional Site URL&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;CONFIG&amp;gt;&lt;br /&gt;
  &amp;lt;System &lt;br /&gt;
   IcingaHost=&amp;quot;https://your.ip.here:5665&amp;quot; &lt;br /&gt;
   Password=&amp;quot;user:123456789&amp;quot; &lt;br /&gt;
   CookieAuthentication=&amp;quot;0&amp;quot; &lt;br /&gt;
   Contact=&amp;quot;you@domain.com&amp;quot; &lt;br /&gt;
   URL=&amp;quot;http://i2mobile.domain.com&amp;quot;&amp;gt;&amp;lt;/System&amp;gt;&lt;br /&gt;
 &amp;lt;/CONFIG&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Thats it, setup is finsihed.&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Display options=&lt;br /&gt;
Services and hosts can be hided in i2Mobile, the idea is to show only important information and hide services and hosts which are not interested for the mobile user&lt;br /&gt;
*Service sample&lt;br /&gt;
 apply Service &amp;quot;Something&amp;quot; {&lt;br /&gt;
  ...&lt;br /&gt;
  //this will hide the service from i2Mobile&lt;br /&gt;
  vars.is_ignore = &amp;quot;1&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
*Host sample&lt;br /&gt;
 apply Host &amp;quot;Something&amp;quot; {&lt;br /&gt;
  ...&lt;br /&gt;
  //this will hide the host from i2Mobile&lt;br /&gt;
  vars.is_ignore = &amp;quot;1&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=Authentication options=&lt;br /&gt;
Authentication can be established using the Apache htaccess options, however, there is the alternative option to work with session cookies which is &#039;&#039;&#039;less secure&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
but allows the i2Mobile user to access the web quickly with no authentication prompt. The idea of session cookies is to create a GUID, keep it local in i2mobile.xml&lt;br /&gt;
and use it as reference.&amp;lt;br&amp;gt;A helper page is available to add the session cookie on the client mobile browser.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Sample&#039;&#039;&#039;&lt;br /&gt;
*CookieID=&amp;quot;aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&amp;quot;&lt;br /&gt;
*Link to add the session cookie to the client browser:&lt;br /&gt;
**http://i2mobile.domain.com/setsessioncookie.pl?id=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&lt;br /&gt;
**Client can now access the page without additional authentication&lt;br /&gt;
&#039;&#039;&#039;Full configuration sample&#039;&#039;&#039;&lt;br /&gt;
*i2mobile.xml&lt;br /&gt;
 &amp;lt;Authentication &lt;br /&gt;
  Enabled=&amp;quot;1&amp;quot; &lt;br /&gt;
  CookieID=&amp;quot;aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&amp;quot; &lt;br /&gt;
  Name=&amp;quot;John Public&amp;quot; &lt;br /&gt;
  MailTo=&amp;quot;jp@domain.com&amp;quot; &lt;br /&gt;
  Expire=&amp;quot;20180701&amp;quot;&lt;br /&gt;
 &amp;lt;/Authentication&amp;gt;&lt;br /&gt;
From the above sample it is possible to immediate disable the web access by setting Enabled to 0 or set the Expire to yesterday.&amp;lt;br&amp;gt;&lt;br /&gt;
You may also use a small tool called addsc.pl which is available within the web directory, this will add the record to the configuration.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Debugging&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
A status page is available to obtain the validly of the session cookie&lt;br /&gt;
*http://i2mobile.domain.com/env.pl&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 70%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:30%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Download the script&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Version 1.0 - 16KB&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Download.png|60px|link=http://coolscript.org/download/i2mobile.1.0.tar.gz|Download]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|style=&amp;quot;width:70%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;hr&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Feedbacks or comments are very welcome, no matter which direction. Please send to postmaster at coolscript.org&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=Main_Page&amp;diff=93</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=Main_Page&amp;diff=93"/>
		<updated>2016-06-30T14:43:54Z</updated>

		<summary type="html">&lt;p&gt;Matthias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Welcome to Coolscript&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Bla&lt;br /&gt;
These are just a few scripts which you may use for your IT-System purposes. This site is new and more scripts will follow soon.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| Logrotation and file archive management script: || &#039;&#039;&#039;[[Logd]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Eventlog to Firewall script for Windows 2008: || &#039;&#039;&#039;[[Eventlog to Firewall]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Syslog to Firewall script for Linux: || &#039;&#039;&#039;[[Syslog_to_Firewall]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Scheduled Task for Windows: || &#039;&#039;&#039;[[Scheduled Task for Windows]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Spamassassin Plugin for Geo purposes: || &#039;&#039;&#039;[[GeoMailSearch]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Raspberry Projects || &#039;&#039;&#039;[[RaspberryProjects]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Icinga2 Web Interface for Smartphones || &#039;&#039;&#039;[[i2Mobile]]&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Questions, feedback or recommendations are welcome, mailto postmaster at coolscript.org.&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=Main_Page&amp;diff=92</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=Main_Page&amp;diff=92"/>
		<updated>2016-06-30T14:43:00Z</updated>

		<summary type="html">&lt;p&gt;Matthias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Welcome to Coolscript&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Bla&lt;br /&gt;
These are just a few scripts which you may use for your IT-System purposes. This site is new and more scripts will follow soon.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| Logrotation and file archive management script: || &#039;&#039;&#039;[[Logd]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Eventlog to Firewall script for Windows 2008: || &#039;&#039;&#039;[[Eventlog to Firewall]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Syslog to Firewall script for Linux: || &#039;&#039;&#039;[[Syslog_to_Firewall]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Scheduled Task for Windows: || &#039;&#039;&#039;[[Scheduled Task for Windows]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Spamassassin Plugin for Geo purposes: || &#039;&#039;&#039;[[GeoMailSearch]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Raspberry Projects || &#039;&#039;&#039;[[RaspberryProjects]]&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Questions, feedback or recommendations are welcome.&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=Main_Page&amp;diff=91</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=Main_Page&amp;diff=91"/>
		<updated>2016-06-30T14:42:11Z</updated>

		<summary type="html">&lt;p&gt;Matthias: Reverted edits by Matthias (talk) to last revision by 217.233.207.1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Welcome to Coolscript&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Bla&lt;br /&gt;
These are just a few scripts which you may use for your IT-System purposes. This site is new and more scripts will follow soon.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| Logrotation and file archive management script: || &#039;&#039;&#039;[[Logd]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Eventlog to Firewall script for Windows 2008: || &#039;&#039;&#039;[[Eventlog to Firewall]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Syslog to Firewall script for Linux: || &#039;&#039;&#039;[[Syslog_to_Firewall]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Scheduled Task for Windows: || &#039;&#039;&#039;[[Scheduled Task for Windows]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Spamassassin Plugin for Geo purposes: || &#039;&#039;&#039;[[GeoMailSearch]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Raspberry Projects || &#039;&#039;&#039;[[RaspberryProjects]]&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Questions, feedback or recommendations are welcome, please use the  	&lt;br /&gt;
[[Special:Contact|Contact]] page to do this.&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=I2Mobile&amp;diff=90</id>
		<title>I2Mobile</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=I2Mobile&amp;diff=90"/>
		<updated>2016-06-30T14:41:00Z</updated>

		<summary type="html">&lt;p&gt;Matthias: Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;Welcome to Coolscript&amp;#039;&amp;#039;&amp;#039;   These are just a few scripts which you may use for your IT-System purposes. This site is new and more scripts will follow soon.  {| | Logrotation...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Welcome to Coolscript&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These are just a few scripts which you may use for your IT-System purposes. This site is new and more scripts will follow soon.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| Logrotation and file archive management script: || &#039;&#039;&#039;[[Logd]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Eventlog to Firewall script for Windows 2008: || &#039;&#039;&#039;[[Eventlog to Firewall]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Authentication and Syslog to Firewall script for Linux: || &#039;&#039;&#039;[[Syslog_to_Firewall]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| PSAD to Iptables: || &#039;&#039;&#039;[[psad2ipt]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Scheduled Task for Windows: || &#039;&#039;&#039;[[Scheduled Task for Windows]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Spamassassin Plugin for Geo purposes: || &#039;&#039;&#039;[[GeoMailSearch]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Icinga2 Web Interface for Smartphones || &#039;&#039;&#039;[[i2Mobile]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Autoresponse for Sendmail || &#039;&#039;&#039;[[Autoresponse]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Raspberry Projects || &#039;&#039;&#039;[[RaspberryProjects]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*See [[Mail redirect hacks]]&lt;br /&gt;
&lt;br /&gt;
Questions, feedback or recommendations are welcome, please use the  	&lt;br /&gt;
[[Special:Contact|Contact]] page to do this.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;PROJECT RECOMMENDATION:&#039;&#039;&#039;Add  a script to automatic white ip a dyndns address from iptables&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=Main_Page&amp;diff=89</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=Main_Page&amp;diff=89"/>
		<updated>2016-06-30T14:40:47Z</updated>

		<summary type="html">&lt;p&gt;Matthias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Welcome to Coolscript&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
These are just a few scripts which you may use for your IT-System purposes. This site is new and more scripts will follow soon.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| Logrotation and file archive management script: || &#039;&#039;&#039;[[Logd]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Eventlog to Firewall script for Windows 2008: || &#039;&#039;&#039;[[Eventlog to Firewall]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Syslog to Firewall script for Linux: || &#039;&#039;&#039;[[Syslog_to_Firewall]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Scheduled Task for Windows: || &#039;&#039;&#039;[[Scheduled Task for Windows]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Spamassassin Plugin for Geo purposes: || &#039;&#039;&#039;[[GeoMailSearch]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Raspberry Projects || &#039;&#039;&#039;[[RaspberryProjects]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| PSAD to Iptables: || &#039;&#039;&#039;[[psad2ipt]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Icinga2 Web Interface for Smartphones || &#039;&#039;&#039;[[i2Mobile]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Questions, feedback or recommendations are welcome, please use the  	&lt;br /&gt;
[[Special:Contact|Contact]] page to do this.&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=File:I2mobile-srvwarn.png&amp;diff=88</id>
		<title>File:I2mobile-srvwarn.png</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=File:I2mobile-srvwarn.png&amp;diff=88"/>
		<updated>2016-06-29T19:48:30Z</updated>

		<summary type="html">&lt;p&gt;Matthias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=File:I2mobile-srvdetail.png&amp;diff=87</id>
		<title>File:I2mobile-srvdetail.png</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=File:I2mobile-srvdetail.png&amp;diff=87"/>
		<updated>2016-06-29T19:48:23Z</updated>

		<summary type="html">&lt;p&gt;Matthias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=File:I2mobile-srvandhostwarnanderror.png&amp;diff=86</id>
		<title>File:I2mobile-srvandhostwarnanderror.png</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=File:I2mobile-srvandhostwarnanderror.png&amp;diff=86"/>
		<updated>2016-06-29T19:48:15Z</updated>

		<summary type="html">&lt;p&gt;Matthias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=File:I2mobile-srvandhosterror.png&amp;diff=85</id>
		<title>File:I2mobile-srvandhosterror.png</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=File:I2mobile-srvandhosterror.png&amp;diff=85"/>
		<updated>2016-06-29T19:48:08Z</updated>

		<summary type="html">&lt;p&gt;Matthias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=File:I2mobile-allgood.png&amp;diff=84</id>
		<title>File:I2mobile-allgood.png</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=File:I2mobile-allgood.png&amp;diff=84"/>
		<updated>2016-06-29T19:47:59Z</updated>

		<summary type="html">&lt;p&gt;Matthias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=Main_Page&amp;diff=83</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=Main_Page&amp;diff=83"/>
		<updated>2016-05-06T18:13:34Z</updated>

		<summary type="html">&lt;p&gt;Matthias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Welcome to Coolscript&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
These are just a few scripts which you may use for your IT-System purposes. This site is new and more scripts will follow soon.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| Logrotation and file archive management script: || &#039;&#039;&#039;[[Logd]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Eventlog to Firewall script for Windows 2008: || &#039;&#039;&#039;[[Eventlog to Firewall]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Syslog to Firewall script for Linux: || &#039;&#039;&#039;[[Syslog_to_Firewall]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Scheduled Task for Windows: || &#039;&#039;&#039;[[Scheduled Task for Windows]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| PSAD to Iptables: || &#039;&#039;&#039;[[psad2ipt]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Spamassassin Plugin for Geo purposes: || &#039;&#039;&#039;[[GeoMailSearch]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Raspberry Projects || &#039;&#039;&#039;[[RaspberryProjects]]&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Questions, feedback or recommendations are welcome, please use the  	&lt;br /&gt;
[[Special:Contact|Contact]] page to do this.&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=Psad2ipt&amp;diff=82</id>
		<title>Psad2ipt</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=Psad2ipt&amp;diff=82"/>
		<updated>2016-05-06T18:13:04Z</updated>

		<summary type="html">&lt;p&gt;Matthias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is an easy and small script to allow customized drop rules on your iptables Firewall to protect against intruders on your network. &amp;lt;br&amp;gt;&lt;br /&gt;
The script follows the same approach then [http://coolscript.org/index.php/Syslog_to_Firewall &#039;&#039;&#039;Syslog to Firewall&#039;&#039;&#039;] but runs on Linux  together with [http://www.netfilter.org/ iptables] and [http://cipherdyne.org/psad/ psad].&amp;lt;br&amp;gt;&lt;br /&gt;
Finally this goes into the direction of a [https://en.wikipedia.org/wiki/Intrusion_prevention_system IPS]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Environment=&lt;br /&gt;
Psad2ipt has been tested on Linux Debian 8 (Jessie) but should run on any other recent Linux Distribution too.&lt;br /&gt;
=Basic Features=&lt;br /&gt;
*Provides a easy [https://en.wikipedia.org/wiki/Intrusion_prevention_system IPS] based on [https://en.wikipedia.org/wiki/Open-source_software OSS] for nuts!&lt;br /&gt;
*It runs on it&#039;s own, no additional server software is required (such as [https://en.wikipedia.org/wiki/LAMP_%28software_bundle%29 LAMP]), only [http://perl.com/ Perl] with a few additional [http://www.cpan.org/ Modules] is needed.&lt;br /&gt;
*Sqlite3 is used (that&#039;s based on a flat file) to allow to cope a large activity with psad2ipt.&lt;br /&gt;
*Dynamic ramp up the drop time, an intruder get first blocked by default with 15, then 30, 60, 120 and so on minutes on every occurrence of an event.&lt;br /&gt;
*Tight ip address checking to avoid false blockings, psad2ipt does not want to get blamed.&lt;br /&gt;
*Optional reporting into a [http://splunk.com Splunk] server.&lt;br /&gt;
*Stateless, ipt records will be added if they are missing (eg after a global flush)&lt;br /&gt;
*&#039;&#039;&#039;Blame protection&#039;&#039;&#039; - never block private IP addresses&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Advanced Features=&lt;br /&gt;
*IP to Country mapping, this requires &#039;&#039;&#039;geoip.db&#039;&#039;&#039;&lt;br /&gt;
**Optional overwrite lock times for configured countries&lt;br /&gt;
*Whitelist support, this requires additional files&lt;br /&gt;
**Never lock any IP address appearing on an whitelist&lt;br /&gt;
*Blacklist support, this requires additional files&lt;br /&gt;
**Block any IP address appearing on an blacklist, Note that the Whitelist overrules the Blacklist if records are matching&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Setup and Operation description=&lt;br /&gt;
Pad2ipt runs on it&#039;s own iptables chain to add or remove malicious ip addresses which has been identified by psad.&amp;lt;br&amp;gt;&lt;br /&gt;
The iptables chain must be present at runtime [abort if not] so creating the Psad2ipt chain is a essential step to do first.&amp;lt;br&amp;gt;&lt;br /&gt;
If psad2ipt get&#039;s called by psad then it takes immediatly action and blocks the ip by adding a iptables rule into it previous assigned chain.&amp;lt;br&amp;gt;&lt;br /&gt;
The rule is using the state connection module to identify incoming packages only and requires the outside interface name to specify the direction,&amp;lt;br&amp;gt;&lt;br /&gt;
this way it should be a &#039;&#039;&#039;save drop rule&#039;&#039;&#039; to avoid false blockings. We also offer a whitelist function to prevent wrong data assignment.&amp;lt;br&amp;gt;&lt;br /&gt;
However, psad2ipt will never add private ip addresses into it&#039;s chain, even if specified to do so.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Installation=&lt;br /&gt;
Download and extract the archive to /usr/local/psad2ipt, a different path is possible by setup the configuration file.&lt;br /&gt;
==List of files==&lt;br /&gt;
*psad2ipt.pl - Script&lt;br /&gt;
*psad2ipt.xml - Configuration&lt;br /&gt;
*psad2ipt.db - Database&lt;br /&gt;
*geoip.db - Optional IP to Country Code Database&lt;br /&gt;
&lt;br /&gt;
==Install Perl Modules==&lt;br /&gt;
*This will work with Debian&lt;br /&gt;
 apt-get install libipc-run-perl&lt;br /&gt;
 apt-get install libproc-processtable-perl&lt;br /&gt;
 apt-get install libdbi-perl&lt;br /&gt;
 apt-get install libdbd-sqlite3-perl &lt;br /&gt;
 cpan Net::Syslog&lt;br /&gt;
=Setup=&lt;br /&gt;
==Setup psad2ipt==&lt;br /&gt;
*Edit &#039;&#039;&#039;psad2ipt.xml&#039;&#039;&#039;&lt;br /&gt;
{| style=&amp;quot;border: 1px solid #FFF0C0;&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;psad2ipt.xml&#039;&#039;&#039;&lt;br /&gt;
|-----&lt;br /&gt;
! align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffff99&amp;quot; style=&amp;quot;padding:5px;&amp;quot;| XML Child Element      &lt;br /&gt;
! align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffff99&amp;quot; style=&amp;quot;padding:5px;&amp;quot;| XML Attribute&lt;br /&gt;
! align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffff99&amp;quot; style=&amp;quot;padding:5px;&amp;quot;| Value&lt;br /&gt;
|-----&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px: 1px solid #F3F781; &amp;quot;|&lt;br /&gt;
SETTINGS&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
Chain&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
Chain Name to be used with psad2ipt, the default is &#039;&#039;&#039;P2I&#039;&#039;&#039;&lt;br /&gt;
|-----&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px: 1px solid #F3F781; &amp;quot;|&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
MaxEvents&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
Maximum events with a single IP addrress,&amp;lt;br&amp;gt; &lt;br /&gt;
this is a counter which counts until the amount has been reached before blocking this ip address. &amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The default is 1&#039;&#039;&#039;&lt;br /&gt;
|-----&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px: 1px solid #F3F781; &amp;quot;|&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
LookBehind&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
Number of Days where psad2ipt looks behind to get get amount of events for the specified ip address&amp;lt;br&amp;gt;&lt;br /&gt;
This values is used when running psad2ipt with the options &#039;&#039;&#039;-A&#039;&#039;&#039; and &#039;&#039;&#039;-C&#039;&#039;&#039;&lt;br /&gt;
|-----&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px: 1px solid #F3F781; &amp;quot;|&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
MaxRules&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
Flood protection: Maximum number of rules allowed within the iptables / psad2ipt chain, abort if exceed&lt;br /&gt;
|-----&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px: 1px solid #F3F781; &amp;quot;|&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
MaxRecords&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
Flood protection: Maximum records the database may conatin, abort if exceed&lt;br /&gt;
&lt;br /&gt;
|-----&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px: 1px solid #F3F781; &amp;quot;|&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
BaseLock&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
This is the startup amount of mintes which psad2ipt will use when it&#039;s get called with the option &#039;&#039;&#039;-A&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
The unit is &#039;&#039;&#039;Minutes&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
The default is 15 Minutes&amp;lt;br&amp;gt;&lt;br /&gt;
The amount will dynamically increase on every event, first 15, then 30, 60, 120 and so on&lt;br /&gt;
|-----&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px: 1px solid #F3F781; &amp;quot;|&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
UseSyslog&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
If set to &#039;&#039;&#039;1&#039;&#039;&#039; then psad2ipt will write into syslog to localhost using UDP 514,&amp;lt;br&amp;gt;&lt;br /&gt;
Note that this needs to be setup within the syslog daemon configuration before for doing this&lt;br /&gt;
|-----&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px: 1px solid #F3F781; &amp;quot;|&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
DBFile&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
Path to DB File, this is needed to be used with option &#039;&#039;&#039;-c&#039;&#039;&#039;&lt;br /&gt;
|-----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px: 1px solid #F3F781; &amp;quot;|&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
GeoIP&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
Optional Ip to Country Code Database&lt;br /&gt;
|-----&lt;br /&gt;
&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px: 1px solid #F3F781; &amp;quot;|&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
LogPath&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
If &#039;&#039;&#039;UseSyslog&#039;&#039;&#039; equals 0 then the specified path is used to wrtie the psa2ipt log files&lt;br /&gt;
|-----&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px: 1px solid #F3F781; &amp;quot;|&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
WhiteListPath&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
Path to be used for reading whitelist files&lt;br /&gt;
&lt;br /&gt;
|-----&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px: 1px solid #F3F781; &amp;quot;|&lt;br /&gt;
Country (Array)&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
Code&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
ISO Country Code&lt;br /&gt;
|-----&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px: 1px solid #F3F781; &amp;quot;|&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
BlockTime&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
The time to replace BaseLock&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Setup iptables==&lt;br /&gt;
To setup iptable it is essential to define the rule, example for the default rule &#039;P2I&#039;&lt;br /&gt;
 /sbin/iptables -N P2I&lt;br /&gt;
Note that the chain will have no affect unless it has been assigned to the INPUT or FORWARD rule of iptables.&amp;lt;br&amp;gt;&lt;br /&gt;
Assigning the chain:&lt;br /&gt;
 /sbin/iptables -A INPUT -j P2I&lt;br /&gt;
 /sbin/iptables -A FORWARD -j P2I&lt;br /&gt;
*Note that the assignment must be placed after the rule creation and before the default drop chain/rule&lt;br /&gt;
&lt;br /&gt;
==Setup syslog==&lt;br /&gt;
If syslog should be used then this setup can hel to divert messages into an own log file&lt;br /&gt;
*/etc/rsyslog.conf&lt;br /&gt;
 if $programname == &#039;psad2ipt.pl&#039; then /var/log/psad2ipt.log&lt;br /&gt;
 :programname, isequal,  &amp;quot;psad2ipt.pl&amp;quot;  ~&lt;br /&gt;
 #pass tabs and others to syslog&lt;br /&gt;
 $EscapeControlCharactersOnReceive off&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==White List Path==&lt;br /&gt;
psad2ipt is using whitelist files from the configuration value &#039;&#039;&#039;WhiteListPath&#039;&#039;&#039;, every file within path&amp;lt;br&amp;gt;&lt;br /&gt;
using the extension &#039;&#039;&#039;.conf&#039;&#039;&#039; will be automatically read.&amp;lt;br&amp;gt;&lt;br /&gt;
Sample Record:&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;text-align:left; background:#eeeeee;&amp;quot; border=&amp;quot;1&amp;quot; &lt;br /&gt;
|-style=&amp;quot;background:#aaaaaa&amp;quot;&lt;br /&gt;
! Item !! Equivalent CIDR&lt;br /&gt;
|- style=&amp;quot;color:black;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| 123 || 123.0.0.0/8&lt;br /&gt;
|-&lt;br /&gt;
| 123.19 || 123.19.0.0/16&lt;br /&gt;
|-&lt;br /&gt;
| 123.19.20 || 123.19.20.0/24&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==psad.conf==&lt;br /&gt;
*Example of enable script, path and param, per alert.&lt;br /&gt;
 ENABLE_EXT_SCRIPT_EXEC      Y;&lt;br /&gt;
 EXTERNAL_SCRIPT              /usr/local/psad2ipt/psad2ipt.pl -c /usr/local/psad2ipt/psad2ipt.xml -A SRCIP;&lt;br /&gt;
 EXEC_EXT_SCRIPT_PER_ALERT   Y;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Cron job==&lt;br /&gt;
*Example cron job, check psad2ipt each minute and run database maintenance once a motnh&lt;br /&gt;
 */1 * * * *  /usr/local/psad2ipt/psad2ipt.pl -c /usr/local/psad2ipt/psad2ipt.xml -C&lt;br /&gt;
 @monthly  /usr/local/psad2ipt/psad2ipt.pl -c /usr/local/psad2ipt/psad2ipt.xml -VkE 190&lt;br /&gt;
&lt;br /&gt;
=Running psad2ipt=&lt;br /&gt;
psad2ipt can be applied with the following option:&lt;br /&gt;
*Check the inventory, delete expired addresses from the chain, use the configuration option to allow this command to be allowed from everywhere else then our home directory&lt;br /&gt;
 #/psad2ipt -C -c /usr/local/psad2ipt/psad2ipt.xml&lt;br /&gt;
*Check the inventory, delete expired addresses from the chain&lt;br /&gt;
 /usr/local/psad2ipt #./psad2ipt -C&lt;br /&gt;
*Add the sample address (1.2.3.4) to the specified chain &#039;&#039;&#039;(P2I)&#039;&#039;&#039;, this is done immediately.&lt;br /&gt;
 /usr/local/psad2ipt #./psad2ipt -A 1.2.3.4&lt;br /&gt;
*List the database records&lt;br /&gt;
 /usr/local/psad2ipt #./psad2ipt -l&lt;br /&gt;
*List the database records, show active records only&lt;br /&gt;
 /usr/local/psad2ipt #./psad2ipt -l -e&lt;br /&gt;
*List the database records, list by ip address&lt;br /&gt;
 /usr/local/psad2ipt #./psad2ipt -l -i x.x.x.x&lt;br /&gt;
*Delete a single ip address from the environment&lt;br /&gt;
 /usr/local/psad2ipt #./psad2ipt -D 1.2.3.4&lt;br /&gt;
*Flush the database&lt;br /&gt;
 /usr/local/psad2ipt #./psad2ipt -F&lt;br /&gt;
*Vacuum/Shrink the database&lt;br /&gt;
 /usr/local/psad2ipt #./psad2ipt -V&lt;br /&gt;
*Delete records older then 200 days&lt;br /&gt;
 /usr/local/psad2ipt #./psad2ipt -E 200&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
*Example rule in chain P2I&lt;br /&gt;
 root@xx-xx01:/usr/local/psad2ipt# iptables -L P2I -n&lt;br /&gt;
 Chain P2I (1 references)&lt;br /&gt;
 target     prot opt source               destination&lt;br /&gt;
 DROP       all  --  11.1.2.5             0.0.0.0/0            state NEW /* Dynamic rule by P2I at 2016-02-19 19:16:02 */&lt;br /&gt;
&lt;br /&gt;
*Example Syslog records&lt;br /&gt;
 M=P2I A=ADD2IPT LCK=1 W=0 IP=71.6.167.142 LTIME=960 SEEN=6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| style=&amp;quot;width: 70%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:10%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Download the script&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Download.png|60px|link=http://coolscript.org/download/psad2ipt.zip|Download]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|style=&amp;quot;width:90%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=Main_Page&amp;diff=81</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=Main_Page&amp;diff=81"/>
		<updated>2016-02-26T20:23:50Z</updated>

		<summary type="html">&lt;p&gt;Matthias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Welcome to Coolscript&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
These are just a few scripts which you may use for your IT-System purposes. This site is new and more scripts will follow soon.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| Logrotation and file archive management script: || &#039;&#039;&#039;[[Logd]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Eventlog to Firewall script for Windows 2008: || &#039;&#039;&#039;[[Eventlog to Firewall]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Syslog to Firewall script for Linux: || &#039;&#039;&#039;[[Syslog_to_Firewall]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Scheduled Task for Windows: || &#039;&#039;&#039;[[Scheduled Task for Windows]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Spamassassin Plugin for Geo purposes: || &#039;&#039;&#039;[[GeoMailSearch]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Raspberry Projects || &#039;&#039;&#039;[[RaspberryProjects]]&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Questions, feedback or recommendations are welcome, please use the  	&lt;br /&gt;
[[Special:Contact|Contact]] page to do this.&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=Main_Page&amp;diff=72</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=Main_Page&amp;diff=72"/>
		<updated>2016-02-20T20:41:04Z</updated>

		<summary type="html">&lt;p&gt;Matthias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Welcome to Coolscript&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These are just a few scripts which you may use for your IT-System purposes. This site is new and more scripts will follow soon.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| Logrotation and file archive management script: || &#039;&#039;&#039;[[Logd]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Eventlog to Firewall script for Windows 2008: || &#039;&#039;&#039;[[Eventlog to Firewall]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Syslog to Firewall script for Linux: || &#039;&#039;&#039;[[Syslog_to_Firewall]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Psad to Firewall script for Linux: || &#039;&#039;&#039;[[Psad]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Scheduled Task for Windows: || &#039;&#039;&#039;[[Scheduled Task for Windows]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Spamassassin Plugin for Geo purposes: || &#039;&#039;&#039;[[GeoMailSearch]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Raspberry Projects || &#039;&#039;&#039;[[RaspberryProjects]]&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Questions, feedback or recommendations are welcome, please use the  	&lt;br /&gt;
[[Special:Contact|Contact]] page to do this.&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=Psad&amp;diff=71</id>
		<title>Psad</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=Psad&amp;diff=71"/>
		<updated>2016-02-20T20:39:56Z</updated>

		<summary type="html">&lt;p&gt;Matthias: Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;DRAFT&amp;#039;&amp;#039;&amp;#039; - &amp;#039;&amp;#039;&amp;#039;DRAFT&amp;#039;&amp;#039;&amp;#039;  - &amp;#039;&amp;#039;&amp;#039;DRAFT&amp;#039;&amp;#039;&amp;#039;  - &amp;#039;&amp;#039;&amp;#039;DRAFT&amp;#039;&amp;#039;&amp;#039;  - &amp;#039;&amp;#039;&amp;#039;DRAFT&amp;#039;&amp;#039;&amp;#039; - &amp;#039;&amp;#039;&amp;#039;Coming soon&amp;#039;&amp;#039;&amp;#039;  This is an easy and small script to allow customized drop rules on your iptables Fi...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;DRAFT&#039;&#039;&#039; - &#039;&#039;&#039;DRAFT&#039;&#039;&#039;  - &#039;&#039;&#039;DRAFT&#039;&#039;&#039;  - &#039;&#039;&#039;DRAFT&#039;&#039;&#039;  - &#039;&#039;&#039;DRAFT&#039;&#039;&#039; - &#039;&#039;&#039;Coming soon&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This is an easy and small script to allow customized drop rules on your iptables Firewall to protect against intruders on your network. &amp;lt;br&amp;gt;&lt;br /&gt;
The script follows the same approach then [http://coolscript.org/index.php/Syslog_to_Firewall &#039;&#039;&#039;Syslog to Firewall&#039;&#039;&#039;] but runs on Linux  together with [http://www.netfilter.org/ iptables] and [http://cipherdyne.org/psad/ psad].&amp;lt;br&amp;gt;&lt;br /&gt;
Finally this goes into the direction of a [https://en.wikipedia.org/wiki/Intrusion_prevention_system IPS]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Environment=&lt;br /&gt;
Psad2ipt has been tested on Linux Debian 8 (Jessie) but should run on any other recent Linux Distribution too.&lt;br /&gt;
=Features=&lt;br /&gt;
*Provides a easy [https://en.wikipedia.org/wiki/Intrusion_prevention_system IPS] based on [https://en.wikipedia.org/wiki/Open-source_software OSS] for nuts!&lt;br /&gt;
*It runs on it&#039;s own, no additional server software is required (such as [https://en.wikipedia.org/wiki/LAMP_%28software_bundle%29 LAMP]), only [http://perl.com/ Perl] with a few additional [http://www.cpan.org/ Modules] is needed.&lt;br /&gt;
*Sqlite3 is used (that&#039;s based on a flat file) to allow to cope a large activity with psad2ipt.&lt;br /&gt;
*Dynamic ramp up the drop time, an intruder get first blocked by default with 15, then 30, 60, 120 and so on minutes on every occurrence of an event.&lt;br /&gt;
*Tight ip address checking to avoid false blockings, psad2ipt does not want to get blamed.&lt;br /&gt;
*Optional reporting into a [http://splunk.com Splunk] server.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Setup and Operation description=&lt;br /&gt;
Pad2ipt runs on it&#039;s own iptables chain to add or remove malicious ip addresses which has been identified by psad.&amp;lt;br&amp;gt;&lt;br /&gt;
The iptables chain must be present at runtime [abort if not] so creating the Psad2ipt chain is a essential step to do first.&amp;lt;br&amp;gt;&lt;br /&gt;
If psad2ipt get&#039;s called by psad then it takes immediatly action and blocks the ip by adding a iptables rule into it previous assigned chain.&amp;lt;br&amp;gt;&lt;br /&gt;
The rule is using the state connection module to identify incoming packages only and requires the outside interface name to specify the direction,&amp;lt;br&amp;gt;&lt;br /&gt;
this way it should be a &#039;&#039;&#039;save drop rule&#039;&#039;&#039; to avoid false blockings. We also offer a whitelist function to prevent wrong data assignment.&amp;lt;br&amp;gt;&lt;br /&gt;
However, psad2ipt will never add private ip addresses into it&#039;s chain, even if specified to do so.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=Installation=&lt;br /&gt;
Download and extract the archive to /usr/local/psad2ipt, a different path is possible by setup the configuration file.&lt;br /&gt;
==List of files==&lt;br /&gt;
*psad2ipt.pl - Script&lt;br /&gt;
*psad2ipt.xml - Configuration&lt;br /&gt;
*psad2ipt.db - Database&lt;br /&gt;
==Install Perl Modules==&lt;br /&gt;
*This will work with Debian&lt;br /&gt;
 apt-get install libipc-run-perl&lt;br /&gt;
 apt-get install libproc-processtable-perl&lt;br /&gt;
 apt-get install libdbi-perl&lt;br /&gt;
 apt-get install libdbd-sqlite3-perl &lt;br /&gt;
 cpan Net::Syslog&lt;br /&gt;
=Setup=&lt;br /&gt;
==Setup psad2ipt==&lt;br /&gt;
*Edit &#039;&#039;&#039;psad2ipt.xml&#039;&#039;&#039;&lt;br /&gt;
{| style=&amp;quot;border: 1px solid #FFF0C0;&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;psad2ipt.xml&#039;&#039;&#039;&lt;br /&gt;
|-----&lt;br /&gt;
! align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffff99&amp;quot; style=&amp;quot;padding:5px;&amp;quot;| XML Child Element      &lt;br /&gt;
! align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffff99&amp;quot; style=&amp;quot;padding:5px;&amp;quot;| XML Attribute&lt;br /&gt;
! align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffff99&amp;quot; style=&amp;quot;padding:5px;&amp;quot;| Value&lt;br /&gt;
|-----&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px: 1px solid #F3F781; &amp;quot;|&lt;br /&gt;
SETTINGS&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
Chain&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
Chain Name to be used with psad2ipt, the default is P2I&lt;br /&gt;
|-----&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px: 1px solid #F3F781; &amp;quot;|&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
MaxEvents&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
Maximum events with a single IP addrress,&amp;lt;br&amp;gt; &lt;br /&gt;
this is a counter which counts until the amount has been reached before blocking this ip address. &amp;lt;br&amp;gt;&lt;br /&gt;
The default is 1&lt;br /&gt;
|-----&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px: 1px solid #F3F781; &amp;quot;|&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
MaxDBDays&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
Maximum days of events which is keeped within the database, older records will be deleted&lt;br /&gt;
|-----&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px: 1px solid #F3F781; &amp;quot;|&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
LookBehind&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
Number of Days where psad2ipt looks behind to get get amount of events for the specified ip address&amp;lt;br&amp;gt;&lt;br /&gt;
This values is used when running psad2ipt with the options &#039;&#039;&#039;-A&#039;&#039;&#039; and &#039;&#039;&#039;-C&#039;&#039;&#039;&lt;br /&gt;
|-----&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px: 1px solid #F3F781; &amp;quot;|&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
MaxRules&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
Used for flooding prevention, it is the maximum number of rules allowed within the psad2ipt chain&lt;br /&gt;
|-----&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px: 1px solid #F3F781; &amp;quot;|&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
BaseLock&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
This is the startup amount of mintes which psad2ipt will use when it&#039;s get called with the option &#039;&#039;&#039;-A&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
The unit is &#039;&#039;&#039;Minutes&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
The default is 15 Minutes&amp;lt;br&amp;gt;&lt;br /&gt;
The amount will dynamically increase on every event, first 15, then 30, 60, 120 and so on&lt;br /&gt;
|-----&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px: 1px solid #F3F781; &amp;quot;|&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
UseSyslog&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
If set to &#039;&#039;&#039;1&#039;&#039;&#039; then psad2ipt will write into syslog to localhost using UDP 514,&amp;lt;br&amp;gt;&lt;br /&gt;
Note that this needs to be setup within the syslog daemon configuration before for doing this&lt;br /&gt;
|-----&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px: 1px solid #F3F781; &amp;quot;|&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
DBFile&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
Path to DB File, this is needed to be used with option &#039;&#039;&#039;-c&#039;&#039;&#039;&lt;br /&gt;
|-----&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px: 1px solid #F3F781; &amp;quot;|&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
LogPath&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
If &#039;&#039;&#039;UseSyslog&#039;&#039;&#039; equals 0 then the specified path is used to wrtie the psa2ipt log files&lt;br /&gt;
|-----&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px: 1px solid #F3F781; &amp;quot;|&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
WhiteListPath&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
Path to be used for reading whitelist files&lt;br /&gt;
|-----&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px: 1px solid #F3F781; &amp;quot;|&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
OutsideInterface&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
Required: Name of outsite interface name, for exampe &#039;&#039;&#039;eth0&#039;&#039;&#039;, this value has no default!&lt;br /&gt;
|-----&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px: 1px solid #F3F781; &amp;quot;|&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
SplunkServer&lt;br /&gt;
| align=&amp;quot;left&amp;quot; valign=&amp;quot;top&amp;quot; bgcolor=&amp;quot;#ffffff&amp;quot; style=&amp;quot;padding:5px; border: 1px solid #F3F781;&amp;quot;|&lt;br /&gt;
IP address of the splunk server where psad2ipt is sending messages to UDP 514&lt;br /&gt;
|}&lt;br /&gt;
==Setup iptables==&lt;br /&gt;
To setup iptable it is essential to define the rule, example for the default rule &#039;P2I&#039;&lt;br /&gt;
 /sbin/iptables -N P2I&lt;br /&gt;
Note that the chain will have no affect unless it has been assigned to the INPUT or FORWARD rule of iptables.&amp;lt;br&amp;gt;&lt;br /&gt;
Assigning the chain:&lt;br /&gt;
 /sbin/iptables -A INPUT -j P2I&lt;br /&gt;
 /sbin/iptables -A FORWARD -j P2I&lt;br /&gt;
*Note that the assignment must be placed after the rule creation and before the default drop chain/rule&lt;br /&gt;
==Running psad2ipt==&lt;br /&gt;
psad2ipt can be applied with the following option:&lt;br /&gt;
*Check the inventory, delete expired addresses from the chain, use the configuration option to allow this command to be allowed from everywhere else then our home directory&lt;br /&gt;
 #/psad2ipt -C -c /usr/local/psad2ipt/psad2ipt.xml&lt;br /&gt;
*Check the inventory, delete expired addresses from the chain&lt;br /&gt;
 /usr/local/psad2ipt #./psad2ipt -C&lt;br /&gt;
*Add the sample address (1.2.3.4) to the specified chain &#039;&#039;&#039;(P2I)&#039;&#039;&#039;, this is done immediately.&lt;br /&gt;
 /usr/local/psad2ipt #./psad2ipt -A 1.2.3.4&lt;br /&gt;
*List the database records&lt;br /&gt;
 /usr/local/psad2ipt #./psad2ipt -l&lt;br /&gt;
*Delete a single ip address from the environment&lt;br /&gt;
 /usr/local/psad2ipt #./psad2ipt -D 1.2.3.4&lt;br /&gt;
*Flush the database&lt;br /&gt;
 /usr/local/psad2ipt #./psad2ipt -F&lt;br /&gt;
&lt;br /&gt;
=Examples=&lt;br /&gt;
*Example rule in chain P21&lt;br /&gt;
 root@rb-mk01:/usr/local/psad2ipt# iptables -L P2I -n&lt;br /&gt;
 Chain P2I (1 references)&lt;br /&gt;
 target     prot opt source               destination&lt;br /&gt;
 DROP       all  --  11.1.2.5             0.0.0.0/0            state NEW /* Dynamic rule by P2I at 2016-02-19 19:16:02 */&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=Main_Page&amp;diff=70</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=Main_Page&amp;diff=70"/>
		<updated>2016-02-20T20:39:43Z</updated>

		<summary type="html">&lt;p&gt;Matthias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Welcome to Coolscript&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These are just a few scripts which you may use for your IT-System purposes. This site is new and more scripts will follow soon.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| Logrotation and file archive management script: || &#039;&#039;&#039;[[Logd]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Eventlog to Firewall script for Windows 2008: || &#039;&#039;&#039;[[Eventlog to Firewall]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Syslog to Firewall script for Linux: || &#039;&#039;&#039;[[Syslog_to_Firewall]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Psad to Firewall script for Linux: || &#039;&#039;&#039;[[psad]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Scheduled Task for Windows: || &#039;&#039;&#039;[[Scheduled Task for Windows]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Spamassassin Plugin for Geo purposes: || &#039;&#039;&#039;[[GeoMailSearch]]&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Raspberry Projects || &#039;&#039;&#039;[[RaspberryProjects]]&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Questions, feedback or recommendations are welcome, please use the  	&lt;br /&gt;
[[Special:Contact|Contact]] page to do this.&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=Scheduled_Task_for_Windows&amp;diff=65</id>
		<title>Scheduled Task for Windows</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=Scheduled_Task_for_Windows&amp;diff=65"/>
		<updated>2016-02-05T11:16:37Z</updated>

		<summary type="html">&lt;p&gt;Matthias: /* About */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=About=&lt;br /&gt;
This is an alternative and easy way to run scheduled tasks on Windows. It is useful to workaround access or group policy restrictions, for example if your group policy logs you out after a short period and you want your scheduled tasks keep on running. &amp;lt;br&amp;gt;&lt;br /&gt;
The script has been tested to run as service using &#039;&#039;&#039;srvany.exe&#039;&#039;&#039; but it is possible to run the script in a common way &lt;br /&gt;
(eg: perl st.pl -c path/configfile) but we intend to run it as service.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Features=&lt;br /&gt;
*Can run scheduled programs every minute, hour, day or week&lt;br /&gt;
*Protocol events in a xml file&lt;br /&gt;
*Log all activities&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Requirements=&lt;br /&gt;
*MS Windows 7 or higher or Server2012 or higher&lt;br /&gt;
*srvany.exe (to run the script as service)&lt;br /&gt;
*Active State Perl &amp;gt;= 5.14 or Strawberry Perl &amp;gt;=5.22&lt;br /&gt;
*Additional Modules:&lt;br /&gt;
**Win32::Process&lt;br /&gt;
**Win32::Process::List&lt;br /&gt;
**Date::Manip&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
Uncompress and copy the files to a directory of you your choice, this example is using c:\scheduled-task&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
These are the required script files:&lt;br /&gt;
*c:\scheduled-task\st.pl&lt;br /&gt;
*c:\scheduled-task\st.xml&lt;br /&gt;
&lt;br /&gt;
There is a optional plugin for Nagios / Icinga available, please see:&lt;br /&gt;
*check_st.pl&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Perl Modules==&lt;br /&gt;
It is possible to use either Active State or Strawberry Perl&lt;br /&gt;
===Active State===&lt;br /&gt;
You need to have a recent version of active state perl installed, when done please run the following installation commands.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that Active State doesn&#039;t allow Date-Manip to be installed with it&#039;s recent community version as of December 2015.&lt;br /&gt;
 ppm install Win32-Process&lt;br /&gt;
 ppm install Win32-Process-list&lt;br /&gt;
 ppm install Date-Manip&lt;br /&gt;
&lt;br /&gt;
===Strawberry===&lt;br /&gt;
Run &#039;&#039;&#039;cpan&#039;&#039;&#039; first to get the installation shell.&lt;br /&gt;
 cpan&amp;gt; &#039;&#039;&#039;install Win32:Process:List&#039;&#039;&#039;&lt;br /&gt;
 cpan&amp;gt; &#039;&#039;&#039;install Date:Manip&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Service==&lt;br /&gt;
Note: It is possible to install the service with or without a service description.&lt;br /&gt;
&lt;br /&gt;
===Service Registration===&lt;br /&gt;
Get the tool srvany.exe and copy it to c:\windows\system32\, then register the service by running:&lt;br /&gt;
 sc create Perl-Scheduled-Task binPath= C:\Windows\System32\srvany.exe DisplayName= Perl-Scheduled-Task&lt;br /&gt;
&lt;br /&gt;
Optional you may want to set a description for the service:&lt;br /&gt;
 sc description Perl-Scheduled-Task &amp;quot;Schedule Task Manager for Perl&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Please don&#039;t forget to set enough permissions for the new task.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Service Configuration===&lt;br /&gt;
Open your registry and add the key &#039;&#039;&#039;Parmeters&#039;&#039;&#039;:&lt;br /&gt;
 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Perl-Scheduled-Task\&#039;&#039;&#039;Parameters&#039;&#039;&#039;]&lt;br /&gt;
*Add a string value called &#039;&#039;&#039;Application&#039;&#039;&#039; within &#039;&#039;&#039;Parameters&#039;&#039;&#039; and add the path to perl and the path to the script:&lt;br /&gt;
 &amp;quot;Application&amp;quot;=&amp;quot;c:\\perl\\bin\\perl.exe c:\\scheduled-task\\st.pl -c c:\\scheduled-task\\st.xml&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Check your service permission, make sure the service user has enough permissions to start applications and has edit and create right in its application directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Script Configuration==&lt;br /&gt;
Description of the configuration file used with st.pl. &amp;lt;br&amp;gt;&lt;br /&gt;
Note: Please use the forward slash as a directory separator like on linux even on windows, this way we get no trouble with escape sequences.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Default Filename: &#039;&#039;&#039;st.xml&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Security information:&#039;&#039;&#039; Please keep this file secure, only authorized accounts should be able to edit the configuration file.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable &amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;st.xml&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Element&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Array&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Attribute&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| System || No || ApplicationDirectory || Path to appliactaion &lt;br /&gt;
|-&lt;br /&gt;
|  || || StatusFile || Path and Name to Status File, leave empty or set zero to disable&lt;br /&gt;
|-&lt;br /&gt;
|  || || Log || Switch on logging (0/1)&lt;br /&gt;
|-&lt;br /&gt;
|  || || LogAge || Maximum logfile age (days) before deleting them.&lt;br /&gt;
|-&lt;br /&gt;
|  || || LogDirectory || Path to Log Directory&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| ScheduledTask || Yes || Enabled || Job enable (1/0)&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || Name || Any Jobname&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || ApplicationPath || Path to perl, eg: c:/perl64/bin/perl.exe&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || ApplicationParameter || Path to the script, eg: c:/scheduled-task/st.xml&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || ApplicationPriority || Available: &#039;&#039;&#039;Below&#039;&#039;&#039; or  &#039;&#039;&#039;Normal&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || Mode || Currently only &#039;&#039;&#039;Repeat&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyUnit   || M=Every Minute &amp;lt;br&amp;gt; D=Daily &amp;lt;br&amp;gt; W=Weekly&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyInterval || Only with Mode=M, the interval in minutes for the scheduled task&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyOffset || Only with Mode=M, adding minutes to the next scheduled task&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyTime || Only with Mode=D or W, the time (HH:MM) for the scheduled task&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyDay || Only with Mode=W, a csv list of the weekday for the scheduled task&amp;lt;br&amp;gt;The following abbrevitions can be used, capitals or ordering do not matter&amp;lt;br&amp;gt;Mo,Tu,We,Th,Fr,Sa,Su&amp;lt;br&amp;gt;Mon,Tue,Wed,Thu,Fri,Sat,Sun&amp;lt;br&amp;gt;Monday,Tuesday,Wednesday,Thuesday,Friday,Saturday,Sunday&amp;lt;br&amp;gt;0,1,2,3,4,5,6&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || IsUnique || (0/1) Specify if the job is allowed to run once only.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
*Run 2 Jobs every 5 and every 20 minutes.&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;CONFIG&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Sample config, logging has been switched off !--&amp;gt;	&lt;br /&gt;
  &amp;lt;System&lt;br /&gt;
   ApplicationDirectory=&amp;quot;c:/demo/scheduled-task/&amp;quot;&lt;br /&gt;
   StatusFile=&amp;quot;0&amp;quot;&lt;br /&gt;
   Log=&amp;quot;0&amp;quot;&lt;br /&gt;
   LogAge=&amp;quot;0&amp;quot;&lt;br /&gt;
   LogDirectory=&amp;quot;&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Run the following job every 5 minutes, less cpu priority !--&amp;gt;	&lt;br /&gt;
  &amp;lt;ScheduledTask&lt;br /&gt;
   Enabled=&amp;quot;1&amp;quot;&lt;br /&gt;
   Name=&amp;quot;Demo Job&amp;quot;  &lt;br /&gt;
   ApplicationPath=&amp;quot;c:/perl/bin/perl.exe&amp;quot;&lt;br /&gt;
   ApplicationParameter=&amp;quot;C:/demo/job.pl&amp;quot;&lt;br /&gt;
   ApplicationPriority=&amp;quot;Below&amp;quot;&lt;br /&gt;
   Mode=&amp;quot;Repeat&amp;quot;&lt;br /&gt;
   FrequencyUnit=&amp;quot;M&amp;quot;  &lt;br /&gt;
   FrequencyInterval=&amp;quot;5&amp;quot;  &lt;br /&gt;
   FrequencyOffset=&amp;quot;0&amp;quot;  &lt;br /&gt;
   IsUnique=&amp;quot;1&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Run the following job every 20 minutes, set 5 min. offset !--&amp;gt;	&lt;br /&gt;
  &amp;lt;ScheduledTask&lt;br /&gt;
   Enabled=&amp;quot;1&amp;quot;&lt;br /&gt;
   Name=&amp;quot;Demo Job&amp;quot;  &lt;br /&gt;
   ApplicationPath=&amp;quot;c:/perl/bin/perl.exe&amp;quot;&lt;br /&gt;
   ApplicationParameter=&amp;quot;C:/demo/anotherjob.pl&amp;quot;&lt;br /&gt;
   ApplicationPriority=&amp;quot;Normal&amp;quot;&lt;br /&gt;
   Mode=&amp;quot;Repeat&amp;quot;&lt;br /&gt;
   FrequencyUnit=&amp;quot;M&amp;quot;  &lt;br /&gt;
   FrequencyInterval=&amp;quot;20&amp;quot;  &lt;br /&gt;
   FrequencyOffset=&amp;quot;5&amp;quot;  &lt;br /&gt;
   IsUnique=&amp;quot;1&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Run 2 Jobs every day at 01:00 and every working day (mo-fr) at 05:00&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;CONFIG&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Sample config, logging has been switched on !--&amp;gt;	&lt;br /&gt;
  &amp;lt;System&lt;br /&gt;
   ApplicationDirectory=&amp;quot;c:/demo/scheduled-task/&amp;quot;&lt;br /&gt;
   StatusFile=&amp;quot;0&amp;quot;&lt;br /&gt;
   Log=&amp;quot;1&amp;quot;&lt;br /&gt;
   LogAge=&amp;quot;14&amp;quot;&lt;br /&gt;
   LogDirectory=&amp;quot;c:/demo/scheduled-task/log/&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Run the following daily at 01:00, less cpu priority !--&amp;gt;	&lt;br /&gt;
  &amp;lt;ScheduledTask&lt;br /&gt;
   Enabled=&amp;quot;1&amp;quot;&lt;br /&gt;
   Name=&amp;quot;Demo Job&amp;quot;  &lt;br /&gt;
   ApplicationPath=&amp;quot;c:/perl/bin/perl.exe&amp;quot;&lt;br /&gt;
   ApplicationParameter=&amp;quot;C:/demo/job.pl&amp;quot;&lt;br /&gt;
   ApplicationPriority=&amp;quot;Below&amp;quot;&lt;br /&gt;
   Mode=&amp;quot;Repeat&amp;quot;&lt;br /&gt;
   FrequencyUnit=&amp;quot;D&amp;quot;  &lt;br /&gt;
   FrequencyTime=&amp;quot;01:00&amp;quot;  &lt;br /&gt;
   IsUnique=&amp;quot;1&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Run the following job every working day at 05:00!--&amp;gt;	&lt;br /&gt;
  &amp;lt;ScheduledTask&lt;br /&gt;
   Enabled=&amp;quot;1&amp;quot;&lt;br /&gt;
   Name=&amp;quot;Demo Job&amp;quot;  &lt;br /&gt;
   ApplicationPath=&amp;quot;c:/perl/bin/perl.exe&amp;quot;&lt;br /&gt;
   ApplicationParameter=&amp;quot;C:/demo/anotherjob.pl&amp;quot;&lt;br /&gt;
   ApplicationPriority=&amp;quot;Normal&amp;quot;&lt;br /&gt;
   Mode=&amp;quot;Repeat&amp;quot;&lt;br /&gt;
   FrequencyUnit=&amp;quot;W&amp;quot;  &lt;br /&gt;
   FrequencyDay=&amp;quot;mo,tu,we,th,fr&amp;quot;  &lt;br /&gt;
   FrequencyTime=&amp;quot;05:00&amp;quot;  &lt;br /&gt;
   IsUnique=&amp;quot;1&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Status File==&lt;br /&gt;
A XML status file is available to obtain the current status of the application,&lt;br /&gt;
the file is read only.&amp;lt;br&amp;gt;&lt;br /&gt;
Structure:&lt;br /&gt;
{| class=&amp;quot;wikitable &amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;st.xml&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Element&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Array&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Attribute&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Status || No || Process || Scheduled Task Process Information &lt;br /&gt;
|-&lt;br /&gt;
|  || || Pid || The Process Identifier &lt;br /&gt;
|-&lt;br /&gt;
|  || || StartDate || Startup Date (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
|  || || LastCheckDate || Last Event Date (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| ScheduledTask || Yes || Name || The Job Name&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || Enabled || (0/1) Job Enabled&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || PID || The current PID of the scheduled task, is zero if the process does not run&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || START || The last start event (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || END || The last end event (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || NEXT || The next start event (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width: 70%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:10%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Download the script&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Download.png|60px|link=http://coolscript.org/download/st.zip|Download]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|style=&amp;quot;width:90%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=Scheduled_Task_for_Windows&amp;diff=64</id>
		<title>Scheduled Task for Windows</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=Scheduled_Task_for_Windows&amp;diff=64"/>
		<updated>2016-02-05T11:16:20Z</updated>

		<summary type="html">&lt;p&gt;Matthias: /* Active State */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=About=&lt;br /&gt;
This is a alternative and easy way to run scheduled tasks on Windows. It is useful to workaround access or group policy restrictions, for example if your group policy logs you out after a short period and you want your scheduled tasks keep on running. &amp;lt;br&amp;gt;&lt;br /&gt;
The script has been tested to run as service using &#039;&#039;&#039;srvany.exe&#039;&#039;&#039; but it is possible to run the script in a common way &lt;br /&gt;
(eg: perl st.pl -c path/configfile) but we intend to run it as service.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Features=&lt;br /&gt;
*Can run scheduled programs every minute, hour, day or week&lt;br /&gt;
*Protocol events in a xml file&lt;br /&gt;
*Log all activities&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Requirements=&lt;br /&gt;
*MS Windows 7 or higher or Server2012 or higher&lt;br /&gt;
*srvany.exe (to run the script as service)&lt;br /&gt;
*Active State Perl &amp;gt;= 5.14 or Strawberry Perl &amp;gt;=5.22&lt;br /&gt;
*Additional Modules:&lt;br /&gt;
**Win32::Process&lt;br /&gt;
**Win32::Process::List&lt;br /&gt;
**Date::Manip&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
Uncompress and copy the files to a directory of you your choice, this example is using c:\scheduled-task&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
These are the required script files:&lt;br /&gt;
*c:\scheduled-task\st.pl&lt;br /&gt;
*c:\scheduled-task\st.xml&lt;br /&gt;
&lt;br /&gt;
There is a optional plugin for Nagios / Icinga available, please see:&lt;br /&gt;
*check_st.pl&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Perl Modules==&lt;br /&gt;
It is possible to use either Active State or Strawberry Perl&lt;br /&gt;
===Active State===&lt;br /&gt;
You need to have a recent version of active state perl installed, when done please run the following installation commands.&amp;lt;br&amp;gt;&lt;br /&gt;
Note that Active State doesn&#039;t allow Date-Manip to be installed with it&#039;s recent community version as of December 2015.&lt;br /&gt;
 ppm install Win32-Process&lt;br /&gt;
 ppm install Win32-Process-list&lt;br /&gt;
 ppm install Date-Manip&lt;br /&gt;
&lt;br /&gt;
===Strawberry===&lt;br /&gt;
Run &#039;&#039;&#039;cpan&#039;&#039;&#039; first to get the installation shell.&lt;br /&gt;
 cpan&amp;gt; &#039;&#039;&#039;install Win32:Process:List&#039;&#039;&#039;&lt;br /&gt;
 cpan&amp;gt; &#039;&#039;&#039;install Date:Manip&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Service==&lt;br /&gt;
Note: It is possible to install the service with or without a service description.&lt;br /&gt;
&lt;br /&gt;
===Service Registration===&lt;br /&gt;
Get the tool srvany.exe and copy it to c:\windows\system32\, then register the service by running:&lt;br /&gt;
 sc create Perl-Scheduled-Task binPath= C:\Windows\System32\srvany.exe DisplayName= Perl-Scheduled-Task&lt;br /&gt;
&lt;br /&gt;
Optional you may want to set a description for the service:&lt;br /&gt;
 sc description Perl-Scheduled-Task &amp;quot;Schedule Task Manager for Perl&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Please don&#039;t forget to set enough permissions for the new task.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Service Configuration===&lt;br /&gt;
Open your registry and add the key &#039;&#039;&#039;Parmeters&#039;&#039;&#039;:&lt;br /&gt;
 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Perl-Scheduled-Task\&#039;&#039;&#039;Parameters&#039;&#039;&#039;]&lt;br /&gt;
*Add a string value called &#039;&#039;&#039;Application&#039;&#039;&#039; within &#039;&#039;&#039;Parameters&#039;&#039;&#039; and add the path to perl and the path to the script:&lt;br /&gt;
 &amp;quot;Application&amp;quot;=&amp;quot;c:\\perl\\bin\\perl.exe c:\\scheduled-task\\st.pl -c c:\\scheduled-task\\st.xml&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Check your service permission, make sure the service user has enough permissions to start applications and has edit and create right in its application directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Script Configuration==&lt;br /&gt;
Description of the configuration file used with st.pl. &amp;lt;br&amp;gt;&lt;br /&gt;
Note: Please use the forward slash as a directory separator like on linux even on windows, this way we get no trouble with escape sequences.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Default Filename: &#039;&#039;&#039;st.xml&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Security information:&#039;&#039;&#039; Please keep this file secure, only authorized accounts should be able to edit the configuration file.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable &amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;st.xml&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Element&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Array&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Attribute&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| System || No || ApplicationDirectory || Path to appliactaion &lt;br /&gt;
|-&lt;br /&gt;
|  || || StatusFile || Path and Name to Status File, leave empty or set zero to disable&lt;br /&gt;
|-&lt;br /&gt;
|  || || Log || Switch on logging (0/1)&lt;br /&gt;
|-&lt;br /&gt;
|  || || LogAge || Maximum logfile age (days) before deleting them.&lt;br /&gt;
|-&lt;br /&gt;
|  || || LogDirectory || Path to Log Directory&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| ScheduledTask || Yes || Enabled || Job enable (1/0)&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || Name || Any Jobname&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || ApplicationPath || Path to perl, eg: c:/perl64/bin/perl.exe&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || ApplicationParameter || Path to the script, eg: c:/scheduled-task/st.xml&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || ApplicationPriority || Available: &#039;&#039;&#039;Below&#039;&#039;&#039; or  &#039;&#039;&#039;Normal&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || Mode || Currently only &#039;&#039;&#039;Repeat&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyUnit   || M=Every Minute &amp;lt;br&amp;gt; D=Daily &amp;lt;br&amp;gt; W=Weekly&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyInterval || Only with Mode=M, the interval in minutes for the scheduled task&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyOffset || Only with Mode=M, adding minutes to the next scheduled task&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyTime || Only with Mode=D or W, the time (HH:MM) for the scheduled task&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyDay || Only with Mode=W, a csv list of the weekday for the scheduled task&amp;lt;br&amp;gt;The following abbrevitions can be used, capitals or ordering do not matter&amp;lt;br&amp;gt;Mo,Tu,We,Th,Fr,Sa,Su&amp;lt;br&amp;gt;Mon,Tue,Wed,Thu,Fri,Sat,Sun&amp;lt;br&amp;gt;Monday,Tuesday,Wednesday,Thuesday,Friday,Saturday,Sunday&amp;lt;br&amp;gt;0,1,2,3,4,5,6&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || IsUnique || (0/1) Specify if the job is allowed to run once only.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
*Run 2 Jobs every 5 and every 20 minutes.&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;CONFIG&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Sample config, logging has been switched off !--&amp;gt;	&lt;br /&gt;
  &amp;lt;System&lt;br /&gt;
   ApplicationDirectory=&amp;quot;c:/demo/scheduled-task/&amp;quot;&lt;br /&gt;
   StatusFile=&amp;quot;0&amp;quot;&lt;br /&gt;
   Log=&amp;quot;0&amp;quot;&lt;br /&gt;
   LogAge=&amp;quot;0&amp;quot;&lt;br /&gt;
   LogDirectory=&amp;quot;&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Run the following job every 5 minutes, less cpu priority !--&amp;gt;	&lt;br /&gt;
  &amp;lt;ScheduledTask&lt;br /&gt;
   Enabled=&amp;quot;1&amp;quot;&lt;br /&gt;
   Name=&amp;quot;Demo Job&amp;quot;  &lt;br /&gt;
   ApplicationPath=&amp;quot;c:/perl/bin/perl.exe&amp;quot;&lt;br /&gt;
   ApplicationParameter=&amp;quot;C:/demo/job.pl&amp;quot;&lt;br /&gt;
   ApplicationPriority=&amp;quot;Below&amp;quot;&lt;br /&gt;
   Mode=&amp;quot;Repeat&amp;quot;&lt;br /&gt;
   FrequencyUnit=&amp;quot;M&amp;quot;  &lt;br /&gt;
   FrequencyInterval=&amp;quot;5&amp;quot;  &lt;br /&gt;
   FrequencyOffset=&amp;quot;0&amp;quot;  &lt;br /&gt;
   IsUnique=&amp;quot;1&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Run the following job every 20 minutes, set 5 min. offset !--&amp;gt;	&lt;br /&gt;
  &amp;lt;ScheduledTask&lt;br /&gt;
   Enabled=&amp;quot;1&amp;quot;&lt;br /&gt;
   Name=&amp;quot;Demo Job&amp;quot;  &lt;br /&gt;
   ApplicationPath=&amp;quot;c:/perl/bin/perl.exe&amp;quot;&lt;br /&gt;
   ApplicationParameter=&amp;quot;C:/demo/anotherjob.pl&amp;quot;&lt;br /&gt;
   ApplicationPriority=&amp;quot;Normal&amp;quot;&lt;br /&gt;
   Mode=&amp;quot;Repeat&amp;quot;&lt;br /&gt;
   FrequencyUnit=&amp;quot;M&amp;quot;  &lt;br /&gt;
   FrequencyInterval=&amp;quot;20&amp;quot;  &lt;br /&gt;
   FrequencyOffset=&amp;quot;5&amp;quot;  &lt;br /&gt;
   IsUnique=&amp;quot;1&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Run 2 Jobs every day at 01:00 and every working day (mo-fr) at 05:00&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;CONFIG&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Sample config, logging has been switched on !--&amp;gt;	&lt;br /&gt;
  &amp;lt;System&lt;br /&gt;
   ApplicationDirectory=&amp;quot;c:/demo/scheduled-task/&amp;quot;&lt;br /&gt;
   StatusFile=&amp;quot;0&amp;quot;&lt;br /&gt;
   Log=&amp;quot;1&amp;quot;&lt;br /&gt;
   LogAge=&amp;quot;14&amp;quot;&lt;br /&gt;
   LogDirectory=&amp;quot;c:/demo/scheduled-task/log/&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Run the following daily at 01:00, less cpu priority !--&amp;gt;	&lt;br /&gt;
  &amp;lt;ScheduledTask&lt;br /&gt;
   Enabled=&amp;quot;1&amp;quot;&lt;br /&gt;
   Name=&amp;quot;Demo Job&amp;quot;  &lt;br /&gt;
   ApplicationPath=&amp;quot;c:/perl/bin/perl.exe&amp;quot;&lt;br /&gt;
   ApplicationParameter=&amp;quot;C:/demo/job.pl&amp;quot;&lt;br /&gt;
   ApplicationPriority=&amp;quot;Below&amp;quot;&lt;br /&gt;
   Mode=&amp;quot;Repeat&amp;quot;&lt;br /&gt;
   FrequencyUnit=&amp;quot;D&amp;quot;  &lt;br /&gt;
   FrequencyTime=&amp;quot;01:00&amp;quot;  &lt;br /&gt;
   IsUnique=&amp;quot;1&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Run the following job every working day at 05:00!--&amp;gt;	&lt;br /&gt;
  &amp;lt;ScheduledTask&lt;br /&gt;
   Enabled=&amp;quot;1&amp;quot;&lt;br /&gt;
   Name=&amp;quot;Demo Job&amp;quot;  &lt;br /&gt;
   ApplicationPath=&amp;quot;c:/perl/bin/perl.exe&amp;quot;&lt;br /&gt;
   ApplicationParameter=&amp;quot;C:/demo/anotherjob.pl&amp;quot;&lt;br /&gt;
   ApplicationPriority=&amp;quot;Normal&amp;quot;&lt;br /&gt;
   Mode=&amp;quot;Repeat&amp;quot;&lt;br /&gt;
   FrequencyUnit=&amp;quot;W&amp;quot;  &lt;br /&gt;
   FrequencyDay=&amp;quot;mo,tu,we,th,fr&amp;quot;  &lt;br /&gt;
   FrequencyTime=&amp;quot;05:00&amp;quot;  &lt;br /&gt;
   IsUnique=&amp;quot;1&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Status File==&lt;br /&gt;
A XML status file is available to obtain the current status of the application,&lt;br /&gt;
the file is read only.&amp;lt;br&amp;gt;&lt;br /&gt;
Structure:&lt;br /&gt;
{| class=&amp;quot;wikitable &amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;st.xml&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Element&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Array&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Attribute&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Status || No || Process || Scheduled Task Process Information &lt;br /&gt;
|-&lt;br /&gt;
|  || || Pid || The Process Identifier &lt;br /&gt;
|-&lt;br /&gt;
|  || || StartDate || Startup Date (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
|  || || LastCheckDate || Last Event Date (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| ScheduledTask || Yes || Name || The Job Name&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || Enabled || (0/1) Job Enabled&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || PID || The current PID of the scheduled task, is zero if the process does not run&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || START || The last start event (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || END || The last end event (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || NEXT || The next start event (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width: 70%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:10%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Download the script&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Download.png|60px|link=http://coolscript.org/download/st.zip|Download]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|style=&amp;quot;width:90%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=Scheduled_Task_for_Windows&amp;diff=63</id>
		<title>Scheduled Task for Windows</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=Scheduled_Task_for_Windows&amp;diff=63"/>
		<updated>2016-02-04T22:20:58Z</updated>

		<summary type="html">&lt;p&gt;Matthias: /* Strawberry */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=About=&lt;br /&gt;
This is a alternative and easy way to run scheduled tasks on Windows. It is useful to workaround access or group policy restrictions, for example if your group policy logs you out after a short period and you want your scheduled tasks keep on running. &amp;lt;br&amp;gt;&lt;br /&gt;
The script has been tested to run as service using &#039;&#039;&#039;srvany.exe&#039;&#039;&#039; but it is possible to run the script in a common way &lt;br /&gt;
(eg: perl st.pl -c path/configfile) but we intend to run it as service.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Features=&lt;br /&gt;
*Can run scheduled programs every minute, hour, day or week&lt;br /&gt;
*Protocol events in a xml file&lt;br /&gt;
*Log all activities&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Requirements=&lt;br /&gt;
*MS Windows 7 or higher or Server2012 or higher&lt;br /&gt;
*srvany.exe (to run the script as service)&lt;br /&gt;
*Active State Perl &amp;gt;= 5.14 or Strawberry Perl &amp;gt;=5.22&lt;br /&gt;
*Additional Modules:&lt;br /&gt;
**Win32::Process&lt;br /&gt;
**Win32::Process::List&lt;br /&gt;
**Date::Manip&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
Uncompress and copy the files to a directory of you your choice, this example is using c:\scheduled-task&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
These are the required script files:&lt;br /&gt;
*c:\scheduled-task\st.pl&lt;br /&gt;
*c:\scheduled-task\st.xml&lt;br /&gt;
&lt;br /&gt;
There is a optional plugin for Nagios / Icinga available, please see:&lt;br /&gt;
*check_st.pl&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Perl Modules==&lt;br /&gt;
It is possible to use either Active State or Strawberry Perl&lt;br /&gt;
===Active State===&lt;br /&gt;
You need to have a recent version of active state perl installed, when done please run the following installation commands:&lt;br /&gt;
Note that Active State doesn&#039;t allow Date-Manip to be installed with it&#039;s recent community version as of December 2016.&lt;br /&gt;
 ppm install Win32-Process&lt;br /&gt;
 ppm install Win32-Process-list&lt;br /&gt;
 ppm install Date-Manip&lt;br /&gt;
===Strawberry===&lt;br /&gt;
Run &#039;&#039;&#039;cpan&#039;&#039;&#039; first to get the installation shell.&lt;br /&gt;
 cpan&amp;gt; &#039;&#039;&#039;install Win32:Process:List&#039;&#039;&#039;&lt;br /&gt;
 cpan&amp;gt; &#039;&#039;&#039;install Date:Manip&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Service==&lt;br /&gt;
Note: It is possible to install the service with or without a service description.&lt;br /&gt;
&lt;br /&gt;
===Service Registration===&lt;br /&gt;
Get the tool srvany.exe and copy it to c:\windows\system32\, then register the service by running:&lt;br /&gt;
 sc create Perl-Scheduled-Task binPath= C:\Windows\System32\srvany.exe DisplayName= Perl-Scheduled-Task&lt;br /&gt;
&lt;br /&gt;
Optional you may want to set a description for the service:&lt;br /&gt;
 sc description Perl-Scheduled-Task &amp;quot;Schedule Task Manager for Perl&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Please don&#039;t forget to set enough permissions for the new task.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Service Configuration===&lt;br /&gt;
Open your registry and add the key &#039;&#039;&#039;Parmeters&#039;&#039;&#039;:&lt;br /&gt;
 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Perl-Scheduled-Task\&#039;&#039;&#039;Parameters&#039;&#039;&#039;]&lt;br /&gt;
*Add a string value called &#039;&#039;&#039;Application&#039;&#039;&#039; within &#039;&#039;&#039;Parameters&#039;&#039;&#039; and add the path to perl and the path to the script:&lt;br /&gt;
 &amp;quot;Application&amp;quot;=&amp;quot;c:\\perl\\bin\\perl.exe c:\\scheduled-task\\st.pl -c c:\\scheduled-task\\st.xml&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Check your service permission, make sure the service user has enough permissions to start applications and has edit and create right in its application directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Script Configuration==&lt;br /&gt;
Description of the configuration file used with st.pl. &amp;lt;br&amp;gt;&lt;br /&gt;
Note: Please use the forward slash as a directory separator like on linux even on windows, this way we get no trouble with escape sequences.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Default Filename: &#039;&#039;&#039;st.xml&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Security information:&#039;&#039;&#039; Please keep this file secure, only authorized accounts should be able to edit the configuration file.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable &amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;st.xml&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Element&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Array&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Attribute&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| System || No || ApplicationDirectory || Path to appliactaion &lt;br /&gt;
|-&lt;br /&gt;
|  || || StatusFile || Path and Name to Status File, leave empty or set zero to disable&lt;br /&gt;
|-&lt;br /&gt;
|  || || Log || Switch on logging (0/1)&lt;br /&gt;
|-&lt;br /&gt;
|  || || LogAge || Maximum logfile age (days) before deleting them.&lt;br /&gt;
|-&lt;br /&gt;
|  || || LogDirectory || Path to Log Directory&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| ScheduledTask || Yes || Enabled || Job enable (1/0)&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || Name || Any Jobname&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || ApplicationPath || Path to perl, eg: c:/perl64/bin/perl.exe&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || ApplicationParameter || Path to the script, eg: c:/scheduled-task/st.xml&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || ApplicationPriority || Available: &#039;&#039;&#039;Below&#039;&#039;&#039; or  &#039;&#039;&#039;Normal&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || Mode || Currently only &#039;&#039;&#039;Repeat&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyUnit   || M=Every Minute &amp;lt;br&amp;gt; D=Daily &amp;lt;br&amp;gt; W=Weekly&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyInterval || Only with Mode=M, the interval in minutes for the scheduled task&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyOffset || Only with Mode=M, adding minutes to the next scheduled task&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyTime || Only with Mode=D or W, the time (HH:MM) for the scheduled task&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyDay || Only with Mode=W, a csv list of the weekday for the scheduled task&amp;lt;br&amp;gt;The following abbrevitions can be used, capitals or ordering do not matter&amp;lt;br&amp;gt;Mo,Tu,We,Th,Fr,Sa,Su&amp;lt;br&amp;gt;Mon,Tue,Wed,Thu,Fri,Sat,Sun&amp;lt;br&amp;gt;Monday,Tuesday,Wednesday,Thuesday,Friday,Saturday,Sunday&amp;lt;br&amp;gt;0,1,2,3,4,5,6&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || IsUnique || (0/1) Specify if the job is allowed to run once only.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
*Run 2 Jobs every 5 and every 20 minutes.&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;CONFIG&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Sample config, logging has been switched off !--&amp;gt;	&lt;br /&gt;
  &amp;lt;System&lt;br /&gt;
   ApplicationDirectory=&amp;quot;c:/demo/scheduled-task/&amp;quot;&lt;br /&gt;
   StatusFile=&amp;quot;0&amp;quot;&lt;br /&gt;
   Log=&amp;quot;0&amp;quot;&lt;br /&gt;
   LogAge=&amp;quot;0&amp;quot;&lt;br /&gt;
   LogDirectory=&amp;quot;&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Run the following job every 5 minutes, less cpu priority !--&amp;gt;	&lt;br /&gt;
  &amp;lt;ScheduledTask&lt;br /&gt;
   Enabled=&amp;quot;1&amp;quot;&lt;br /&gt;
   Name=&amp;quot;Demo Job&amp;quot;  &lt;br /&gt;
   ApplicationPath=&amp;quot;c:/perl/bin/perl.exe&amp;quot;&lt;br /&gt;
   ApplicationParameter=&amp;quot;C:/demo/job.pl&amp;quot;&lt;br /&gt;
   ApplicationPriority=&amp;quot;Below&amp;quot;&lt;br /&gt;
   Mode=&amp;quot;Repeat&amp;quot;&lt;br /&gt;
   FrequencyUnit=&amp;quot;M&amp;quot;  &lt;br /&gt;
   FrequencyInterval=&amp;quot;5&amp;quot;  &lt;br /&gt;
   FrequencyOffset=&amp;quot;0&amp;quot;  &lt;br /&gt;
   IsUnique=&amp;quot;1&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Run the following job every 20 minutes, set 5 min. offset !--&amp;gt;	&lt;br /&gt;
  &amp;lt;ScheduledTask&lt;br /&gt;
   Enabled=&amp;quot;1&amp;quot;&lt;br /&gt;
   Name=&amp;quot;Demo Job&amp;quot;  &lt;br /&gt;
   ApplicationPath=&amp;quot;c:/perl/bin/perl.exe&amp;quot;&lt;br /&gt;
   ApplicationParameter=&amp;quot;C:/demo/anotherjob.pl&amp;quot;&lt;br /&gt;
   ApplicationPriority=&amp;quot;Normal&amp;quot;&lt;br /&gt;
   Mode=&amp;quot;Repeat&amp;quot;&lt;br /&gt;
   FrequencyUnit=&amp;quot;M&amp;quot;  &lt;br /&gt;
   FrequencyInterval=&amp;quot;20&amp;quot;  &lt;br /&gt;
   FrequencyOffset=&amp;quot;5&amp;quot;  &lt;br /&gt;
   IsUnique=&amp;quot;1&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Run 2 Jobs every day at 01:00 and every working day (mo-fr) at 05:00&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;CONFIG&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Sample config, logging has been switched on !--&amp;gt;	&lt;br /&gt;
  &amp;lt;System&lt;br /&gt;
   ApplicationDirectory=&amp;quot;c:/demo/scheduled-task/&amp;quot;&lt;br /&gt;
   StatusFile=&amp;quot;0&amp;quot;&lt;br /&gt;
   Log=&amp;quot;1&amp;quot;&lt;br /&gt;
   LogAge=&amp;quot;14&amp;quot;&lt;br /&gt;
   LogDirectory=&amp;quot;c:/demo/scheduled-task/log/&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Run the following daily at 01:00, less cpu priority !--&amp;gt;	&lt;br /&gt;
  &amp;lt;ScheduledTask&lt;br /&gt;
   Enabled=&amp;quot;1&amp;quot;&lt;br /&gt;
   Name=&amp;quot;Demo Job&amp;quot;  &lt;br /&gt;
   ApplicationPath=&amp;quot;c:/perl/bin/perl.exe&amp;quot;&lt;br /&gt;
   ApplicationParameter=&amp;quot;C:/demo/job.pl&amp;quot;&lt;br /&gt;
   ApplicationPriority=&amp;quot;Below&amp;quot;&lt;br /&gt;
   Mode=&amp;quot;Repeat&amp;quot;&lt;br /&gt;
   FrequencyUnit=&amp;quot;D&amp;quot;  &lt;br /&gt;
   FrequencyTime=&amp;quot;01:00&amp;quot;  &lt;br /&gt;
   IsUnique=&amp;quot;1&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Run the following job every working day at 05:00!--&amp;gt;	&lt;br /&gt;
  &amp;lt;ScheduledTask&lt;br /&gt;
   Enabled=&amp;quot;1&amp;quot;&lt;br /&gt;
   Name=&amp;quot;Demo Job&amp;quot;  &lt;br /&gt;
   ApplicationPath=&amp;quot;c:/perl/bin/perl.exe&amp;quot;&lt;br /&gt;
   ApplicationParameter=&amp;quot;C:/demo/anotherjob.pl&amp;quot;&lt;br /&gt;
   ApplicationPriority=&amp;quot;Normal&amp;quot;&lt;br /&gt;
   Mode=&amp;quot;Repeat&amp;quot;&lt;br /&gt;
   FrequencyUnit=&amp;quot;W&amp;quot;  &lt;br /&gt;
   FrequencyDay=&amp;quot;mo,tu,we,th,fr&amp;quot;  &lt;br /&gt;
   FrequencyTime=&amp;quot;05:00&amp;quot;  &lt;br /&gt;
   IsUnique=&amp;quot;1&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Status File==&lt;br /&gt;
A XML status file is available to obtain the current status of the application,&lt;br /&gt;
the file is read only.&amp;lt;br&amp;gt;&lt;br /&gt;
Structure:&lt;br /&gt;
{| class=&amp;quot;wikitable &amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;st.xml&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Element&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Array&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Attribute&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Status || No || Process || Scheduled Task Process Information &lt;br /&gt;
|-&lt;br /&gt;
|  || || Pid || The Process Identifier &lt;br /&gt;
|-&lt;br /&gt;
|  || || StartDate || Startup Date (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
|  || || LastCheckDate || Last Event Date (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| ScheduledTask || Yes || Name || The Job Name&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || Enabled || (0/1) Job Enabled&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || PID || The current PID of the scheduled task, is zero if the process does not run&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || START || The last start event (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || END || The last end event (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || NEXT || The next start event (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width: 70%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:10%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Download the script&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Download.png|60px|link=http://coolscript.org/download/st.zip|Download]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|style=&amp;quot;width:90%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=Scheduled_Task_for_Windows&amp;diff=62</id>
		<title>Scheduled Task for Windows</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=Scheduled_Task_for_Windows&amp;diff=62"/>
		<updated>2016-02-04T22:13:45Z</updated>

		<summary type="html">&lt;p&gt;Matthias: /* About */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=About=&lt;br /&gt;
This is a alternative and easy way to run scheduled tasks on Windows. It is useful to workaround access or group policy restrictions, for example if your group policy logs you out after a short period and you want your scheduled tasks keep on running. &amp;lt;br&amp;gt;&lt;br /&gt;
The script has been tested to run as service using &#039;&#039;&#039;srvany.exe&#039;&#039;&#039; but it is possible to run the script in a common way &lt;br /&gt;
(eg: perl st.pl -c path/configfile) but we intend to run it as service.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Features=&lt;br /&gt;
*Can run scheduled programs every minute, hour, day or week&lt;br /&gt;
*Protocol events in a xml file&lt;br /&gt;
*Log all activities&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Requirements=&lt;br /&gt;
*MS Windows 7 or higher or Server2012 or higher&lt;br /&gt;
*srvany.exe (to run the script as service)&lt;br /&gt;
*Active State Perl &amp;gt;= 5.14 or Strawberry Perl &amp;gt;=5.22&lt;br /&gt;
*Additional Modules:&lt;br /&gt;
**Win32::Process&lt;br /&gt;
**Win32::Process::List&lt;br /&gt;
**Date::Manip&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
Uncompress and copy the files to a directory of you your choice, this example is using c:\scheduled-task&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
These are the required script files:&lt;br /&gt;
*c:\scheduled-task\st.pl&lt;br /&gt;
*c:\scheduled-task\st.xml&lt;br /&gt;
&lt;br /&gt;
There is a optional plugin for Nagios / Icinga available, please see:&lt;br /&gt;
*check_st.pl&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Perl Modules==&lt;br /&gt;
It is possible to use either Active State or Strawberry Perl&lt;br /&gt;
===Active State===&lt;br /&gt;
You need to have a recent version of active state perl installed, when done please run the following installation commands:&lt;br /&gt;
Note that Active State doesn&#039;t allow Date-Manip to be installed with it&#039;s recent community version as of December 2016.&lt;br /&gt;
 ppm install Win32-Process&lt;br /&gt;
 ppm install Win32-Process-list&lt;br /&gt;
 ppm install Date-Manip&lt;br /&gt;
===Strawberry===&lt;br /&gt;
Run cpan first to get the installation shell.&lt;br /&gt;
 cpan&amp;gt; &#039;&#039;&#039;install Win32:Process:List&#039;&#039;&#039;&lt;br /&gt;
 cpan&amp;gt; &#039;&#039;&#039;install Date:Manip&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Service==&lt;br /&gt;
Note: It is possible to install the service with or without a service description.&lt;br /&gt;
&lt;br /&gt;
===Service Registration===&lt;br /&gt;
Get the tool srvany.exe and copy it to c:\windows\system32\, then register the service by running:&lt;br /&gt;
 sc create Perl-Scheduled-Task binPath= C:\Windows\System32\srvany.exe DisplayName= Perl-Scheduled-Task&lt;br /&gt;
&lt;br /&gt;
Optional you may want to set a description for the service:&lt;br /&gt;
 sc description Perl-Scheduled-Task &amp;quot;Schedule Task Manager for Perl&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Please don&#039;t forget to set enough permissions for the new task.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Service Configuration===&lt;br /&gt;
Open your registry and add the key &#039;&#039;&#039;Parmeters&#039;&#039;&#039;:&lt;br /&gt;
 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Perl-Scheduled-Task\&#039;&#039;&#039;Parameters&#039;&#039;&#039;]&lt;br /&gt;
*Add a string value called &#039;&#039;&#039;Application&#039;&#039;&#039; within &#039;&#039;&#039;Parameters&#039;&#039;&#039; and add the path to perl and the path to the script:&lt;br /&gt;
 &amp;quot;Application&amp;quot;=&amp;quot;c:\\perl\\bin\\perl.exe c:\\scheduled-task\\st.pl -c c:\\scheduled-task\\st.xml&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Check your service permission, make sure the service user has enough permissions to start applications and has edit and create right in its application directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Script Configuration==&lt;br /&gt;
Description of the configuration file used with st.pl. &amp;lt;br&amp;gt;&lt;br /&gt;
Note: Please use the forward slash as a directory separator like on linux even on windows, this way we get no trouble with escape sequences.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Default Filename: &#039;&#039;&#039;st.xml&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Security information:&#039;&#039;&#039; Please keep this file secure, only authorized accounts should be able to edit the configuration file.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable &amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;st.xml&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Element&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Array&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Attribute&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| System || No || ApplicationDirectory || Path to appliactaion &lt;br /&gt;
|-&lt;br /&gt;
|  || || StatusFile || Path and Name to Status File, leave empty or set zero to disable&lt;br /&gt;
|-&lt;br /&gt;
|  || || Log || Switch on logging (0/1)&lt;br /&gt;
|-&lt;br /&gt;
|  || || LogAge || Maximum logfile age (days) before deleting them.&lt;br /&gt;
|-&lt;br /&gt;
|  || || LogDirectory || Path to Log Directory&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| ScheduledTask || Yes || Enabled || Job enable (1/0)&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || Name || Any Jobname&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || ApplicationPath || Path to perl, eg: c:/perl64/bin/perl.exe&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || ApplicationParameter || Path to the script, eg: c:/scheduled-task/st.xml&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || ApplicationPriority || Available: &#039;&#039;&#039;Below&#039;&#039;&#039; or  &#039;&#039;&#039;Normal&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || Mode || Currently only &#039;&#039;&#039;Repeat&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyUnit   || M=Every Minute &amp;lt;br&amp;gt; D=Daily &amp;lt;br&amp;gt; W=Weekly&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyInterval || Only with Mode=M, the interval in minutes for the scheduled task&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyOffset || Only with Mode=M, adding minutes to the next scheduled task&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyTime || Only with Mode=D or W, the time (HH:MM) for the scheduled task&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyDay || Only with Mode=W, a csv list of the weekday for the scheduled task&amp;lt;br&amp;gt;The following abbrevitions can be used, capitals or ordering do not matter&amp;lt;br&amp;gt;Mo,Tu,We,Th,Fr,Sa,Su&amp;lt;br&amp;gt;Mon,Tue,Wed,Thu,Fri,Sat,Sun&amp;lt;br&amp;gt;Monday,Tuesday,Wednesday,Thuesday,Friday,Saturday,Sunday&amp;lt;br&amp;gt;0,1,2,3,4,5,6&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || IsUnique || (0/1) Specify if the job is allowed to run once only.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
*Run 2 Jobs every 5 and every 20 minutes.&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;CONFIG&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Sample config, logging has been switched off !--&amp;gt;	&lt;br /&gt;
  &amp;lt;System&lt;br /&gt;
   ApplicationDirectory=&amp;quot;c:/demo/scheduled-task/&amp;quot;&lt;br /&gt;
   StatusFile=&amp;quot;0&amp;quot;&lt;br /&gt;
   Log=&amp;quot;0&amp;quot;&lt;br /&gt;
   LogAge=&amp;quot;0&amp;quot;&lt;br /&gt;
   LogDirectory=&amp;quot;&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Run the following job every 5 minutes, less cpu priority !--&amp;gt;	&lt;br /&gt;
  &amp;lt;ScheduledTask&lt;br /&gt;
   Enabled=&amp;quot;1&amp;quot;&lt;br /&gt;
   Name=&amp;quot;Demo Job&amp;quot;  &lt;br /&gt;
   ApplicationPath=&amp;quot;c:/perl/bin/perl.exe&amp;quot;&lt;br /&gt;
   ApplicationParameter=&amp;quot;C:/demo/job.pl&amp;quot;&lt;br /&gt;
   ApplicationPriority=&amp;quot;Below&amp;quot;&lt;br /&gt;
   Mode=&amp;quot;Repeat&amp;quot;&lt;br /&gt;
   FrequencyUnit=&amp;quot;M&amp;quot;  &lt;br /&gt;
   FrequencyInterval=&amp;quot;5&amp;quot;  &lt;br /&gt;
   FrequencyOffset=&amp;quot;0&amp;quot;  &lt;br /&gt;
   IsUnique=&amp;quot;1&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Run the following job every 20 minutes, set 5 min. offset !--&amp;gt;	&lt;br /&gt;
  &amp;lt;ScheduledTask&lt;br /&gt;
   Enabled=&amp;quot;1&amp;quot;&lt;br /&gt;
   Name=&amp;quot;Demo Job&amp;quot;  &lt;br /&gt;
   ApplicationPath=&amp;quot;c:/perl/bin/perl.exe&amp;quot;&lt;br /&gt;
   ApplicationParameter=&amp;quot;C:/demo/anotherjob.pl&amp;quot;&lt;br /&gt;
   ApplicationPriority=&amp;quot;Normal&amp;quot;&lt;br /&gt;
   Mode=&amp;quot;Repeat&amp;quot;&lt;br /&gt;
   FrequencyUnit=&amp;quot;M&amp;quot;  &lt;br /&gt;
   FrequencyInterval=&amp;quot;20&amp;quot;  &lt;br /&gt;
   FrequencyOffset=&amp;quot;5&amp;quot;  &lt;br /&gt;
   IsUnique=&amp;quot;1&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Run 2 Jobs every day at 01:00 and every working day (mo-fr) at 05:00&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;CONFIG&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Sample config, logging has been switched on !--&amp;gt;	&lt;br /&gt;
  &amp;lt;System&lt;br /&gt;
   ApplicationDirectory=&amp;quot;c:/demo/scheduled-task/&amp;quot;&lt;br /&gt;
   StatusFile=&amp;quot;0&amp;quot;&lt;br /&gt;
   Log=&amp;quot;1&amp;quot;&lt;br /&gt;
   LogAge=&amp;quot;14&amp;quot;&lt;br /&gt;
   LogDirectory=&amp;quot;c:/demo/scheduled-task/log/&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Run the following daily at 01:00, less cpu priority !--&amp;gt;	&lt;br /&gt;
  &amp;lt;ScheduledTask&lt;br /&gt;
   Enabled=&amp;quot;1&amp;quot;&lt;br /&gt;
   Name=&amp;quot;Demo Job&amp;quot;  &lt;br /&gt;
   ApplicationPath=&amp;quot;c:/perl/bin/perl.exe&amp;quot;&lt;br /&gt;
   ApplicationParameter=&amp;quot;C:/demo/job.pl&amp;quot;&lt;br /&gt;
   ApplicationPriority=&amp;quot;Below&amp;quot;&lt;br /&gt;
   Mode=&amp;quot;Repeat&amp;quot;&lt;br /&gt;
   FrequencyUnit=&amp;quot;D&amp;quot;  &lt;br /&gt;
   FrequencyTime=&amp;quot;01:00&amp;quot;  &lt;br /&gt;
   IsUnique=&amp;quot;1&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Run the following job every working day at 05:00!--&amp;gt;	&lt;br /&gt;
  &amp;lt;ScheduledTask&lt;br /&gt;
   Enabled=&amp;quot;1&amp;quot;&lt;br /&gt;
   Name=&amp;quot;Demo Job&amp;quot;  &lt;br /&gt;
   ApplicationPath=&amp;quot;c:/perl/bin/perl.exe&amp;quot;&lt;br /&gt;
   ApplicationParameter=&amp;quot;C:/demo/anotherjob.pl&amp;quot;&lt;br /&gt;
   ApplicationPriority=&amp;quot;Normal&amp;quot;&lt;br /&gt;
   Mode=&amp;quot;Repeat&amp;quot;&lt;br /&gt;
   FrequencyUnit=&amp;quot;W&amp;quot;  &lt;br /&gt;
   FrequencyDay=&amp;quot;mo,tu,we,th,fr&amp;quot;  &lt;br /&gt;
   FrequencyTime=&amp;quot;05:00&amp;quot;  &lt;br /&gt;
   IsUnique=&amp;quot;1&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Status File==&lt;br /&gt;
A XML status file is available to obtain the current status of the application,&lt;br /&gt;
the file is read only.&amp;lt;br&amp;gt;&lt;br /&gt;
Structure:&lt;br /&gt;
{| class=&amp;quot;wikitable &amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;st.xml&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Element&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Array&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Attribute&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Status || No || Process || Scheduled Task Process Information &lt;br /&gt;
|-&lt;br /&gt;
|  || || Pid || The Process Identifier &lt;br /&gt;
|-&lt;br /&gt;
|  || || StartDate || Startup Date (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
|  || || LastCheckDate || Last Event Date (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| ScheduledTask || Yes || Name || The Job Name&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || Enabled || (0/1) Job Enabled&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || PID || The current PID of the scheduled task, is zero if the process does not run&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || START || The last start event (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || END || The last end event (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || NEXT || The next start event (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width: 70%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:10%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Download the script&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Download.png|60px|link=http://coolscript.org/download/st.zip|Download]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|style=&amp;quot;width:90%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=Scheduled_Task_for_Windows&amp;diff=61</id>
		<title>Scheduled Task for Windows</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=Scheduled_Task_for_Windows&amp;diff=61"/>
		<updated>2016-02-04T22:13:30Z</updated>

		<summary type="html">&lt;p&gt;Matthias: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=About=&lt;br /&gt;
This is a alternative and easy way to run scheduled tasks on Windows. It is useful to workaround access or group policy restrictions, for example if your group policy logs you out after a short period and you want your scheduled tasks keep on running. &amp;lt;br&amp;gt;&lt;br /&gt;
The script has been tested to run as service using &#039;&#039;&#039;srvany.exe&#039;&#039;&#039; but it is possible to run the script in a common way &lt;br /&gt;
(eg: perl st.pl -c path/configfile) but we intend to run it as service.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Features=&lt;br /&gt;
*Can run scheduled programs every minute, hour, day or week&lt;br /&gt;
*Protocol events in a xml file&lt;br /&gt;
*Log all activities&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Requirements=&lt;br /&gt;
*MS Windows 7 or higher or Server2012 or higher&lt;br /&gt;
*srvany.exe (to run the script as service)&lt;br /&gt;
*Active State Perl &amp;gt;= 5.14 or Strawberry Perl &amp;gt;=5.22&lt;br /&gt;
*Additional Modules:&lt;br /&gt;
**Win32::Process&lt;br /&gt;
**Win32::Process::List&lt;br /&gt;
**Date::Manip&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
Uncompress and copy the files to a directory of you your choice, this example is using c:\scheduled-task&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
These are the required script files:&lt;br /&gt;
*c:\scheduled-task\st.pl&lt;br /&gt;
*c:\scheduled-task\st.xml&lt;br /&gt;
&lt;br /&gt;
There is a optional plugin for Nagios / Icinga available, please see:&lt;br /&gt;
*check_st.pl&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Perl Modules==&lt;br /&gt;
It is possible to use either Active State or Strawberry Perl&lt;br /&gt;
===Active State===&lt;br /&gt;
You need to have a recent version of active state perl installed, when done please run the following installation commands:&lt;br /&gt;
Note that Active State doesn&#039;t allow Date-Manip to be installed with it&#039;s recent community version as of December 2016.&lt;br /&gt;
 ppm install Win32-Process&lt;br /&gt;
 ppm install Win32-Process-list&lt;br /&gt;
 ppm install Date-Manip&lt;br /&gt;
===Strawberry===&lt;br /&gt;
Run cpan first to get the installation shell.&lt;br /&gt;
 cpan&amp;gt; &#039;&#039;&#039;install Win32:Process:List&#039;&#039;&#039;&lt;br /&gt;
 cpan&amp;gt; &#039;&#039;&#039;install Date:Manip&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Service==&lt;br /&gt;
Note: It is possible to install the service with or without a service description.&lt;br /&gt;
&lt;br /&gt;
===Service Registration===&lt;br /&gt;
Get the tool srvany.exe and copy it to c:\windows\system32\, then register the service by running:&lt;br /&gt;
 sc create Perl-Scheduled-Task binPath= C:\Windows\System32\srvany.exe DisplayName= Perl-Scheduled-Task&lt;br /&gt;
&lt;br /&gt;
Optional you may want to set a description for the service:&lt;br /&gt;
 sc description Perl-Scheduled-Task &amp;quot;Schedule Task Manager for Perl&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Please don&#039;t forget to set enough permissions for the new task.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Service Configuration===&lt;br /&gt;
Open your registry and add the key &#039;&#039;&#039;Parmeters&#039;&#039;&#039;:&lt;br /&gt;
 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Perl-Scheduled-Task\&#039;&#039;&#039;Parameters&#039;&#039;&#039;]&lt;br /&gt;
*Add a string value called &#039;&#039;&#039;Application&#039;&#039;&#039; within &#039;&#039;&#039;Parameters&#039;&#039;&#039; and add the path to perl and the path to the script:&lt;br /&gt;
 &amp;quot;Application&amp;quot;=&amp;quot;c:\\perl\\bin\\perl.exe c:\\scheduled-task\\st.pl -c c:\\scheduled-task\\st.xml&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Check your service permission, make sure the service user has enough permissions to start applications and has edit and create right in its application directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Script Configuration==&lt;br /&gt;
Description of the configuration file used with st.pl. &amp;lt;br&amp;gt;&lt;br /&gt;
Note: Please use the forward slash as a directory separator like on linux even on windows, this way we get no trouble with escape sequences.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Default Filename: &#039;&#039;&#039;st.xml&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Security information:&#039;&#039;&#039; Please keep this file secure, only authorized accounts should be able to edit the configuration file.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable &amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;st.xml&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Element&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Array&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Attribute&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| System || No || ApplicationDirectory || Path to appliactaion &lt;br /&gt;
|-&lt;br /&gt;
|  || || StatusFile || Path and Name to Status File, leave empty or set zero to disable&lt;br /&gt;
|-&lt;br /&gt;
|  || || Log || Switch on logging (0/1)&lt;br /&gt;
|-&lt;br /&gt;
|  || || LogAge || Maximum logfile age (days) before deleting them.&lt;br /&gt;
|-&lt;br /&gt;
|  || || LogDirectory || Path to Log Directory&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| ScheduledTask || Yes || Enabled || Job enable (1/0)&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || Name || Any Jobname&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || ApplicationPath || Path to perl, eg: c:/perl64/bin/perl.exe&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || ApplicationParameter || Path to the script, eg: c:/scheduled-task/st.xml&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || ApplicationPriority || Available: &#039;&#039;&#039;Below&#039;&#039;&#039; or  &#039;&#039;&#039;Normal&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || Mode || Currently only &#039;&#039;&#039;Repeat&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyUnit   || M=Every Minute &amp;lt;br&amp;gt; D=Daily &amp;lt;br&amp;gt; W=Weekly&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyInterval || Only with Mode=M, the interval in minutes for the scheduled task&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyOffset || Only with Mode=M, adding minutes to the next scheduled task&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyTime || Only with Mode=D or W, the time (HH:MM) for the scheduled task&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyDay || Only with Mode=W, a csv list of the weekday for the scheduled task&amp;lt;br&amp;gt;The following abbrevitions can be used, capitals or ordering do not matter&amp;lt;br&amp;gt;Mo,Tu,We,Th,Fr,Sa,Su&amp;lt;br&amp;gt;Mon,Tue,Wed,Thu,Fri,Sat,Sun&amp;lt;br&amp;gt;Monday,Tuesday,Wednesday,Thuesday,Friday,Saturday,Sunday&amp;lt;br&amp;gt;0,1,2,3,4,5,6&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || IsUnique || (0/1) Specify if the job is allowed to run once only.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
*Run 2 Jobs every 5 and every 20 minutes.&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;CONFIG&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Sample config, logging has been switched off !--&amp;gt;	&lt;br /&gt;
  &amp;lt;System&lt;br /&gt;
   ApplicationDirectory=&amp;quot;c:/demo/scheduled-task/&amp;quot;&lt;br /&gt;
   StatusFile=&amp;quot;0&amp;quot;&lt;br /&gt;
   Log=&amp;quot;0&amp;quot;&lt;br /&gt;
   LogAge=&amp;quot;0&amp;quot;&lt;br /&gt;
   LogDirectory=&amp;quot;&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Run the following job every 5 minutes, less cpu priority !--&amp;gt;	&lt;br /&gt;
  &amp;lt;ScheduledTask&lt;br /&gt;
   Enabled=&amp;quot;1&amp;quot;&lt;br /&gt;
   Name=&amp;quot;Demo Job&amp;quot;  &lt;br /&gt;
   ApplicationPath=&amp;quot;c:/perl/bin/perl.exe&amp;quot;&lt;br /&gt;
   ApplicationParameter=&amp;quot;C:/demo/job.pl&amp;quot;&lt;br /&gt;
   ApplicationPriority=&amp;quot;Below&amp;quot;&lt;br /&gt;
   Mode=&amp;quot;Repeat&amp;quot;&lt;br /&gt;
   FrequencyUnit=&amp;quot;M&amp;quot;  &lt;br /&gt;
   FrequencyInterval=&amp;quot;5&amp;quot;  &lt;br /&gt;
   FrequencyOffset=&amp;quot;0&amp;quot;  &lt;br /&gt;
   IsUnique=&amp;quot;1&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Run the following job every 20 minutes, set 5 min. offset !--&amp;gt;	&lt;br /&gt;
  &amp;lt;ScheduledTask&lt;br /&gt;
   Enabled=&amp;quot;1&amp;quot;&lt;br /&gt;
   Name=&amp;quot;Demo Job&amp;quot;  &lt;br /&gt;
   ApplicationPath=&amp;quot;c:/perl/bin/perl.exe&amp;quot;&lt;br /&gt;
   ApplicationParameter=&amp;quot;C:/demo/anotherjob.pl&amp;quot;&lt;br /&gt;
   ApplicationPriority=&amp;quot;Normal&amp;quot;&lt;br /&gt;
   Mode=&amp;quot;Repeat&amp;quot;&lt;br /&gt;
   FrequencyUnit=&amp;quot;M&amp;quot;  &lt;br /&gt;
   FrequencyInterval=&amp;quot;20&amp;quot;  &lt;br /&gt;
   FrequencyOffset=&amp;quot;5&amp;quot;  &lt;br /&gt;
   IsUnique=&amp;quot;1&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Run 2 Jobs every day at 01:00 and every working day (mo-fr) at 05:00&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;CONFIG&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Sample config, logging has been switched on !--&amp;gt;	&lt;br /&gt;
  &amp;lt;System&lt;br /&gt;
   ApplicationDirectory=&amp;quot;c:/demo/scheduled-task/&amp;quot;&lt;br /&gt;
   StatusFile=&amp;quot;0&amp;quot;&lt;br /&gt;
   Log=&amp;quot;1&amp;quot;&lt;br /&gt;
   LogAge=&amp;quot;14&amp;quot;&lt;br /&gt;
   LogDirectory=&amp;quot;c:/demo/scheduled-task/log/&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Run the following daily at 01:00, less cpu priority !--&amp;gt;	&lt;br /&gt;
  &amp;lt;ScheduledTask&lt;br /&gt;
   Enabled=&amp;quot;1&amp;quot;&lt;br /&gt;
   Name=&amp;quot;Demo Job&amp;quot;  &lt;br /&gt;
   ApplicationPath=&amp;quot;c:/perl/bin/perl.exe&amp;quot;&lt;br /&gt;
   ApplicationParameter=&amp;quot;C:/demo/job.pl&amp;quot;&lt;br /&gt;
   ApplicationPriority=&amp;quot;Below&amp;quot;&lt;br /&gt;
   Mode=&amp;quot;Repeat&amp;quot;&lt;br /&gt;
   FrequencyUnit=&amp;quot;D&amp;quot;  &lt;br /&gt;
   FrequencyTime=&amp;quot;01:00&amp;quot;  &lt;br /&gt;
   IsUnique=&amp;quot;1&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Run the following job every working day at 05:00!--&amp;gt;	&lt;br /&gt;
  &amp;lt;ScheduledTask&lt;br /&gt;
   Enabled=&amp;quot;1&amp;quot;&lt;br /&gt;
   Name=&amp;quot;Demo Job&amp;quot;  &lt;br /&gt;
   ApplicationPath=&amp;quot;c:/perl/bin/perl.exe&amp;quot;&lt;br /&gt;
   ApplicationParameter=&amp;quot;C:/demo/anotherjob.pl&amp;quot;&lt;br /&gt;
   ApplicationPriority=&amp;quot;Normal&amp;quot;&lt;br /&gt;
   Mode=&amp;quot;Repeat&amp;quot;&lt;br /&gt;
   FrequencyUnit=&amp;quot;W&amp;quot;  &lt;br /&gt;
   FrequencyDay=&amp;quot;mo,tu,we,th,fr&amp;quot;  &lt;br /&gt;
   FrequencyTime=&amp;quot;05:00&amp;quot;  &lt;br /&gt;
   IsUnique=&amp;quot;1&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Status File==&lt;br /&gt;
A XML status file is available to obtain the current status of the application,&lt;br /&gt;
the file is read only.&amp;lt;br&amp;gt;&lt;br /&gt;
Structure:&lt;br /&gt;
{| class=&amp;quot;wikitable &amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;st.xml&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Element&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Array&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Attribute&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Status || No || Process || Scheduled Task Process Information &lt;br /&gt;
|-&lt;br /&gt;
|  || || Pid || The Process Identifier &lt;br /&gt;
|-&lt;br /&gt;
|  || || StartDate || Startup Date (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
|  || || LastCheckDate || Last Event Date (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| ScheduledTask || Yes || Name || The Job Name&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || Enabled || (0/1) Job Enabled&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || PID || The current PID of the scheduled task, is zero if the process does not run&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || START || The last start event (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || END || The last end event (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || NEXT || The next start event (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width: 70%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:10%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Download the script&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Download.png|60px|link=http://coolscript.org/download/st.zip|Download]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|style=&amp;quot;width:90%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=Scheduled_Task_for_Windows&amp;diff=60</id>
		<title>Scheduled Task for Windows</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=Scheduled_Task_for_Windows&amp;diff=60"/>
		<updated>2016-02-04T22:13:19Z</updated>

		<summary type="html">&lt;p&gt;Matthias: /* About */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
=About=&lt;br /&gt;
This is a alternative and easy way to run scheduled tasks on Windows. It is useful to workaround access or group policy restrictions, for example if your group policy logs you out after a short period and you want your scheduled tasks keep on running. &amp;lt;br&amp;gt;&lt;br /&gt;
The script has been tested to run as service using &#039;&#039;&#039;srvany.exe&#039;&#039;&#039; but it is possible to run the script in a common way &lt;br /&gt;
(eg: perl st.pl -c path/configfile) but we intend to run it as service.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Features=&lt;br /&gt;
*Can run scheduled programs every minute, hour, day or week&lt;br /&gt;
*Protocol events in a xml file&lt;br /&gt;
*Log all activities&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Requirements=&lt;br /&gt;
*MS Windows 7 or higher or Server2012 or higher&lt;br /&gt;
*srvany.exe (to run the script as service)&lt;br /&gt;
*Active State Perl &amp;gt;= 5.14 or Strawberry Perl &amp;gt;=5.22&lt;br /&gt;
*Additional Modules:&lt;br /&gt;
**Win32::Process&lt;br /&gt;
**Win32::Process::List&lt;br /&gt;
**Date::Manip&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
Uncompress and copy the files to a directory of you your choice, this example is using c:\scheduled-task&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
These are the required script files:&lt;br /&gt;
*c:\scheduled-task\st.pl&lt;br /&gt;
*c:\scheduled-task\st.xml&lt;br /&gt;
&lt;br /&gt;
There is a optional plugin for Nagios / Icinga available, please see:&lt;br /&gt;
*check_st.pl&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Perl Modules==&lt;br /&gt;
It is possible to use either Active State or Strawberry Perl&lt;br /&gt;
===Active State===&lt;br /&gt;
You need to have a recent version of active state perl installed, when done please run the following installation commands:&lt;br /&gt;
Note that Active State doesn&#039;t allow Date-Manip to be installed with it&#039;s recent community version as of December 2016.&lt;br /&gt;
 ppm install Win32-Process&lt;br /&gt;
 ppm install Win32-Process-list&lt;br /&gt;
 ppm install Date-Manip&lt;br /&gt;
===Strawberry===&lt;br /&gt;
Run cpan first to get the installation shell.&lt;br /&gt;
 cpan&amp;gt; &#039;&#039;&#039;install Win32:Process:List&#039;&#039;&#039;&lt;br /&gt;
 cpan&amp;gt; &#039;&#039;&#039;install Date:Manip&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Service==&lt;br /&gt;
Note: It is possible to install the service with or without a service description.&lt;br /&gt;
&lt;br /&gt;
===Service Registration===&lt;br /&gt;
Get the tool srvany.exe and copy it to c:\windows\system32\, then register the service by running:&lt;br /&gt;
 sc create Perl-Scheduled-Task binPath= C:\Windows\System32\srvany.exe DisplayName= Perl-Scheduled-Task&lt;br /&gt;
&lt;br /&gt;
Optional you may want to set a description for the service:&lt;br /&gt;
 sc description Perl-Scheduled-Task &amp;quot;Schedule Task Manager for Perl&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Please don&#039;t forget to set enough permissions for the new task.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Service Configuration===&lt;br /&gt;
Open your registry and add the key &#039;&#039;&#039;Parmeters&#039;&#039;&#039;:&lt;br /&gt;
 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Perl-Scheduled-Task\&#039;&#039;&#039;Parameters&#039;&#039;&#039;]&lt;br /&gt;
*Add a string value called &#039;&#039;&#039;Application&#039;&#039;&#039; within &#039;&#039;&#039;Parameters&#039;&#039;&#039; and add the path to perl and the path to the script:&lt;br /&gt;
 &amp;quot;Application&amp;quot;=&amp;quot;c:\\perl\\bin\\perl.exe c:\\scheduled-task\\st.pl -c c:\\scheduled-task\\st.xml&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Check your service permission, make sure the service user has enough permissions to start applications and has edit and create right in its application directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Script Configuration==&lt;br /&gt;
Description of the configuration file used with st.pl. &amp;lt;br&amp;gt;&lt;br /&gt;
Note: Please use the forward slash as a directory separator like on linux even on windows, this way we get no trouble with escape sequences.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Default Filename: &#039;&#039;&#039;st.xml&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Security information:&#039;&#039;&#039; Please keep this file secure, only authorized accounts should be able to edit the configuration file.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable &amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;st.xml&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Element&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Array&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Attribute&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| System || No || ApplicationDirectory || Path to appliactaion &lt;br /&gt;
|-&lt;br /&gt;
|  || || StatusFile || Path and Name to Status File, leave empty or set zero to disable&lt;br /&gt;
|-&lt;br /&gt;
|  || || Log || Switch on logging (0/1)&lt;br /&gt;
|-&lt;br /&gt;
|  || || LogAge || Maximum logfile age (days) before deleting them.&lt;br /&gt;
|-&lt;br /&gt;
|  || || LogDirectory || Path to Log Directory&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| ScheduledTask || Yes || Enabled || Job enable (1/0)&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || Name || Any Jobname&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || ApplicationPath || Path to perl, eg: c:/perl64/bin/perl.exe&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || ApplicationParameter || Path to the script, eg: c:/scheduled-task/st.xml&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || ApplicationPriority || Available: &#039;&#039;&#039;Below&#039;&#039;&#039; or  &#039;&#039;&#039;Normal&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || Mode || Currently only &#039;&#039;&#039;Repeat&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyUnit   || M=Every Minute &amp;lt;br&amp;gt; D=Daily &amp;lt;br&amp;gt; W=Weekly&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyInterval || Only with Mode=M, the interval in minutes for the scheduled task&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyOffset || Only with Mode=M, adding minutes to the next scheduled task&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyTime || Only with Mode=D or W, the time (HH:MM) for the scheduled task&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyDay || Only with Mode=W, a csv list of the weekday for the scheduled task&amp;lt;br&amp;gt;The following abbrevitions can be used, capitals or ordering do not matter&amp;lt;br&amp;gt;Mo,Tu,We,Th,Fr,Sa,Su&amp;lt;br&amp;gt;Mon,Tue,Wed,Thu,Fri,Sat,Sun&amp;lt;br&amp;gt;Monday,Tuesday,Wednesday,Thuesday,Friday,Saturday,Sunday&amp;lt;br&amp;gt;0,1,2,3,4,5,6&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || IsUnique || (0/1) Specify if the job is allowed to run once only.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
*Run 2 Jobs every 5 and every 20 minutes.&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;CONFIG&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Sample config, logging has been switched off !--&amp;gt;	&lt;br /&gt;
  &amp;lt;System&lt;br /&gt;
   ApplicationDirectory=&amp;quot;c:/demo/scheduled-task/&amp;quot;&lt;br /&gt;
   StatusFile=&amp;quot;0&amp;quot;&lt;br /&gt;
   Log=&amp;quot;0&amp;quot;&lt;br /&gt;
   LogAge=&amp;quot;0&amp;quot;&lt;br /&gt;
   LogDirectory=&amp;quot;&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Run the following job every 5 minutes, less cpu priority !--&amp;gt;	&lt;br /&gt;
  &amp;lt;ScheduledTask&lt;br /&gt;
   Enabled=&amp;quot;1&amp;quot;&lt;br /&gt;
   Name=&amp;quot;Demo Job&amp;quot;  &lt;br /&gt;
   ApplicationPath=&amp;quot;c:/perl/bin/perl.exe&amp;quot;&lt;br /&gt;
   ApplicationParameter=&amp;quot;C:/demo/job.pl&amp;quot;&lt;br /&gt;
   ApplicationPriority=&amp;quot;Below&amp;quot;&lt;br /&gt;
   Mode=&amp;quot;Repeat&amp;quot;&lt;br /&gt;
   FrequencyUnit=&amp;quot;M&amp;quot;  &lt;br /&gt;
   FrequencyInterval=&amp;quot;5&amp;quot;  &lt;br /&gt;
   FrequencyOffset=&amp;quot;0&amp;quot;  &lt;br /&gt;
   IsUnique=&amp;quot;1&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Run the following job every 20 minutes, set 5 min. offset !--&amp;gt;	&lt;br /&gt;
  &amp;lt;ScheduledTask&lt;br /&gt;
   Enabled=&amp;quot;1&amp;quot;&lt;br /&gt;
   Name=&amp;quot;Demo Job&amp;quot;  &lt;br /&gt;
   ApplicationPath=&amp;quot;c:/perl/bin/perl.exe&amp;quot;&lt;br /&gt;
   ApplicationParameter=&amp;quot;C:/demo/anotherjob.pl&amp;quot;&lt;br /&gt;
   ApplicationPriority=&amp;quot;Normal&amp;quot;&lt;br /&gt;
   Mode=&amp;quot;Repeat&amp;quot;&lt;br /&gt;
   FrequencyUnit=&amp;quot;M&amp;quot;  &lt;br /&gt;
   FrequencyInterval=&amp;quot;20&amp;quot;  &lt;br /&gt;
   FrequencyOffset=&amp;quot;5&amp;quot;  &lt;br /&gt;
   IsUnique=&amp;quot;1&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Run 2 Jobs every day at 01:00 and every working day (mo-fr) at 05:00&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;CONFIG&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Sample config, logging has been switched on !--&amp;gt;	&lt;br /&gt;
  &amp;lt;System&lt;br /&gt;
   ApplicationDirectory=&amp;quot;c:/demo/scheduled-task/&amp;quot;&lt;br /&gt;
   StatusFile=&amp;quot;0&amp;quot;&lt;br /&gt;
   Log=&amp;quot;1&amp;quot;&lt;br /&gt;
   LogAge=&amp;quot;14&amp;quot;&lt;br /&gt;
   LogDirectory=&amp;quot;c:/demo/scheduled-task/log/&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Run the following daily at 01:00, less cpu priority !--&amp;gt;	&lt;br /&gt;
  &amp;lt;ScheduledTask&lt;br /&gt;
   Enabled=&amp;quot;1&amp;quot;&lt;br /&gt;
   Name=&amp;quot;Demo Job&amp;quot;  &lt;br /&gt;
   ApplicationPath=&amp;quot;c:/perl/bin/perl.exe&amp;quot;&lt;br /&gt;
   ApplicationParameter=&amp;quot;C:/demo/job.pl&amp;quot;&lt;br /&gt;
   ApplicationPriority=&amp;quot;Below&amp;quot;&lt;br /&gt;
   Mode=&amp;quot;Repeat&amp;quot;&lt;br /&gt;
   FrequencyUnit=&amp;quot;D&amp;quot;  &lt;br /&gt;
   FrequencyTime=&amp;quot;01:00&amp;quot;  &lt;br /&gt;
   IsUnique=&amp;quot;1&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Run the following job every working day at 05:00!--&amp;gt;	&lt;br /&gt;
  &amp;lt;ScheduledTask&lt;br /&gt;
   Enabled=&amp;quot;1&amp;quot;&lt;br /&gt;
   Name=&amp;quot;Demo Job&amp;quot;  &lt;br /&gt;
   ApplicationPath=&amp;quot;c:/perl/bin/perl.exe&amp;quot;&lt;br /&gt;
   ApplicationParameter=&amp;quot;C:/demo/anotherjob.pl&amp;quot;&lt;br /&gt;
   ApplicationPriority=&amp;quot;Normal&amp;quot;&lt;br /&gt;
   Mode=&amp;quot;Repeat&amp;quot;&lt;br /&gt;
   FrequencyUnit=&amp;quot;W&amp;quot;  &lt;br /&gt;
   FrequencyDay=&amp;quot;mo,tu,we,th,fr&amp;quot;  &lt;br /&gt;
   FrequencyTime=&amp;quot;05:00&amp;quot;  &lt;br /&gt;
   IsUnique=&amp;quot;1&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Status File==&lt;br /&gt;
A XML status file is available to obtain the current status of the application,&lt;br /&gt;
the file is read only.&amp;lt;br&amp;gt;&lt;br /&gt;
Structure:&lt;br /&gt;
{| class=&amp;quot;wikitable &amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;st.xml&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Element&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Array&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Attribute&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Status || No || Process || Scheduled Task Process Information &lt;br /&gt;
|-&lt;br /&gt;
|  || || Pid || The Process Identifier &lt;br /&gt;
|-&lt;br /&gt;
|  || || StartDate || Startup Date (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
|  || || LastCheckDate || Last Event Date (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| ScheduledTask || Yes || Name || The Job Name&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || Enabled || (0/1) Job Enabled&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || PID || The current PID of the scheduled task, is zero if the process does not run&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || START || The last start event (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || END || The last end event (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || NEXT || The next start event (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width: 70%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:10%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Download the script&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Download.png|60px|link=http://coolscript.org/download/st.zip|Download]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|style=&amp;quot;width:90%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=Scheduled_Task_for_Windows&amp;diff=59</id>
		<title>Scheduled Task for Windows</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=Scheduled_Task_for_Windows&amp;diff=59"/>
		<updated>2016-02-04T22:12:49Z</updated>

		<summary type="html">&lt;p&gt;Matthias: /* Perl Modules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=About=&lt;br /&gt;
This is a alternative and easy way to run scheduled tasks on Windows. It is useful to workaround access or group policy restrictions, for example if your group policy logs you out after a short period and you want your scheduled tasks keep on running. &amp;lt;br&amp;gt;&lt;br /&gt;
The script has been tested to run as service using &#039;&#039;&#039;srvany.exe&#039;&#039;&#039; but it is possible to run the script in a common way &lt;br /&gt;
(eg: perl st.pl -c path/configfile) but we intend to run it as service.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Features=&lt;br /&gt;
*Can run scheduled programs every minute, hour, day or week&lt;br /&gt;
*Protocol events in a xml file&lt;br /&gt;
*Log all activities&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Requirements=&lt;br /&gt;
*MS Windows 7 or higher or Server2012 or higher&lt;br /&gt;
*srvany.exe (to run the script as service)&lt;br /&gt;
*Active State Perl &amp;gt;= 5.14 or Strawberry Perl &amp;gt;=5.22&lt;br /&gt;
*Additional Modules:&lt;br /&gt;
**Win32::Process&lt;br /&gt;
**Win32::Process::List&lt;br /&gt;
**Date::Manip&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
Uncompress and copy the files to a directory of you your choice, this example is using c:\scheduled-task&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
These are the required script files:&lt;br /&gt;
*c:\scheduled-task\st.pl&lt;br /&gt;
*c:\scheduled-task\st.xml&lt;br /&gt;
&lt;br /&gt;
There is a optional plugin for Nagios / Icinga available, please see:&lt;br /&gt;
*check_st.pl&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Perl Modules==&lt;br /&gt;
It is possible to use either Active State or Strawberry Perl&lt;br /&gt;
===Active State===&lt;br /&gt;
You need to have a recent version of active state perl installed, when done please run the following installation commands:&lt;br /&gt;
Note that Active State doesn&#039;t allow Date-Manip to be installed with it&#039;s recent community version as of December 2016.&lt;br /&gt;
 ppm install Win32-Process&lt;br /&gt;
 ppm install Win32-Process-list&lt;br /&gt;
 ppm install Date-Manip&lt;br /&gt;
===Strawberry===&lt;br /&gt;
Run cpan first to get the installation shell.&lt;br /&gt;
 cpan&amp;gt; &#039;&#039;&#039;install Win32:Process:List&#039;&#039;&#039;&lt;br /&gt;
 cpan&amp;gt; &#039;&#039;&#039;install Date:Manip&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Service==&lt;br /&gt;
Note: It is possible to install the service with or without a service description.&lt;br /&gt;
&lt;br /&gt;
===Service Registration===&lt;br /&gt;
Get the tool srvany.exe and copy it to c:\windows\system32\, then register the service by running:&lt;br /&gt;
 sc create Perl-Scheduled-Task binPath= C:\Windows\System32\srvany.exe DisplayName= Perl-Scheduled-Task&lt;br /&gt;
&lt;br /&gt;
Optional you may want to set a description for the service:&lt;br /&gt;
 sc description Perl-Scheduled-Task &amp;quot;Schedule Task Manager for Perl&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Please don&#039;t forget to set enough permissions for the new task.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Service Configuration===&lt;br /&gt;
Open your registry and add the key &#039;&#039;&#039;Parmeters&#039;&#039;&#039;:&lt;br /&gt;
 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Perl-Scheduled-Task\&#039;&#039;&#039;Parameters&#039;&#039;&#039;]&lt;br /&gt;
*Add a string value called &#039;&#039;&#039;Application&#039;&#039;&#039; within &#039;&#039;&#039;Parameters&#039;&#039;&#039; and add the path to perl and the path to the script:&lt;br /&gt;
 &amp;quot;Application&amp;quot;=&amp;quot;c:\\perl\\bin\\perl.exe c:\\scheduled-task\\st.pl -c c:\\scheduled-task\\st.xml&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Check your service permission, make sure the service user has enough permissions to start applications and has edit and create right in its application directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Script Configuration==&lt;br /&gt;
Description of the configuration file used with st.pl. &amp;lt;br&amp;gt;&lt;br /&gt;
Note: Please use the forward slash as a directory separator like on linux even on windows, this way we get no trouble with escape sequences.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Default Filename: &#039;&#039;&#039;st.xml&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Security information:&#039;&#039;&#039; Please keep this file secure, only authorized accounts should be able to edit the configuration file.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable &amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;st.xml&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Element&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Array&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Attribute&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| System || No || ApplicationDirectory || Path to appliactaion &lt;br /&gt;
|-&lt;br /&gt;
|  || || StatusFile || Path and Name to Status File, leave empty or set zero to disable&lt;br /&gt;
|-&lt;br /&gt;
|  || || Log || Switch on logging (0/1)&lt;br /&gt;
|-&lt;br /&gt;
|  || || LogAge || Maximum logfile age (days) before deleting them.&lt;br /&gt;
|-&lt;br /&gt;
|  || || LogDirectory || Path to Log Directory&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| ScheduledTask || Yes || Enabled || Job enable (1/0)&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || Name || Any Jobname&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || ApplicationPath || Path to perl, eg: c:/perl64/bin/perl.exe&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || ApplicationParameter || Path to the script, eg: c:/scheduled-task/st.xml&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || ApplicationPriority || Available: &#039;&#039;&#039;Below&#039;&#039;&#039; or  &#039;&#039;&#039;Normal&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || Mode || Currently only &#039;&#039;&#039;Repeat&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyUnit   || M=Every Minute &amp;lt;br&amp;gt; D=Daily &amp;lt;br&amp;gt; W=Weekly&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyInterval || Only with Mode=M, the interval in minutes for the scheduled task&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyOffset || Only with Mode=M, adding minutes to the next scheduled task&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyTime || Only with Mode=D or W, the time (HH:MM) for the scheduled task&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyDay || Only with Mode=W, a csv list of the weekday for the scheduled task&amp;lt;br&amp;gt;The following abbrevitions can be used, capitals or ordering do not matter&amp;lt;br&amp;gt;Mo,Tu,We,Th,Fr,Sa,Su&amp;lt;br&amp;gt;Mon,Tue,Wed,Thu,Fri,Sat,Sun&amp;lt;br&amp;gt;Monday,Tuesday,Wednesday,Thuesday,Friday,Saturday,Sunday&amp;lt;br&amp;gt;0,1,2,3,4,5,6&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || IsUnique || (0/1) Specify if the job is allowed to run once only.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
*Run 2 Jobs every 5 and every 20 minutes.&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;CONFIG&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Sample config, logging has been switched off !--&amp;gt;	&lt;br /&gt;
  &amp;lt;System&lt;br /&gt;
   ApplicationDirectory=&amp;quot;c:/demo/scheduled-task/&amp;quot;&lt;br /&gt;
   StatusFile=&amp;quot;0&amp;quot;&lt;br /&gt;
   Log=&amp;quot;0&amp;quot;&lt;br /&gt;
   LogAge=&amp;quot;0&amp;quot;&lt;br /&gt;
   LogDirectory=&amp;quot;&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Run the following job every 5 minutes, less cpu priority !--&amp;gt;	&lt;br /&gt;
  &amp;lt;ScheduledTask&lt;br /&gt;
   Enabled=&amp;quot;1&amp;quot;&lt;br /&gt;
   Name=&amp;quot;Demo Job&amp;quot;  &lt;br /&gt;
   ApplicationPath=&amp;quot;c:/perl/bin/perl.exe&amp;quot;&lt;br /&gt;
   ApplicationParameter=&amp;quot;C:/demo/job.pl&amp;quot;&lt;br /&gt;
   ApplicationPriority=&amp;quot;Below&amp;quot;&lt;br /&gt;
   Mode=&amp;quot;Repeat&amp;quot;&lt;br /&gt;
   FrequencyUnit=&amp;quot;M&amp;quot;  &lt;br /&gt;
   FrequencyInterval=&amp;quot;5&amp;quot;  &lt;br /&gt;
   FrequencyOffset=&amp;quot;0&amp;quot;  &lt;br /&gt;
   IsUnique=&amp;quot;1&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Run the following job every 20 minutes, set 5 min. offset !--&amp;gt;	&lt;br /&gt;
  &amp;lt;ScheduledTask&lt;br /&gt;
   Enabled=&amp;quot;1&amp;quot;&lt;br /&gt;
   Name=&amp;quot;Demo Job&amp;quot;  &lt;br /&gt;
   ApplicationPath=&amp;quot;c:/perl/bin/perl.exe&amp;quot;&lt;br /&gt;
   ApplicationParameter=&amp;quot;C:/demo/anotherjob.pl&amp;quot;&lt;br /&gt;
   ApplicationPriority=&amp;quot;Normal&amp;quot;&lt;br /&gt;
   Mode=&amp;quot;Repeat&amp;quot;&lt;br /&gt;
   FrequencyUnit=&amp;quot;M&amp;quot;  &lt;br /&gt;
   FrequencyInterval=&amp;quot;20&amp;quot;  &lt;br /&gt;
   FrequencyOffset=&amp;quot;5&amp;quot;  &lt;br /&gt;
   IsUnique=&amp;quot;1&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Run 2 Jobs every day at 01:00 and every working day (mo-fr) at 05:00&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;CONFIG&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Sample config, logging has been switched on !--&amp;gt;	&lt;br /&gt;
  &amp;lt;System&lt;br /&gt;
   ApplicationDirectory=&amp;quot;c:/demo/scheduled-task/&amp;quot;&lt;br /&gt;
   StatusFile=&amp;quot;0&amp;quot;&lt;br /&gt;
   Log=&amp;quot;1&amp;quot;&lt;br /&gt;
   LogAge=&amp;quot;14&amp;quot;&lt;br /&gt;
   LogDirectory=&amp;quot;c:/demo/scheduled-task/log/&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Run the following daily at 01:00, less cpu priority !--&amp;gt;	&lt;br /&gt;
  &amp;lt;ScheduledTask&lt;br /&gt;
   Enabled=&amp;quot;1&amp;quot;&lt;br /&gt;
   Name=&amp;quot;Demo Job&amp;quot;  &lt;br /&gt;
   ApplicationPath=&amp;quot;c:/perl/bin/perl.exe&amp;quot;&lt;br /&gt;
   ApplicationParameter=&amp;quot;C:/demo/job.pl&amp;quot;&lt;br /&gt;
   ApplicationPriority=&amp;quot;Below&amp;quot;&lt;br /&gt;
   Mode=&amp;quot;Repeat&amp;quot;&lt;br /&gt;
   FrequencyUnit=&amp;quot;D&amp;quot;  &lt;br /&gt;
   FrequencyTime=&amp;quot;01:00&amp;quot;  &lt;br /&gt;
   IsUnique=&amp;quot;1&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Run the following job every working day at 05:00!--&amp;gt;	&lt;br /&gt;
  &amp;lt;ScheduledTask&lt;br /&gt;
   Enabled=&amp;quot;1&amp;quot;&lt;br /&gt;
   Name=&amp;quot;Demo Job&amp;quot;  &lt;br /&gt;
   ApplicationPath=&amp;quot;c:/perl/bin/perl.exe&amp;quot;&lt;br /&gt;
   ApplicationParameter=&amp;quot;C:/demo/anotherjob.pl&amp;quot;&lt;br /&gt;
   ApplicationPriority=&amp;quot;Normal&amp;quot;&lt;br /&gt;
   Mode=&amp;quot;Repeat&amp;quot;&lt;br /&gt;
   FrequencyUnit=&amp;quot;W&amp;quot;  &lt;br /&gt;
   FrequencyDay=&amp;quot;mo,tu,we,th,fr&amp;quot;  &lt;br /&gt;
   FrequencyTime=&amp;quot;05:00&amp;quot;  &lt;br /&gt;
   IsUnique=&amp;quot;1&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Status File==&lt;br /&gt;
A XML status file is available to obtain the current status of the application,&lt;br /&gt;
the file is read only.&amp;lt;br&amp;gt;&lt;br /&gt;
Structure:&lt;br /&gt;
{| class=&amp;quot;wikitable &amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;st.xml&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Element&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Array&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Attribute&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Status || No || Process || Scheduled Task Process Information &lt;br /&gt;
|-&lt;br /&gt;
|  || || Pid || The Process Identifier &lt;br /&gt;
|-&lt;br /&gt;
|  || || StartDate || Startup Date (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
|  || || LastCheckDate || Last Event Date (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| ScheduledTask || Yes || Name || The Job Name&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || Enabled || (0/1) Job Enabled&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || PID || The current PID of the scheduled task, is zero if the process does not run&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || START || The last start event (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || END || The last end event (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || NEXT || The next start event (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width: 70%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:10%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Download the script&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Download.png|60px|link=http://coolscript.org/download/st.zip|Download]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|style=&amp;quot;width:90%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=Scheduled_Task_for_Windows&amp;diff=58</id>
		<title>Scheduled Task for Windows</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=Scheduled_Task_for_Windows&amp;diff=58"/>
		<updated>2016-02-04T22:12:41Z</updated>

		<summary type="html">&lt;p&gt;Matthias: /* Perl Modules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=About=&lt;br /&gt;
This is a alternative and easy way to run scheduled tasks on Windows. It is useful to workaround access or group policy restrictions, for example if your group policy logs you out after a short period and you want your scheduled tasks keep on running. &amp;lt;br&amp;gt;&lt;br /&gt;
The script has been tested to run as service using &#039;&#039;&#039;srvany.exe&#039;&#039;&#039; but it is possible to run the script in a common way &lt;br /&gt;
(eg: perl st.pl -c path/configfile) but we intend to run it as service.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Features=&lt;br /&gt;
*Can run scheduled programs every minute, hour, day or week&lt;br /&gt;
*Protocol events in a xml file&lt;br /&gt;
*Log all activities&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Requirements=&lt;br /&gt;
*MS Windows 7 or higher or Server2012 or higher&lt;br /&gt;
*srvany.exe (to run the script as service)&lt;br /&gt;
*Active State Perl &amp;gt;= 5.14 or Strawberry Perl &amp;gt;=5.22&lt;br /&gt;
*Additional Modules:&lt;br /&gt;
**Win32::Process&lt;br /&gt;
**Win32::Process::List&lt;br /&gt;
**Date::Manip&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
Uncompress and copy the files to a directory of you your choice, this example is using c:\scheduled-task&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
These are the required script files:&lt;br /&gt;
*c:\scheduled-task\st.pl&lt;br /&gt;
*c:\scheduled-task\st.xml&lt;br /&gt;
&lt;br /&gt;
There is a optional plugin for Nagios / Icinga available, please see:&lt;br /&gt;
*check_st.pl&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Perl Modules==&lt;br /&gt;
 It is possible to use either Active State or Strawberry Perl&lt;br /&gt;
===Active State===&lt;br /&gt;
You need to have a recent version of active state perl installed, when done please run the following installation commands:&lt;br /&gt;
Note that Active State doesn&#039;t allow Date-Manip to be installed with it&#039;s recent community version as of December 2016.&lt;br /&gt;
 ppm install Win32-Process&lt;br /&gt;
 ppm install Win32-Process-list&lt;br /&gt;
 ppm install Date-Manip&lt;br /&gt;
===Strawberry===&lt;br /&gt;
Run cpan first to get the installation shell.&lt;br /&gt;
 cpan&amp;gt; &#039;&#039;&#039;install Win32:Process:List&#039;&#039;&#039;&lt;br /&gt;
 cpan&amp;gt; &#039;&#039;&#039;install Date:Manip&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Service==&lt;br /&gt;
Note: It is possible to install the service with or without a service description.&lt;br /&gt;
&lt;br /&gt;
===Service Registration===&lt;br /&gt;
Get the tool srvany.exe and copy it to c:\windows\system32\, then register the service by running:&lt;br /&gt;
 sc create Perl-Scheduled-Task binPath= C:\Windows\System32\srvany.exe DisplayName= Perl-Scheduled-Task&lt;br /&gt;
&lt;br /&gt;
Optional you may want to set a description for the service:&lt;br /&gt;
 sc description Perl-Scheduled-Task &amp;quot;Schedule Task Manager for Perl&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Please don&#039;t forget to set enough permissions for the new task.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Service Configuration===&lt;br /&gt;
Open your registry and add the key &#039;&#039;&#039;Parmeters&#039;&#039;&#039;:&lt;br /&gt;
 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Perl-Scheduled-Task\&#039;&#039;&#039;Parameters&#039;&#039;&#039;]&lt;br /&gt;
*Add a string value called &#039;&#039;&#039;Application&#039;&#039;&#039; within &#039;&#039;&#039;Parameters&#039;&#039;&#039; and add the path to perl and the path to the script:&lt;br /&gt;
 &amp;quot;Application&amp;quot;=&amp;quot;c:\\perl\\bin\\perl.exe c:\\scheduled-task\\st.pl -c c:\\scheduled-task\\st.xml&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Check your service permission, make sure the service user has enough permissions to start applications and has edit and create right in its application directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Script Configuration==&lt;br /&gt;
Description of the configuration file used with st.pl. &amp;lt;br&amp;gt;&lt;br /&gt;
Note: Please use the forward slash as a directory separator like on linux even on windows, this way we get no trouble with escape sequences.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Default Filename: &#039;&#039;&#039;st.xml&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Security information:&#039;&#039;&#039; Please keep this file secure, only authorized accounts should be able to edit the configuration file.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable &amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;st.xml&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Element&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Array&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Attribute&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| System || No || ApplicationDirectory || Path to appliactaion &lt;br /&gt;
|-&lt;br /&gt;
|  || || StatusFile || Path and Name to Status File, leave empty or set zero to disable&lt;br /&gt;
|-&lt;br /&gt;
|  || || Log || Switch on logging (0/1)&lt;br /&gt;
|-&lt;br /&gt;
|  || || LogAge || Maximum logfile age (days) before deleting them.&lt;br /&gt;
|-&lt;br /&gt;
|  || || LogDirectory || Path to Log Directory&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| ScheduledTask || Yes || Enabled || Job enable (1/0)&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || Name || Any Jobname&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || ApplicationPath || Path to perl, eg: c:/perl64/bin/perl.exe&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || ApplicationParameter || Path to the script, eg: c:/scheduled-task/st.xml&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || ApplicationPriority || Available: &#039;&#039;&#039;Below&#039;&#039;&#039; or  &#039;&#039;&#039;Normal&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || Mode || Currently only &#039;&#039;&#039;Repeat&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyUnit   || M=Every Minute &amp;lt;br&amp;gt; D=Daily &amp;lt;br&amp;gt; W=Weekly&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyInterval || Only with Mode=M, the interval in minutes for the scheduled task&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyOffset || Only with Mode=M, adding minutes to the next scheduled task&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyTime || Only with Mode=D or W, the time (HH:MM) for the scheduled task&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyDay || Only with Mode=W, a csv list of the weekday for the scheduled task&amp;lt;br&amp;gt;The following abbrevitions can be used, capitals or ordering do not matter&amp;lt;br&amp;gt;Mo,Tu,We,Th,Fr,Sa,Su&amp;lt;br&amp;gt;Mon,Tue,Wed,Thu,Fri,Sat,Sun&amp;lt;br&amp;gt;Monday,Tuesday,Wednesday,Thuesday,Friday,Saturday,Sunday&amp;lt;br&amp;gt;0,1,2,3,4,5,6&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || IsUnique || (0/1) Specify if the job is allowed to run once only.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
*Run 2 Jobs every 5 and every 20 minutes.&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;CONFIG&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Sample config, logging has been switched off !--&amp;gt;	&lt;br /&gt;
  &amp;lt;System&lt;br /&gt;
   ApplicationDirectory=&amp;quot;c:/demo/scheduled-task/&amp;quot;&lt;br /&gt;
   StatusFile=&amp;quot;0&amp;quot;&lt;br /&gt;
   Log=&amp;quot;0&amp;quot;&lt;br /&gt;
   LogAge=&amp;quot;0&amp;quot;&lt;br /&gt;
   LogDirectory=&amp;quot;&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Run the following job every 5 minutes, less cpu priority !--&amp;gt;	&lt;br /&gt;
  &amp;lt;ScheduledTask&lt;br /&gt;
   Enabled=&amp;quot;1&amp;quot;&lt;br /&gt;
   Name=&amp;quot;Demo Job&amp;quot;  &lt;br /&gt;
   ApplicationPath=&amp;quot;c:/perl/bin/perl.exe&amp;quot;&lt;br /&gt;
   ApplicationParameter=&amp;quot;C:/demo/job.pl&amp;quot;&lt;br /&gt;
   ApplicationPriority=&amp;quot;Below&amp;quot;&lt;br /&gt;
   Mode=&amp;quot;Repeat&amp;quot;&lt;br /&gt;
   FrequencyUnit=&amp;quot;M&amp;quot;  &lt;br /&gt;
   FrequencyInterval=&amp;quot;5&amp;quot;  &lt;br /&gt;
   FrequencyOffset=&amp;quot;0&amp;quot;  &lt;br /&gt;
   IsUnique=&amp;quot;1&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Run the following job every 20 minutes, set 5 min. offset !--&amp;gt;	&lt;br /&gt;
  &amp;lt;ScheduledTask&lt;br /&gt;
   Enabled=&amp;quot;1&amp;quot;&lt;br /&gt;
   Name=&amp;quot;Demo Job&amp;quot;  &lt;br /&gt;
   ApplicationPath=&amp;quot;c:/perl/bin/perl.exe&amp;quot;&lt;br /&gt;
   ApplicationParameter=&amp;quot;C:/demo/anotherjob.pl&amp;quot;&lt;br /&gt;
   ApplicationPriority=&amp;quot;Normal&amp;quot;&lt;br /&gt;
   Mode=&amp;quot;Repeat&amp;quot;&lt;br /&gt;
   FrequencyUnit=&amp;quot;M&amp;quot;  &lt;br /&gt;
   FrequencyInterval=&amp;quot;20&amp;quot;  &lt;br /&gt;
   FrequencyOffset=&amp;quot;5&amp;quot;  &lt;br /&gt;
   IsUnique=&amp;quot;1&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Run 2 Jobs every day at 01:00 and every working day (mo-fr) at 05:00&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;CONFIG&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Sample config, logging has been switched on !--&amp;gt;	&lt;br /&gt;
  &amp;lt;System&lt;br /&gt;
   ApplicationDirectory=&amp;quot;c:/demo/scheduled-task/&amp;quot;&lt;br /&gt;
   StatusFile=&amp;quot;0&amp;quot;&lt;br /&gt;
   Log=&amp;quot;1&amp;quot;&lt;br /&gt;
   LogAge=&amp;quot;14&amp;quot;&lt;br /&gt;
   LogDirectory=&amp;quot;c:/demo/scheduled-task/log/&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Run the following daily at 01:00, less cpu priority !--&amp;gt;	&lt;br /&gt;
  &amp;lt;ScheduledTask&lt;br /&gt;
   Enabled=&amp;quot;1&amp;quot;&lt;br /&gt;
   Name=&amp;quot;Demo Job&amp;quot;  &lt;br /&gt;
   ApplicationPath=&amp;quot;c:/perl/bin/perl.exe&amp;quot;&lt;br /&gt;
   ApplicationParameter=&amp;quot;C:/demo/job.pl&amp;quot;&lt;br /&gt;
   ApplicationPriority=&amp;quot;Below&amp;quot;&lt;br /&gt;
   Mode=&amp;quot;Repeat&amp;quot;&lt;br /&gt;
   FrequencyUnit=&amp;quot;D&amp;quot;  &lt;br /&gt;
   FrequencyTime=&amp;quot;01:00&amp;quot;  &lt;br /&gt;
   IsUnique=&amp;quot;1&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Run the following job every working day at 05:00!--&amp;gt;	&lt;br /&gt;
  &amp;lt;ScheduledTask&lt;br /&gt;
   Enabled=&amp;quot;1&amp;quot;&lt;br /&gt;
   Name=&amp;quot;Demo Job&amp;quot;  &lt;br /&gt;
   ApplicationPath=&amp;quot;c:/perl/bin/perl.exe&amp;quot;&lt;br /&gt;
   ApplicationParameter=&amp;quot;C:/demo/anotherjob.pl&amp;quot;&lt;br /&gt;
   ApplicationPriority=&amp;quot;Normal&amp;quot;&lt;br /&gt;
   Mode=&amp;quot;Repeat&amp;quot;&lt;br /&gt;
   FrequencyUnit=&amp;quot;W&amp;quot;  &lt;br /&gt;
   FrequencyDay=&amp;quot;mo,tu,we,th,fr&amp;quot;  &lt;br /&gt;
   FrequencyTime=&amp;quot;05:00&amp;quot;  &lt;br /&gt;
   IsUnique=&amp;quot;1&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Status File==&lt;br /&gt;
A XML status file is available to obtain the current status of the application,&lt;br /&gt;
the file is read only.&amp;lt;br&amp;gt;&lt;br /&gt;
Structure:&lt;br /&gt;
{| class=&amp;quot;wikitable &amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;st.xml&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Element&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Array&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Attribute&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Status || No || Process || Scheduled Task Process Information &lt;br /&gt;
|-&lt;br /&gt;
|  || || Pid || The Process Identifier &lt;br /&gt;
|-&lt;br /&gt;
|  || || StartDate || Startup Date (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
|  || || LastCheckDate || Last Event Date (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| ScheduledTask || Yes || Name || The Job Name&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || Enabled || (0/1) Job Enabled&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || PID || The current PID of the scheduled task, is zero if the process does not run&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || START || The last start event (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || END || The last end event (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || NEXT || The next start event (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width: 70%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:10%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Download the script&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Download.png|60px|link=http://coolscript.org/download/st.zip|Download]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|style=&amp;quot;width:90%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
	<entry>
		<id>https://coolscript.net/index.php?title=Scheduled_Task_for_Windows&amp;diff=57</id>
		<title>Scheduled Task for Windows</title>
		<link rel="alternate" type="text/html" href="https://coolscript.net/index.php?title=Scheduled_Task_for_Windows&amp;diff=57"/>
		<updated>2016-02-04T22:11:27Z</updated>

		<summary type="html">&lt;p&gt;Matthias: /* About */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;br&amp;gt;&lt;br /&gt;
=About=&lt;br /&gt;
This is a alternative and easy way to run scheduled tasks on Windows. It is useful to workaround access or group policy restrictions, for example if your group policy logs you out after a short period and you want your scheduled tasks keep on running. &amp;lt;br&amp;gt;&lt;br /&gt;
The script has been tested to run as service using &#039;&#039;&#039;srvany.exe&#039;&#039;&#039; but it is possible to run the script in a common way &lt;br /&gt;
(eg: perl st.pl -c path/configfile) but we intend to run it as service.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Features=&lt;br /&gt;
*Can run scheduled programs every minute, hour, day or week&lt;br /&gt;
*Protocol events in a xml file&lt;br /&gt;
*Log all activities&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Requirements=&lt;br /&gt;
*MS Windows 7 or higher or Server2012 or higher&lt;br /&gt;
*srvany.exe (to run the script as service)&lt;br /&gt;
*Active State Perl &amp;gt;= 5.14 or Strawberry Perl &amp;gt;=5.22&lt;br /&gt;
*Additional Modules:&lt;br /&gt;
**Win32::Process&lt;br /&gt;
**Win32::Process::List&lt;br /&gt;
**Date::Manip&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Installation=&lt;br /&gt;
Uncompress and copy the files to a directory of you your choice, this example is using c:\scheduled-task&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
These are the required script files:&lt;br /&gt;
*c:\scheduled-task\st.pl&lt;br /&gt;
*c:\scheduled-task\st.xml&lt;br /&gt;
&lt;br /&gt;
There is a optional plugin for Nagios / Icinga available, please see:&lt;br /&gt;
*check_st.pl&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Perl Modules==&lt;br /&gt;
You need to have a recent version of active state perl installed, when done please run the following installation commands:&lt;br /&gt;
===Active State===&lt;br /&gt;
Note that Active State doesn&#039;t allow Date-Manip to be installed with it&#039;s recent community version as of December 2016.&lt;br /&gt;
 ppm install Win32-Process&lt;br /&gt;
 ppm install Win32-Process-list&lt;br /&gt;
 ppm install Date-Manip&lt;br /&gt;
===Strawberry===&lt;br /&gt;
Run cpan first to get the installation shell.&lt;br /&gt;
 cpan&amp;gt; &#039;&#039;&#039;install Win32:Process:List&#039;&#039;&#039;&lt;br /&gt;
 cpan&amp;gt; &#039;&#039;&#039;install Date:Manip&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Service==&lt;br /&gt;
Note: It is possible to install the service with or without a service description.&lt;br /&gt;
&lt;br /&gt;
===Service Registration===&lt;br /&gt;
Get the tool srvany.exe and copy it to c:\windows\system32\, then register the service by running:&lt;br /&gt;
 sc create Perl-Scheduled-Task binPath= C:\Windows\System32\srvany.exe DisplayName= Perl-Scheduled-Task&lt;br /&gt;
&lt;br /&gt;
Optional you may want to set a description for the service:&lt;br /&gt;
 sc description Perl-Scheduled-Task &amp;quot;Schedule Task Manager for Perl&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Please don&#039;t forget to set enough permissions for the new task.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Service Configuration===&lt;br /&gt;
Open your registry and add the key &#039;&#039;&#039;Parmeters&#039;&#039;&#039;:&lt;br /&gt;
 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Perl-Scheduled-Task\&#039;&#039;&#039;Parameters&#039;&#039;&#039;]&lt;br /&gt;
*Add a string value called &#039;&#039;&#039;Application&#039;&#039;&#039; within &#039;&#039;&#039;Parameters&#039;&#039;&#039; and add the path to perl and the path to the script:&lt;br /&gt;
 &amp;quot;Application&amp;quot;=&amp;quot;c:\\perl\\bin\\perl.exe c:\\scheduled-task\\st.pl -c c:\\scheduled-task\\st.xml&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Check your service permission, make sure the service user has enough permissions to start applications and has edit and create right in its application directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Script Configuration==&lt;br /&gt;
Description of the configuration file used with st.pl. &amp;lt;br&amp;gt;&lt;br /&gt;
Note: Please use the forward slash as a directory separator like on linux even on windows, this way we get no trouble with escape sequences.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Default Filename: &#039;&#039;&#039;st.xml&#039;&#039;&#039;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Security information:&#039;&#039;&#039; Please keep this file secure, only authorized accounts should be able to edit the configuration file.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable &amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;st.xml&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Element&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Array&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Attribute&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| System || No || ApplicationDirectory || Path to appliactaion &lt;br /&gt;
|-&lt;br /&gt;
|  || || StatusFile || Path and Name to Status File, leave empty or set zero to disable&lt;br /&gt;
|-&lt;br /&gt;
|  || || Log || Switch on logging (0/1)&lt;br /&gt;
|-&lt;br /&gt;
|  || || LogAge || Maximum logfile age (days) before deleting them.&lt;br /&gt;
|-&lt;br /&gt;
|  || || LogDirectory || Path to Log Directory&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| ScheduledTask || Yes || Enabled || Job enable (1/0)&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || Name || Any Jobname&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || ApplicationPath || Path to perl, eg: c:/perl64/bin/perl.exe&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || ApplicationParameter || Path to the script, eg: c:/scheduled-task/st.xml&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || ApplicationPriority || Available: &#039;&#039;&#039;Below&#039;&#039;&#039; or  &#039;&#039;&#039;Normal&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || Mode || Currently only &#039;&#039;&#039;Repeat&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyUnit   || M=Every Minute &amp;lt;br&amp;gt; D=Daily &amp;lt;br&amp;gt; W=Weekly&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyInterval || Only with Mode=M, the interval in minutes for the scheduled task&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyOffset || Only with Mode=M, adding minutes to the next scheduled task&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyTime || Only with Mode=D or W, the time (HH:MM) for the scheduled task&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || FrequencyDay || Only with Mode=W, a csv list of the weekday for the scheduled task&amp;lt;br&amp;gt;The following abbrevitions can be used, capitals or ordering do not matter&amp;lt;br&amp;gt;Mo,Tu,We,Th,Fr,Sa,Su&amp;lt;br&amp;gt;Mon,Tue,Wed,Thu,Fri,Sat,Sun&amp;lt;br&amp;gt;Monday,Tuesday,Wednesday,Thuesday,Friday,Saturday,Sunday&amp;lt;br&amp;gt;0,1,2,3,4,5,6&amp;lt;br&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || IsUnique || (0/1) Specify if the job is allowed to run once only.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
*Run 2 Jobs every 5 and every 20 minutes.&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;CONFIG&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Sample config, logging has been switched off !--&amp;gt;	&lt;br /&gt;
  &amp;lt;System&lt;br /&gt;
   ApplicationDirectory=&amp;quot;c:/demo/scheduled-task/&amp;quot;&lt;br /&gt;
   StatusFile=&amp;quot;0&amp;quot;&lt;br /&gt;
   Log=&amp;quot;0&amp;quot;&lt;br /&gt;
   LogAge=&amp;quot;0&amp;quot;&lt;br /&gt;
   LogDirectory=&amp;quot;&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Run the following job every 5 minutes, less cpu priority !--&amp;gt;	&lt;br /&gt;
  &amp;lt;ScheduledTask&lt;br /&gt;
   Enabled=&amp;quot;1&amp;quot;&lt;br /&gt;
   Name=&amp;quot;Demo Job&amp;quot;  &lt;br /&gt;
   ApplicationPath=&amp;quot;c:/perl/bin/perl.exe&amp;quot;&lt;br /&gt;
   ApplicationParameter=&amp;quot;C:/demo/job.pl&amp;quot;&lt;br /&gt;
   ApplicationPriority=&amp;quot;Below&amp;quot;&lt;br /&gt;
   Mode=&amp;quot;Repeat&amp;quot;&lt;br /&gt;
   FrequencyUnit=&amp;quot;M&amp;quot;  &lt;br /&gt;
   FrequencyInterval=&amp;quot;5&amp;quot;  &lt;br /&gt;
   FrequencyOffset=&amp;quot;0&amp;quot;  &lt;br /&gt;
   IsUnique=&amp;quot;1&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Run the following job every 20 minutes, set 5 min. offset !--&amp;gt;	&lt;br /&gt;
  &amp;lt;ScheduledTask&lt;br /&gt;
   Enabled=&amp;quot;1&amp;quot;&lt;br /&gt;
   Name=&amp;quot;Demo Job&amp;quot;  &lt;br /&gt;
   ApplicationPath=&amp;quot;c:/perl/bin/perl.exe&amp;quot;&lt;br /&gt;
   ApplicationParameter=&amp;quot;C:/demo/anotherjob.pl&amp;quot;&lt;br /&gt;
   ApplicationPriority=&amp;quot;Normal&amp;quot;&lt;br /&gt;
   Mode=&amp;quot;Repeat&amp;quot;&lt;br /&gt;
   FrequencyUnit=&amp;quot;M&amp;quot;  &lt;br /&gt;
   FrequencyInterval=&amp;quot;20&amp;quot;  &lt;br /&gt;
   FrequencyOffset=&amp;quot;5&amp;quot;  &lt;br /&gt;
   IsUnique=&amp;quot;1&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Run 2 Jobs every day at 01:00 and every working day (mo-fr) at 05:00&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;CONFIG&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Sample config, logging has been switched on !--&amp;gt;	&lt;br /&gt;
  &amp;lt;System&lt;br /&gt;
   ApplicationDirectory=&amp;quot;c:/demo/scheduled-task/&amp;quot;&lt;br /&gt;
   StatusFile=&amp;quot;0&amp;quot;&lt;br /&gt;
   Log=&amp;quot;1&amp;quot;&lt;br /&gt;
   LogAge=&amp;quot;14&amp;quot;&lt;br /&gt;
   LogDirectory=&amp;quot;c:/demo/scheduled-task/log/&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Run the following daily at 01:00, less cpu priority !--&amp;gt;	&lt;br /&gt;
  &amp;lt;ScheduledTask&lt;br /&gt;
   Enabled=&amp;quot;1&amp;quot;&lt;br /&gt;
   Name=&amp;quot;Demo Job&amp;quot;  &lt;br /&gt;
   ApplicationPath=&amp;quot;c:/perl/bin/perl.exe&amp;quot;&lt;br /&gt;
   ApplicationParameter=&amp;quot;C:/demo/job.pl&amp;quot;&lt;br /&gt;
   ApplicationPriority=&amp;quot;Below&amp;quot;&lt;br /&gt;
   Mode=&amp;quot;Repeat&amp;quot;&lt;br /&gt;
   FrequencyUnit=&amp;quot;D&amp;quot;  &lt;br /&gt;
   FrequencyTime=&amp;quot;01:00&amp;quot;  &lt;br /&gt;
   IsUnique=&amp;quot;1&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
  &amp;lt;!-- Run the following job every working day at 05:00!--&amp;gt;	&lt;br /&gt;
  &amp;lt;ScheduledTask&lt;br /&gt;
   Enabled=&amp;quot;1&amp;quot;&lt;br /&gt;
   Name=&amp;quot;Demo Job&amp;quot;  &lt;br /&gt;
   ApplicationPath=&amp;quot;c:/perl/bin/perl.exe&amp;quot;&lt;br /&gt;
   ApplicationParameter=&amp;quot;C:/demo/anotherjob.pl&amp;quot;&lt;br /&gt;
   ApplicationPriority=&amp;quot;Normal&amp;quot;&lt;br /&gt;
   Mode=&amp;quot;Repeat&amp;quot;&lt;br /&gt;
   FrequencyUnit=&amp;quot;W&amp;quot;  &lt;br /&gt;
   FrequencyDay=&amp;quot;mo,tu,we,th,fr&amp;quot;  &lt;br /&gt;
   FrequencyTime=&amp;quot;05:00&amp;quot;  &lt;br /&gt;
   IsUnique=&amp;quot;1&amp;quot;&lt;br /&gt;
  /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Status File==&lt;br /&gt;
A XML status file is available to obtain the current status of the application,&lt;br /&gt;
the file is read only.&amp;lt;br&amp;gt;&lt;br /&gt;
Structure:&lt;br /&gt;
{| class=&amp;quot;wikitable &amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ &#039;&#039;&#039;st.xml&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Element&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Array&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Attribute&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; | Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Status || No || Process || Scheduled Task Process Information &lt;br /&gt;
|-&lt;br /&gt;
|  || || Pid || The Process Identifier &lt;br /&gt;
|-&lt;br /&gt;
|  || || StartDate || Startup Date (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
|  || || LastCheckDate || Last Event Date (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
| ScheduledTask || Yes || Name || The Job Name&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || Enabled || (0/1) Job Enabled&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || PID || The current PID of the scheduled task, is zero if the process does not run&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || START || The last start event (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || END || The last end event (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
|  ||  || NEXT || The next start event (yyyy-mm-dd hh:mm:ss)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width: 70%;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:10%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&#039;&#039;&#039;Download the script&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Download.png|60px|link=http://coolscript.org/download/st.zip|Download]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
|style=&amp;quot;width:90%; vertical-align: top;&amp;quot;|&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Matthias</name></author>
	</entry>
</feed>