<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-420298197680100543</id><updated>2019-07-11T04:35:23.766-07:00</updated><category term="hipchat"/><category term="ssh"/><category term="Appending iptables rule"/><category term="Bash"/><category term="Centos"/><category term="Change file descriptor"/><category term="Nullable"/><category term="Pass input from file instead from stdin."/><category term="RedHat"/><category term="Samsung Galaxy"/><category term="SiteMap file"/><category term="SiteMapPath"/><category term="Use sudo without password prompt"/><category term="YUM"/><category term="adding iptables rule"/><category term="api"/><category term="asp.net navigation"/><category term="createrepo"/><category term="database() method"/><category term="devops"/><category term="except"/><category term="hubot"/><category term="icinga2"/><category term="iptables"/><category term="last_insert_id()"/><category term="monitoring"/><category term="mysql"/><category term="mysql functions"/><category term="mysql password"/><category term="mysql user"/><category term="nagios"/><category term="rpm install"/><category term="ruby"/><category term="spawn"/><category term="ssh and scp without password using expect"/><category term="start mysql in ubuntu"/><category term="support"/><category term="use root level access using sudo without password promt"/><category term="user() method"/><category term="using expect in BASH."/><category term="yum configuration"/><title type='text'>Various Tech.</title><subtitle type='html'>Various Tech is a blog discus about,net technologies and supported environment.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://shutech.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/420298197680100543/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://shutech.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>singh</name><uri>http://www.blogger.com/profile/05560598178578014708</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>16</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-420298197680100543.post-3192632674285685674</id><published>2019-07-11T04:35:00.001-07:00</published><updated>2019-07-11T04:35:23.633-07:00</updated><title type='text'>Sent mail from perl</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;&lt;br /&gt;&lt;br /&gt;sub Mail_Mailer&lt;br /&gt; {&lt;br /&gt;my&amp;nbsp; $destination_directory =&#39;/data/&#39;;&lt;br /&gt;&amp;nbsp; my $from_address = &quot;abc@gmail.com&quot;;&lt;br /&gt;&amp;nbsp; my $to_address = &quot;abc@gmail.com&quot;;&lt;br /&gt;&amp;nbsp; my $subject = &quot;SOFT DATA &quot;;&lt;br /&gt;&amp;nbsp; my $body = &quot;Dear Sir\nPlease find the complete set of data on sftp\n.&quot;;&lt;br /&gt;&amp;nbsp; my $cc=&quot;test@gmail.com&quot;;&lt;br /&gt;opendir (DES,$destination_directory);&lt;br /&gt;my @files=readdir(DES);&lt;br /&gt;close(DES);&lt;br /&gt;my&amp;nbsp;@mail_sent_file=@file;&lt;br /&gt;foreach my $mail_file_names (@mail_sent_file)&lt;br /&gt;{&lt;br /&gt;$body=${body}.&quot;\n&quot;.$mail_file_names.&quot;\n&quot;;&lt;br /&gt;}&lt;br /&gt; $body=${body}.&quot;\nRegards\nreportsadmin.&quot;;&lt;br /&gt;my $mailer = Mail::Mailer-&amp;gt;new(&quot;sendmail&quot;) or die;&lt;br /&gt;$mailer-&amp;gt;open(&lt;br /&gt;{&lt;br /&gt;From    =&amp;gt; $from_address,&lt;br /&gt;To      =&amp;gt; $to_address,&lt;br /&gt;Cc  =&amp;gt; $cc,&lt;br /&gt;Bcc  =&amp;gt; $bcc,&lt;br /&gt;Subject =&amp;gt; $subject,&lt;br /&gt;}&lt;br /&gt;);&lt;br /&gt;print &quot;Going to send the mail.&quot;;&lt;br /&gt;print $mailer $body;&lt;br /&gt;$mailer-&amp;gt;close();&lt;br /&gt;print &quot;Mail sent.&quot;;&lt;br /&gt;return ($mailer);&lt;br /&gt;}&lt;/blockquote&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shutech.blogspot.com/feeds/3192632674285685674/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shutech.blogspot.com/2019/07/sent-mail-from-perl.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/420298197680100543/posts/default/3192632674285685674'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/420298197680100543/posts/default/3192632674285685674'/><link rel='alternate' type='text/html' href='http://shutech.blogspot.com/2019/07/sent-mail-from-perl.html' title='Sent mail from perl'/><author><name>singh</name><uri>http://www.blogger.com/profile/05560598178578014708</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-420298197680100543.post-4685743668039229289</id><published>2016-05-24T13:42:00.002-07:00</published><updated>2016-10-06T05:47:19.057-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="devops"/><category scheme="http://www.blogger.com/atom/ns#" term="hipchat"/><category scheme="http://www.blogger.com/atom/ns#" term="hubot"/><category scheme="http://www.blogger.com/atom/ns#" term="support"/><title type='text'>Hubot and Hipchat</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Many of us have struggle with concept of L1, and L2 support and maintenance which can be very expensive and transitioning is a living hell. What we wish is the ability for both of them to work together and make a smooth transition.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So I have started to think it would be cool to make this happen for a organization which runs 1200+ servers and have teams to support product and infra both. The Idea was to start with collaboration between teams which can be extended to request and support basis. To extend it further we discovered &amp;nbsp;that product team works for 24x7 and infra team is 18x7. Now it is important to design it in a way that product team can manage it 24x7 with minimum and no help from infra team(L2).&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Solution:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Solution was to use a collaboration tool which supports API for our tools to maintain alert level. For that please refer my previous blog describing configuration of Icinga and Hipchat. Next logical step is to configure hipchat to support robot system which can perform housekeeping like infra, with appropiate roles and permission. This is where we discovered Hubot a robot which can respond to certain request on chat channels. An opensource tool written in NodeJS, with a community support. So we can pretty much do anything that NodeJS has to offer us.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Installation of Hubot:&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;In order to install hubot we need to install NodeJS+Npm first, which is out of scope of this document. We are going to use Redis-brain so we need to install redis-server as well. With this little pre-configuration lets start the installation of hubot: &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;npm install -g coffee-script&lt;/li&gt;&lt;li&gt;sudo&amp;nbsp;apt-get install redis-server&lt;/li&gt;&lt;li&gt;npm install -g hubot&lt;/li&gt;&lt;li&gt;hubot -v # to verify&lt;/li&gt;&lt;li&gt;apt-get install libexpat1-dev libicu-dev&lt;/li&gt;&lt;li&gt;npm install --save hubot-hipchat&lt;/li&gt;&lt;li class=&quot;_AXc&quot; style=&quot;border: 0px; list-style: inherit; margin: 0px 0px 4px; padding: 0px;&quot;&gt;npm install -g yo&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;Steps above will allow you to install hubot, now we need to write our scripts to support our requirements. Now I am hoping that you might be having a configuration tool to manage this infra already, it could be anything from Puppet, CHEF, Ansible to in house tool. If you are not having any such tool, well life pretty much sucks.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now i am presuming that you do not have any such tools in place, then your system admin is a traditional system admin, aka GOD. Let write a custom script for GOD,&lt;br /&gt;&lt;br /&gt;Lets create a file in script folder inside hubot and name it execute-script.coffee&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;background-color: white; color: #333333; font-family: Consolas, Menlo, &amp;quot;Liberation Mono&amp;quot;, Courier, monospace; font-size: 12px; line-height: 1.4; padding: 0px;&quot;&gt;&lt;span class=&quot;nv&quot; style=&quot;color: teal;&quot;&gt;util= &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #bb8844;&quot;&gt;&#39;util&#39;&lt;/span&gt;&lt;br /&gt;&lt;a href=&quot;https://www.blogger.com/null&quot; name=&quot;execute-commands.coffee-31&quot; style=&quot;color: #3572b0;&quot;&gt;&lt;/a&gt;&lt;span class=&quot;nv&quot; style=&quot;color: teal;&quot;&gt;fs = &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #bb8844;&quot;&gt;&#39;fs&#39;&lt;/span&gt;&lt;br /&gt;&lt;a href=&quot;https://www.blogger.com/null&quot; name=&quot;execute-commands.coffee-32&quot; style=&quot;color: #3572b0;&quot;&gt;&lt;/a&gt;&lt;span class=&quot;nv&quot; style=&quot;color: teal;&quot;&gt;path= &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #bb8844;&quot;&gt;&#39;path&#39;&lt;/span&gt;&lt;br /&gt;&lt;a href=&quot;https://www.blogger.com/null&quot; name=&quot;execute-commands.coffee-33&quot; style=&quot;color: #3572b0;&quot;&gt;&lt;/a&gt;&lt;span class=&quot;nv&quot; style=&quot;color: teal;&quot;&gt;module.exports = &lt;/span&gt;&lt;span class=&quot;nf&quot; style=&quot;color: #990000; font-weight: 700;&quot;&gt;(robot) -&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;a href=&quot;https://www.blogger.com/null&quot; name=&quot;execute-commands.coffee-34&quot; style=&quot;color: #3572b0;&quot;&gt;&lt;/a&gt;    &lt;span class=&quot;nx&quot;&gt;robot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;respond&lt;/span&gt; &lt;span class=&quot;sr&quot; style=&quot;color: olive;&quot;&gt;/execute-command (.*?)( on (.*))?$/i&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #990000; font-weight: 700;&quot;&gt;(msg) -&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;a href=&quot;https://www.blogger.com/null&quot; name=&quot;execute-commands.coffee-35&quot; style=&quot;color: #3572b0;&quot;&gt;&lt;/a&gt;        &lt;span class=&quot;nx&quot;&gt;msg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;send&lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #bb8844;&quot;&gt;&quot;MSG_ENVELOPE: &lt;/span&gt;&lt;span class=&quot;si&quot; style=&quot;color: #bb8844;&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;msg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;envelope&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;user&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;roles&lt;/span&gt;&lt;span class=&quot;si&quot; style=&quot;color: #bb8844;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #bb8844;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;si&quot; style=&quot;color: #bb8844;&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;process&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;env&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;HUBOT_AUTH_ADMIN&lt;/span&gt;&lt;span class=&quot;si&quot; style=&quot;color: #bb8844;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #bb8844;&quot;&gt; &quot;&lt;/span&gt;&lt;br /&gt;&lt;a href=&quot;https://www.blogger.com/null&quot; name=&quot;execute-commands.coffee-36&quot; style=&quot;color: #3572b0;&quot;&gt;&lt;/a&gt;        &lt;span class=&quot;k&quot; style=&quot;font-weight: 700;&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;robot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;auth&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;hasRole&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;msg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;envelope&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;user&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #bb8844;&quot;&gt;&#39;superadmin&#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;br /&gt;&lt;a href=&quot;https://www.blogger.com/null&quot; name=&quot;execute-commands.coffee-37&quot; style=&quot;color: #3572b0;&quot;&gt;&lt;/a&gt;            &lt;span class=&quot;c1&quot; style=&quot;color: #999988; font-style: italic;&quot;&gt;# msg.send &quot;Command is :  #{msg.match[1]} for host: #{msg.match[3]}&quot;&lt;/span&gt;&lt;br /&gt;&lt;a href=&quot;https://www.blogger.com/null&quot; name=&quot;execute-commands.coffee-38&quot; style=&quot;color: #3572b0;&quot;&gt;&lt;/a&gt;            &lt;span class=&quot;c1&quot; style=&quot;color: #999988; font-style: italic;&quot;&gt;#command = &quot;ssh hubot@#{msg.match[3]} #{msg.match[1]}&quot;&lt;/span&gt;&lt;br /&gt;&lt;a href=&quot;https://www.blogger.com/null&quot; name=&quot;execute-commands.coffee-39&quot; style=&quot;color: #3572b0;&quot;&gt;&lt;/a&gt;            &lt;span class=&quot;nv&quot; style=&quot;color: teal;&quot;&gt;command = &lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #bb8844;&quot;&gt;&quot;parallel-ssh -i  -O StrictHostKeyChecking=no  -l hubot -H \&quot;&lt;/span&gt;&lt;span class=&quot;si&quot; style=&quot;color: #bb8844;&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;msg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;match&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #009999;&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;si&quot; style=&quot;color: #bb8844;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #bb8844;&quot;&gt;\&quot; -v -i \&quot;&lt;/span&gt;&lt;span class=&quot;si&quot; style=&quot;color: #bb8844;&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;msg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;match&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot; style=&quot;color: #009999;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;si&quot; style=&quot;color: #bb8844;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #bb8844;&quot;&gt;\&quot; &quot;&lt;/span&gt;&lt;br /&gt;&lt;a href=&quot;https://www.blogger.com/null&quot; name=&quot;execute-commands.coffee-40&quot; style=&quot;color: #3572b0;&quot;&gt;&lt;/a&gt;            &lt;span class=&quot;vi&quot; style=&quot;color: teal;&quot;&gt;@exec = &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #bb8844;&quot;&gt;&#39;child_process&#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;exec&lt;/span&gt;&lt;br /&gt;&lt;a href=&quot;https://www.blogger.com/null&quot; name=&quot;execute-commands.coffee-41&quot; style=&quot;color: #3572b0;&quot;&gt;&lt;/a&gt;            &lt;span class=&quot;nx&quot;&gt;msg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;send&lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #bb8844;&quot;&gt;&quot;This is the command &lt;/span&gt;&lt;span class=&quot;si&quot; style=&quot;color: #bb8844;&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;command&lt;/span&gt;&lt;span class=&quot;si&quot; style=&quot;color: #bb8844;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s&quot; style=&quot;color: #bb8844;&quot;&gt;.&quot;&lt;/span&gt;&lt;br /&gt;&lt;a href=&quot;https://www.blogger.com/null&quot; name=&quot;execute-commands.coffee-42&quot; style=&quot;color: #3572b0;&quot;&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://www.blogger.com/null&quot; name=&quot;execute-commands.coffee-43&quot; style=&quot;color: #3572b0;&quot;&gt;&lt;/a&gt;            &lt;span class=&quot;nx&quot;&gt;@exec&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;command&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nf&quot; style=&quot;color: #990000; font-weight: 700;&quot;&gt;(error, stdout, stderr) -&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;a href=&quot;https://www.blogger.com/null&quot; name=&quot;execute-commands.coffee-44&quot; style=&quot;color: #3572b0;&quot;&gt;&lt;/a&gt;                &lt;span class=&quot;nx&quot;&gt;msg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;send&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;error&lt;/span&gt;&lt;br /&gt;&lt;a href=&quot;https://www.blogger.com/null&quot; name=&quot;execute-commands.coffee-45&quot; style=&quot;color: #3572b0;&quot;&gt;&lt;/a&gt;                &lt;span class=&quot;nx&quot;&gt;msg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;send&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;stdout&lt;/span&gt;&lt;br /&gt;&lt;a href=&quot;https://www.blogger.com/null&quot; name=&quot;execute-commands.coffee-46&quot; style=&quot;color: #3572b0;&quot;&gt;&lt;/a&gt;                &lt;span class=&quot;nx&quot;&gt;msg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;send&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;stderr&lt;/span&gt;&lt;br /&gt;&lt;a href=&quot;https://www.blogger.com/null&quot; name=&quot;execute-commands.coffee-47&quot; style=&quot;color: #3572b0;&quot;&gt;&lt;/a&gt;        &lt;span class=&quot;k&quot; style=&quot;font-weight: 700;&quot;&gt;else&lt;/span&gt; &lt;br /&gt;&lt;a href=&quot;https://www.blogger.com/null&quot; name=&quot;execute-commands.coffee-48&quot; style=&quot;color: #3572b0;&quot;&gt;&lt;/a&gt;            &lt;span class=&quot;nx&quot;&gt;msg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;send&lt;/span&gt; &lt;span class=&quot;s&quot; style=&quot;color: #bb8844;&quot;&gt;&quot;To execute these commands you need to be part of superadmin group&quot;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;background-color: white; color: #333333; font-family: Consolas, Menlo, &amp;quot;Liberation Mono&amp;quot;, Courier, monospace; font-size: 12px; line-height: 1.4; padding: 0px;&quot;&gt;&lt;span class=&quot;s&quot; style=&quot;color: #bb8844;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div style=&quot;line-height: 1.4; padding: 0px;&quot;&gt;&lt;span class=&quot;s&quot;&gt;This small script will allow you to login into any of the system in infra controlled by&amp;nbsp;&lt;/span&gt;ssh keys and and hubot group role. Of course you have to install role module given by hubot first.&amp;nbsp;&lt;/div&gt;&lt;pre style=&quot;background-color: white; color: #333333; font-family: Consolas, Menlo, &amp;quot;Liberation Mono&amp;quot;, Courier, monospace; font-size: 12px; line-height: 1.4; padding: 0px;&quot;&gt;&lt;span class=&quot;s2&quot; style=&quot;color: #bb8844;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;background-color: white; color: #333333; font-family: Consolas, Menlo, &amp;quot;Liberation Mono&amp;quot;, Courier, monospace; font-size: 12px; line-height: 1.4; padding: 0px;&quot;&gt;&lt;span class=&quot;s2&quot; style=&quot;color: #bb8844;&quot;&gt;# npm install &quot;hubot-auth&quot; --save &lt;/span&gt;&lt;/pre&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;The above will write the code to package.json and manage an entry inside external-scripts.json file as well. &lt;/div&gt;&lt;div&gt;Lets test it now,&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://3.bp.blogspot.com/-8uEhKM7Ci08/V_ZHZbEKR4I/AAAAAAAAANY/wVSDpcrRpIMQOS9vBr4-ZVFG6YGn0ciawCLcB/s1600/Screenshot%2Bfrom%2B2016-10-06%2B18-14-29.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;161&quot; src=&quot;https://3.bp.blogspot.com/-8uEhKM7Ci08/V_ZHZbEKR4I/AAAAAAAAANY/wVSDpcrRpIMQOS9vBr4-ZVFG6YGn0ciawCLcB/s640/Screenshot%2Bfrom%2B2016-10-06%2B18-14-29.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Since this is configured with paralled-ssh this will allow you to manage whole set of servers using their ip. This gives us some control and audit out of box with custom roles based on room and role.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Happy chatting.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shutech.blogspot.com/feeds/4685743668039229289/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shutech.blogspot.com/2016/05/hubot-and-hipchat.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/420298197680100543/posts/default/4685743668039229289'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/420298197680100543/posts/default/4685743668039229289'/><link rel='alternate' type='text/html' href='http://shutech.blogspot.com/2016/05/hubot-and-hipchat.html' title='Hubot and Hipchat'/><author><name>singh</name><uri>http://www.blogger.com/profile/05560598178578014708</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://3.bp.blogspot.com/-8uEhKM7Ci08/V_ZHZbEKR4I/AAAAAAAAANY/wVSDpcrRpIMQOS9vBr4-ZVFG6YGn0ciawCLcB/s72-c/Screenshot%2Bfrom%2B2016-10-06%2B18-14-29.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-420298197680100543.post-5714190361250340612</id><published>2016-05-15T20:36:00.001-07:00</published><updated>2016-05-15T20:36:28.565-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="api"/><category scheme="http://www.blogger.com/atom/ns#" term="hipchat"/><category scheme="http://www.blogger.com/atom/ns#" term="icinga2"/><category scheme="http://www.blogger.com/atom/ns#" term="monitoring"/><category scheme="http://www.blogger.com/atom/ns#" term="nagios"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby"/><title type='text'>Hipchat and Icinga</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;h1 style=&quot;border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 2.25em; line-height: 1.2; margin-bottom: 16px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0.3em;&quot;&gt;hipchat_notify_2.0&lt;/h1&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;Hipchat notification with API 2.0 to be used with ICINGA/Nagios&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;Source code:&amp;nbsp;https://github.com/shubhamitc/hipchat_notify_2.0&lt;/div&gt;&lt;h1 style=&quot;border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 2.25em; line-height: 1.2; margin: 1em 0px 16px; padding-bottom: 0.3em;&quot;&gt;&lt;a aria-hidden=&quot;true&quot; class=&quot;anchor&quot; href=&quot;https://github.com/shubhamitc/hipchat_notify_2.0#table-of-contents&quot; id=&quot;user-content-table-of-contents&quot; style=&quot;box-sizing: border-box; color: #4078c0; display: inline-block; line-height: 1; margin-left: -18px; padding-right: 2px; text-decoration: none;&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; class=&quot;octicon octicon-link&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path d=&quot;M4 9h1v1h-1c-1.5 0-3-1.69-3-3.5s1.55-3.5 3-3.5h4c1.45 0 3 1.69 3 3.5 0 1.41-0.91 2.72-2 3.25v-1.16c0.58-0.45 1-1.27 1-2.09 0-1.28-1.02-2.5-2-2.5H4c-0.98 0-2 1.22-2 2.5s1 2.5 2 2.5z m9-3h-1v1h1c1 0 2 1.22 2 2.5s-1.02 2.5-2 2.5H9c-0.98 0-2-1.22-2-2.5 0-0.83 0.42-1.64 1-2.09v-1.16c-1.09 0.53-2 1.84-2 3.25 0 1.81 1.55 3.5 3 3.5h4c1.45 0 3-1.69 3-3.5s-1.5-3.5-3-3.5z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Table of Contents&lt;/h1&gt;&lt;blockquote style=&quot;border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 4px; box-sizing: border-box; color: #777777; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin: 0px 0px 16px; padding: 0px 15px;&quot;&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px;&quot;&gt;&lt;a href=&quot;https://github.com/shubhamitc/hipchat_notify_2.0#table-of-contents&quot; style=&quot;box-sizing: border-box; color: #4078c0; text-decoration: none;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;Table of Contents&lt;/em&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px;&quot;&gt;&lt;a href=&quot;https://github.com/shubhamitc/hipchat_notify_2.0#author&quot; style=&quot;box-sizing: border-box; color: #4078c0; text-decoration: none;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;Author&lt;/em&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px;&quot;&gt;&lt;a href=&quot;https://github.com/shubhamitc/hipchat_notify_2.0#audience&quot; style=&quot;box-sizing: border-box; color: #4078c0; text-decoration: none;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;Audience&lt;/em&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px;&quot;&gt;&lt;a href=&quot;https://github.com/shubhamitc/hipchat_notify_2.0#introduction&quot; style=&quot;box-sizing: border-box; color: #4078c0; text-decoration: none;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;Introduction&lt;/em&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px;&quot;&gt;&lt;a href=&quot;https://github.com/shubhamitc/hipchat_notify_2.0#ruby-script&quot; style=&quot;box-sizing: border-box; color: #4078c0; text-decoration: none;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;Ruby Script&lt;/em&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px;&quot;&gt;&lt;a href=&quot;https://github.com/shubhamitc/hipchat_notify_2.0#script-used-on-server&quot; style=&quot;box-sizing: border-box; color: #4078c0; text-decoration: none;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;Script used on server&lt;/em&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px;&quot;&gt;&lt;a href=&quot;https://github.com/shubhamitc/hipchat_notify_2.0#service-notification&quot; style=&quot;box-sizing: border-box; color: #4078c0; text-decoration: none;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;Service notification&lt;/em&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px;&quot;&gt;&lt;a href=&quot;https://github.com/shubhamitc/hipchat_notify_2.0#host-notification&quot; style=&quot;box-sizing: border-box; color: #4078c0; text-decoration: none;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;Host notification&lt;/em&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px;&quot;&gt;&lt;a href=&quot;https://github.com/shubhamitc/hipchat_notify_2.0#change-in-command.conf-for-icinga-server&quot; style=&quot;box-sizing: border-box; color: #4078c0; text-decoration: none;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;Change in command.conf for Icinga server&lt;/em&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px;&quot;&gt;&lt;a href=&quot;https://github.com/shubhamitc/hipchat_notify_2.0#example-notification&quot; style=&quot;box-sizing: border-box; color: #4078c0; text-decoration: none;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;Example notification&lt;/em&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;&lt;a href=&quot;https://github.com/shubhamitc/hipchat_notify_2.0#roadmap&quot; style=&quot;box-sizing: border-box; color: #4078c0; text-decoration: none;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;Roadmap&lt;/em&gt;&lt;/a&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;h1 style=&quot;border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 2.25em; line-height: 1.2; margin: 1em 0px 16px; padding-bottom: 0.3em;&quot;&gt;&lt;a aria-hidden=&quot;true&quot; class=&quot;anchor&quot; href=&quot;https://github.com/shubhamitc/hipchat_notify_2.0#author&quot; id=&quot;user-content-author&quot; style=&quot;box-sizing: border-box; color: #4078c0; display: inline-block; line-height: 1; margin-left: -18px; padding-right: 2px; text-decoration: none;&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; class=&quot;octicon octicon-link&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path d=&quot;M4 9h1v1h-1c-1.5 0-3-1.69-3-3.5s1.55-3.5 3-3.5h4c1.45 0 3 1.69 3 3.5 0 1.41-0.91 2.72-2 3.25v-1.16c0.58-0.45 1-1.27 1-2.09 0-1.28-1.02-2.5-2-2.5H4c-0.98 0-2 1.22-2 2.5s1 2.5 2 2.5z m9-3h-1v1h1c1 0 2 1.22 2 2.5s-1.02 2.5-2 2.5H9c-0.98 0-2-1.22-2-2.5 0-0.83 0.42-1.64 1-2.09v-1.16c-1.09 0.53-2 1.84-2 3.25 0 1.81 1.55 3.5 3 3.5h4c1.45 0 3-1.69 3-3.5s-1.5-3.5-3-3.5z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Author&lt;/h1&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;&lt;a href=&quot;mailto:Shubhamkr619@gmail.com&quot; style=&quot;box-sizing: border-box; color: #4078c0; text-decoration: none;&quot;&gt;Shubhamkr619@gmail.com&lt;/a&gt;&lt;/div&gt;&lt;h1 style=&quot;border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 2.25em; line-height: 1.2; margin: 1em 0px 16px; padding-bottom: 0.3em;&quot;&gt;&lt;a aria-hidden=&quot;true&quot; class=&quot;anchor&quot; href=&quot;https://github.com/shubhamitc/hipchat_notify_2.0#audience-&quot; id=&quot;user-content-audience-&quot; style=&quot;box-sizing: border-box; color: #4078c0; display: inline-block; line-height: 1; margin-left: -18px; padding-right: 2px; text-decoration: none;&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; class=&quot;octicon octicon-link&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path d=&quot;M4 9h1v1h-1c-1.5 0-3-1.69-3-3.5s1.55-3.5 3-3.5h4c1.45 0 3 1.69 3 3.5 0 1.41-0.91 2.72-2 3.25v-1.16c0.58-0.45 1-1.27 1-2.09 0-1.28-1.02-2.5-2-2.5H4c-0.98 0-2 1.22-2 2.5s1 2.5 2 2.5z m9-3h-1v1h1c1 0 2 1.22 2 2.5s-1.02 2.5-2 2.5H9c-0.98 0-2-1.22-2-2.5 0-0.83 0.42-1.64 1-2.09v-1.16c-1.09 0.53-2 1.84-2 3.25 0 1.81 1.55 3.5 3 3.5h4c1.45 0 3-1.69 3-3.5s-1.5-3.5-3-3.5z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Audience&lt;/h1&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;System Engineers and operation engineers&lt;/div&gt;&lt;ul style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px; margin-top: 0px; padding-left: 2em;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;&lt;a href=&quot;mailto:pops@gmail.com&quot; style=&quot;box-sizing: border-box; color: #4078c0; text-decoration: none;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;pops@gmail.com&lt;/em&gt;&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;&lt;a href=&quot;mailto:suyog.shirgaonkar@gmail.com&quot; style=&quot;box-sizing: border-box; color: #4078c0; text-decoration: none;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;suyog.shirgaonkar@gmail.com&lt;/em&gt;&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h1 style=&quot;border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 2.25em; line-height: 1.2; margin: 1em 0px 16px; padding-bottom: 0.3em;&quot;&gt;&lt;a aria-hidden=&quot;true&quot; class=&quot;anchor&quot; href=&quot;https://github.com/shubhamitc/hipchat_notify_2.0#introduction&quot; id=&quot;user-content-introduction&quot; style=&quot;box-sizing: border-box; color: #4078c0; display: inline-block; line-height: 1; margin-left: -18px; padding-right: 2px; text-decoration: none;&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; class=&quot;octicon octicon-link&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path d=&quot;M4 9h1v1h-1c-1.5 0-3-1.69-3-3.5s1.55-3.5 3-3.5h4c1.45 0 3 1.69 3 3.5 0 1.41-0.91 2.72-2 3.25v-1.16c0.58-0.45 1-1.27 1-2.09 0-1.28-1.02-2.5-2-2.5H4c-0.98 0-2 1.22-2 2.5s1 2.5 2 2.5z m9-3h-1v1h1c1 0 2 1.22 2 2.5s-1.02 2.5-2 2.5H9c-0.98 0-2-1.22-2-2.5 0-0.83 0.42-1.64 1-2.09v-1.16c-1.09 0.53-2 1.84-2 3.25 0 1.81 1.55 3.5 3 3.5h4c1.45 0 3-1.69 3-3.5s-1.5-3.5-3-3.5z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Introduction&lt;/h1&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;Change the default mail notification of Icinga server to hipchat notification using ruby code. This will allow a single place of management of all the notification and alerts across organization. Let that be service,host or business level alerts all can be managed and monitored using hipchat and hubot will give certain advantage over traditional alerting system.&lt;/div&gt;&lt;ol style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px; margin-top: 0px; padding-left: 2em;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;Proactive and reactive alerting&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;Managed monitoring&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;Single place of all the alerts&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;Better communication and collaboration&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;Integration with multiple tools in CI cycle&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;a. Jenkins&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;b. Chef&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;c. Bitbucket/Github&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;d. Jira&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;e. Confluence …. Etc&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;As per plan once Elastalert is implemented Hipchat will support business and revenue alerts, and hopefully with event based proactive/reactive handling or issues.&lt;/div&gt;&lt;h1 style=&quot;border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 2.25em; line-height: 1.2; margin: 1em 0px 16px; padding-bottom: 0.3em;&quot;&gt;&lt;a aria-hidden=&quot;true&quot; class=&quot;anchor&quot; href=&quot;https://github.com/shubhamitc/hipchat_notify_2.0#ruby-script&quot; id=&quot;user-content-ruby-script&quot; style=&quot;box-sizing: border-box; color: #4078c0; display: inline-block; line-height: 1; margin-left: -18px; padding-right: 2px; text-decoration: none;&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; class=&quot;octicon octicon-link&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path d=&quot;M4 9h1v1h-1c-1.5 0-3-1.69-3-3.5s1.55-3.5 3-3.5h4c1.45 0 3 1.69 3 3.5 0 1.41-0.91 2.72-2 3.25v-1.16c0.58-0.45 1-1.27 1-2.09 0-1.28-1.02-2.5-2-2.5H4c-0.98 0-2 1.22-2 2.5s1 2.5 2 2.5z m9-3h-1v1h1c1 0 2 1.22 2 2.5s-1.02 2.5-2 2.5H9c-0.98 0-2-1.22-2-2.5 0-0.83 0.42-1.64 1-2.09v-1.16c-1.09 0.53-2 1.84-2 3.25 0 1.81 1.55 3.5 3 3.5h4c1.45 0 3-1.69 3-3.5s-1.5-3.5-3-3.5z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Ruby Script&lt;/h1&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;Need to create a Ruby script in order to make sure that we can send messages from a single server. Idea here is to be able to configure icinga server to send message to custom user groups and Hipchat account.&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;We are going to use a Ruby gem called hipchat which will support API version 2.0. In order for script to work we need to install 2 gems,&lt;/div&gt;&lt;ol style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px; margin-top: 0px; padding-left: 2em;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;Hipchat&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;Trollop&lt;/div&gt;&lt;hr style=&quot;background: rgb(231, 231, 231); border: 0px none; box-sizing: content-box; height: 4px; margin: 16px 0px; overflow: hidden; padding: 0px;&quot; /&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;# apt-get install ruby -y&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;# gem install hipchat&lt;/div&gt;&lt;h2 style=&quot;border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; font-size: 1.75em; line-height: 1.225; margin-bottom: 16px; margin-top: 1em; padding-bottom: 0.3em;&quot;&gt;&lt;a aria-hidden=&quot;true&quot; class=&quot;anchor&quot; href=&quot;https://github.com/shubhamitc/hipchat_notify_2.0#-gem-install-trollop&quot; id=&quot;user-content--gem-install-trollop&quot; style=&quot;box-sizing: border-box; color: #4078c0; display: inline-block; line-height: 1; margin-left: -18px; padding-right: 2px; text-decoration: none;&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; class=&quot;octicon octicon-link&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path d=&quot;M4 9h1v1h-1c-1.5 0-3-1.69-3-3.5s1.55-3.5 3-3.5h4c1.45 0 3 1.69 3 3.5 0 1.41-0.91 2.72-2 3.25v-1.16c0.58-0.45 1-1.27 1-2.09 0-1.28-1.02-2.5-2-2.5H4c-0.98 0-2 1.22-2 2.5s1 2.5 2 2.5z m9-3h-1v1h1c1 0 2 1.22 2 2.5s-1.02 2.5-2 2.5H9c-0.98 0-2-1.22-2-2.5 0-0.83 0.42-1.64 1-2.09v-1.16c-1.09 0.53-2 1.84-2 3.25 0 1.81 1.55 3.5 3 3.5h4c1.45 0 3-1.69 3-3.5s-1.5-3.5-3-3.5z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;# gem install trollop&lt;/h2&gt;&lt;hr style=&quot;background: rgb(231, 231, 231); border: 0px none; box-sizing: content-box; height: 4px; margin: 16px 0px; overflow: hidden; padding: 0px;&quot; /&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;#!/usr/bin/env ruby&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;require &#39;hipchat&#39;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;require &#39;trollop&#39;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;#&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;# Provides a hipchat notifier with minimal requirements.&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;# Post the nofication to room&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;#&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;# Docs:&amp;nbsp;&lt;a href=&quot;http://wiki.opscode.com/display/chef/Exception+and+Report+Handlers&quot; style=&quot;box-sizing: border-box; color: #4078c0; text-decoration: none;&quot;&gt;http://wiki.opscode.com/display/chef/Exception+and+Report+Handlers&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;#&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;# Install - add the following to your client.rb:&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;# gem install hipchat # Configure CLI entries&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;# gem install trollop # configure commandline option parser&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;module HipChat&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;class NotifyRoomCli&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;def initialize(api_token, room_name, msg, options={})&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;defaults = { hipchat_options: {api_version: &#39;v2&#39;,server_url: &#39;&lt;a href=&quot;https://api.hipchat.com/&quot; style=&quot;box-sizing: border-box; color: #4078c0; text-decoration: none;&quot;&gt;https://api.hipchat.com&lt;/a&gt;&#39;}, msg_options: {:notify =&amp;gt; true}, excluded_envs: [], msg_prefix: &#39;&#39;}&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;options = defaults.merge(options)&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;@api_token = api_token&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;@room_name = room_name&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;@msg = msg&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;@hipchat_options = options[:hipchat_options]&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;@msg_options = options[:msg_options]&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;@msg_prefix = options[:msg_prefix]&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;@excluded_envs = options[:excluded_envs]&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;@to_user=options[:name]&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;case&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;when options[:alerttype].match(/warning/i)&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;@color = &#39;yellow&#39;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;when options[:alerttype].match(/critical/i)&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;@color = &#39;red&#39;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;when options[:alerttype].match(/info/i)&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;@color = &#39;green&#39;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;end if options[:alerttype]&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;end&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;def report&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;if @msg&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;@msg_options[:color]=(@color || &#39;yellow&#39;)&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;client = HipChat::Client.new(@api_token, @hipchat_options)&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;client[@room_name].send(@to_user, [@msg_prefix, @msg].join(&#39; &#39;), @msg_options)&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;end&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;end&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;end&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;end&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;begin&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;opts = Trollop::options do&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;opt :message, &quot;Use monkey mode&quot; ,:type =&amp;gt; :string # flag --monkey, default false&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;opt :name, &quot;Monkey name&quot;, :type =&amp;gt; :string # string --name &amp;lt;s&amp;gt;, default nil&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;opt :apitoken, &quot;HIPCHAT API Token 2.0&quot;, :type=&amp;gt; :string&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;opt :roomname, &quot;Room id from Hipchat&quot;, :type=&amp;gt; :string&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;opt :alerttype, &quot;warning/critical/info&quot;, :type =&amp;gt; :string&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;end&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;[ :message, :apitoken, :roomname].each do |key|&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;Trollop::die &quot;arguments required --#{key}&quot; unless opts[key]&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;end&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;hipchat=HipChat::NotifyRoomCli.new(opts[:apitoken],opts[:roomname],opts[:message],opts)&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;hipchat.report&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;rescue Errno::ENOENT =&amp;gt; err&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;abort &quot;hip_chat_cli: #{err.message}&quot;&lt;/div&gt;&lt;h2 style=&quot;border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; font-size: 1.75em; line-height: 1.225; margin-bottom: 16px; margin-top: 1em; padding-bottom: 0.3em;&quot;&gt;&lt;a aria-hidden=&quot;true&quot; class=&quot;anchor&quot; href=&quot;https://github.com/shubhamitc/hipchat_notify_2.0#end&quot; id=&quot;user-content-end&quot; style=&quot;box-sizing: border-box; color: #4078c0; display: inline-block; line-height: 1; margin-left: -18px; padding-right: 2px; text-decoration: none;&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; class=&quot;octicon octicon-link&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path d=&quot;M4 9h1v1h-1c-1.5 0-3-1.69-3-3.5s1.55-3.5 3-3.5h4c1.45 0 3 1.69 3 3.5 0 1.41-0.91 2.72-2 3.25v-1.16c0.58-0.45 1-1.27 1-2.09 0-1.28-1.02-2.5-2-2.5H4c-0.98 0-2 1.22-2 2.5s1 2.5 2 2.5z m9-3h-1v1h1c1 0 2 1.22 2 2.5s-1.02 2.5-2 2.5H9c-0.98 0-2-1.22-2-2.5 0-0.83 0.42-1.64 1-2.09v-1.16c-1.09 0.53-2 1.84-2 3.25 0 1.81 1.55 3.5 3 3.5h4c1.45 0 3-1.69 3-3.5s-1.5-3.5-3-3.5z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;end&lt;/h2&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h1 style=&quot;border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 2.25em; line-height: 1.2; margin: 1em 0px 16px; padding-bottom: 0.3em;&quot;&gt;&lt;a aria-hidden=&quot;true&quot; class=&quot;anchor&quot; href=&quot;https://github.com/shubhamitc/hipchat_notify_2.0#script-used-on-server&quot; id=&quot;user-content-script-used-on-server&quot; style=&quot;box-sizing: border-box; color: #4078c0; display: inline-block; line-height: 1; margin-left: -18px; padding-right: 2px; text-decoration: none;&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; class=&quot;octicon octicon-link&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path d=&quot;M4 9h1v1h-1c-1.5 0-3-1.69-3-3.5s1.55-3.5 3-3.5h4c1.45 0 3 1.69 3 3.5 0 1.41-0.91 2.72-2 3.25v-1.16c0.58-0.45 1-1.27 1-2.09 0-1.28-1.02-2.5-2-2.5H4c-0.98 0-2 1.22-2 2.5s1 2.5 2 2.5z m9-3h-1v1h1c1 0 2 1.22 2 2.5s-1.02 2.5-2 2.5H9c-0.98 0-2-1.22-2-2.5 0-0.83 0.42-1.64 1-2.09v-1.16c-1.09 0.53-2 1.84-2 3.25 0 1.81 1.55 3.5 3 3.5h4c1.45 0 3-1.69 3-3.5s-1.5-3.5-3-3.5z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Script used on server&lt;/h1&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;following is a script which should which we need to configure to use this code with a icinga server&lt;/div&gt;&lt;h2 style=&quot;border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 1.75em; line-height: 1.225; margin-bottom: 16px; margin-top: 1em; padding-bottom: 0.3em;&quot;&gt;&lt;a aria-hidden=&quot;true&quot; class=&quot;anchor&quot; href=&quot;https://github.com/shubhamitc/hipchat_notify_2.0#service-notification&quot; id=&quot;user-content-service-notification&quot; style=&quot;box-sizing: border-box; color: #4078c0; display: inline-block; line-height: 1; margin-left: -18px; padding-right: 2px; text-decoration: none;&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; class=&quot;octicon octicon-link&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path d=&quot;M4 9h1v1h-1c-1.5 0-3-1.69-3-3.5s1.55-3.5 3-3.5h4c1.45 0 3 1.69 3 3.5 0 1.41-0.91 2.72-2 3.25v-1.16c0.58-0.45 1-1.27 1-2.09 0-1.28-1.02-2.5-2-2.5H4c-0.98 0-2 1.22-2 2.5s1 2.5 2 2.5z m9-3h-1v1h1c1 0 2 1.22 2 2.5s-1.02 2.5-2 2.5H9c-0.98 0-2-1.22-2-2.5 0-0.83 0.42-1.64 1-2.09v-1.16c-1.09 0.53-2 1.84-2 3.25 0 1.81 1.55 3.5 3 3.5h4c1.45 0 3-1.69 3-3.5s-1.5-3.5-3-3.5z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Service notification&lt;/h2&gt;&lt;hr style=&quot;background: rgb(231, 231, 231); border: 0px none; box-sizing: content-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; height: 4px; line-height: 25.6px; margin: 16px 0px; overflow: hidden; padding: 0px;&quot; /&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;root@hubot0:/etc/icinga2/scripts# cat hipchat-service-notification.sh&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;#!/bin/sh&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;template=`cat &amp;lt;&amp;lt;TEMPLATE&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;***** Icinga *****&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;Notification Type: \$NOTIFICATIONTYPE&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;Service: \$SERVICEDESC&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;Host: \$HOSTALIAS&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;Address: \$HOSTADDRESS&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;State: \$SERVICESTATE&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;Date/Time: \$LONGDATETIME&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;Additional Info: \$SERVICEOUTPUT&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;Comment: [\$NOTIFICATIONAUTHORNAME] \$NOTIFICATIONCOMMENT&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;TEMPLATE&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;`&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;#/usr/bin/printf &quot;%b&quot; &quot;\$template&quot; | mail -s &quot;\$NOTIFICATIONTYPE - \$HOSTDISPLAYNAME - \$SERVICEDISPLAYNAME is \$SERVICESTATE&quot; \$USEREMAIL&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;dir=&quot;\$(readlink -f \$(dirname \$0))&quot;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;ruby \$dir/notify --message &quot;\$(/usr/bin/printf &quot;%b&quot; &quot;\$template&quot;)&quot; --name icinga --apitoken &quot;&amp;lt;TOKEN&amp;gt;&quot; --roomname 2614946 --alerttype &quot;\$SERVICESTATE&quot;&lt;/div&gt;&lt;hr style=&quot;background: rgb(231, 231, 231); border: 0px none; box-sizing: content-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; height: 4px; line-height: 25.6px; margin: 16px 0px; overflow: hidden; padding: 0px;&quot; /&gt;&lt;h2 style=&quot;border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 1.75em; line-height: 1.225; margin-bottom: 16px; margin-top: 1em; padding-bottom: 0.3em;&quot;&gt;&lt;a aria-hidden=&quot;true&quot; class=&quot;anchor&quot; href=&quot;https://github.com/shubhamitc/hipchat_notify_2.0#host-notification&quot; id=&quot;user-content-host-notification&quot; style=&quot;box-sizing: border-box; color: #4078c0; display: inline-block; line-height: 1; margin-left: -18px; padding-right: 2px; text-decoration: none;&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; class=&quot;octicon octicon-link&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path d=&quot;M4 9h1v1h-1c-1.5 0-3-1.69-3-3.5s1.55-3.5 3-3.5h4c1.45 0 3 1.69 3 3.5 0 1.41-0.91 2.72-2 3.25v-1.16c0.58-0.45 1-1.27 1-2.09 0-1.28-1.02-2.5-2-2.5H4c-0.98 0-2 1.22-2 2.5s1 2.5 2 2.5z m9-3h-1v1h1c1 0 2 1.22 2 2.5s-1.02 2.5-2 2.5H9c-0.98 0-2-1.22-2-2.5 0-0.83 0.42-1.64 1-2.09v-1.16c-1.09 0.53-2 1.84-2 3.25 0 1.81 1.55 3.5 3 3.5h4c1.45 0 3-1.69 3-3.5s-1.5-3.5-3-3.5z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Host notification&lt;/h2&gt;&lt;hr style=&quot;background: rgb(231, 231, 231); border: 0px none; box-sizing: content-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; height: 4px; line-height: 25.6px; margin: 16px 0px; overflow: hidden; padding: 0px;&quot; /&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;root@hubot0:/etc/icinga2/scripts# cat mail-host-notification-hipchat.sh&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;#!/bin/sh&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;dir=&quot;\$(readlink -f \$(dirname \$0))&quot;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;template=`cat &amp;lt;&amp;lt;EOF&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;HOST DOWN \$HOSTALIAS; Address: \$HOSTADDRESS; State: \$HOSTSTATE ; Date/Time: \$LONGDATETIME&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;Additional Info: \$HOSTOUTPUT&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;Comment: [\$NOTIFICATIONAUTHORNAME] \$NOTIFICATIONCOMMENT&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;EOF&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;`&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;ruby \$dir/notify --message &quot;\$(/usr/bin/printf &quot;%b&quot; &quot;\$template&quot;)&quot; --name icinga --apitoken &quot;&amp;lt;TOKEN&amp;gt;&quot; --roomname 2614946 --alerttype &quot;warning&quot;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;root@hubot0:/etc/icinga2/scripts#&lt;/div&gt;&lt;hr style=&quot;background: rgb(231, 231, 231); border: 0px none; box-sizing: content-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; height: 4px; line-height: 25.6px; margin: 16px 0px; overflow: hidden; padding: 0px;&quot; /&gt;&lt;h1 style=&quot;border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 2.25em; line-height: 1.2; margin: 1em 0px 16px; padding-bottom: 0.3em;&quot;&gt;&lt;a aria-hidden=&quot;true&quot; class=&quot;anchor&quot; href=&quot;https://github.com/shubhamitc/hipchat_notify_2.0#change-in-commandconf-for-icinga-server&quot; id=&quot;user-content-change-in-commandconf-for-icinga-server&quot; style=&quot;box-sizing: border-box; color: #4078c0; display: inline-block; line-height: 1; margin-left: -18px; padding-right: 2px; text-decoration: none;&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; class=&quot;octicon octicon-link&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path d=&quot;M4 9h1v1h-1c-1.5 0-3-1.69-3-3.5s1.55-3.5 3-3.5h4c1.45 0 3 1.69 3 3.5 0 1.41-0.91 2.72-2 3.25v-1.16c0.58-0.45 1-1.27 1-2.09 0-1.28-1.02-2.5-2-2.5H4c-0.98 0-2 1.22-2 2.5s1 2.5 2 2.5z m9-3h-1v1h1c1 0 2 1.22 2 2.5s-1.02 2.5-2 2.5H9c-0.98 0-2-1.22-2-2.5 0-0.83 0.42-1.64 1-2.09v-1.16c-1.09 0.53-2 1.84-2 3.25 0 1.81 1.55 3.5 3 3.5h4c1.45 0 3-1.69 3-3.5s-1.5-3.5-3-3.5z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Change in command.conf for Icinga server&lt;/h1&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;This will change the Icinga server to support the hipchat adapter ,&lt;/div&gt;&lt;hr style=&quot;background: rgb(231, 231, 231); border: 0px none; box-sizing: content-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; height: 4px; line-height: 25.6px; margin: 16px 0px; overflow: hidden; padding: 0px;&quot; /&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;root@hubot0:/etc/icinga2/scripts# cat ../conf.d/commands.conf&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;/* Command objects */&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;object NotificationCommand &quot;mail-host-notification&quot; {&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;import &quot;plugin-notification-command&quot;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;command = [ SysconfDir + &quot;/icinga2/scripts/mail-host-notification-hipchat.sh&quot; ]&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;env = {&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;NOTIFICATIONTYPE = &quot;\$notification.type\$&quot;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;HOSTALIAS = &quot;\$host.display_name\$&quot;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;HOSTADDRESS = &quot;\$address\$&quot;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;HOSTSTATE = &quot;\$host.state\$&quot;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;LONGDATETIME = &quot;\$icinga.long_date_time\$&quot;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;HOSTOUTPUT = &quot;\$host.output\$&quot;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;NOTIFICATIONAUTHORNAME = &quot;\$notification.author\$&quot;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;NOTIFICATIONCOMMENT = &quot;\$notification.comment\$&quot;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;HOSTDISPLAYNAME = &quot;\$host.display_name\$&quot;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;USEREMAIL = &quot;\$user.email\$&quot;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;object NotificationCommand &quot;mail-service-notification&quot; {&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;import &quot;plugin-notification-command&quot;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;command = [ SysconfDir + &quot;/icinga2/scripts/hipchat-service-notification.sh&quot; ]&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;env = {&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;NOTIFICATIONTYPE = &quot;\$notification.type\$&quot;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;SERVICEDESC = &quot;\$service.name\$&quot;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;HOSTALIAS = &quot;\$host.display_name\$&quot;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;HOSTADDRESS = &quot;\$address\$&quot;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;SERVICESTATE = &quot;\$service.state\$&quot;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;LONGDATETIME = &quot;\$icinga.long_date_time\$&quot;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;SERVICEOUTPUT = &quot;\$service.output\$&quot;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;NOTIFICATIONAUTHORNAME = &quot;\$notification.author\$&quot;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;NOTIFICATIONCOMMENT = &quot;\$notification.comment\$&quot;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;HOSTDISPLAYNAME = &quot;\$host.display_name\$&quot;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;SERVICEDISPLAYNAME = &quot;\$service.display_name\$&quot;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;USEREMAIL = &quot;\$user.email\$&quot;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;}&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;}&lt;/div&gt;&lt;hr style=&quot;background: rgb(231, 231, 231); border: 0px none; box-sizing: content-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; height: 4px; line-height: 25.6px; margin: 16px 0px; overflow: hidden; padding: 0px;&quot; /&gt;&lt;h1 style=&quot;border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 2.25em; line-height: 1.2; margin: 1em 0px 16px; padding-bottom: 0.3em;&quot;&gt;&lt;a aria-hidden=&quot;true&quot; class=&quot;anchor&quot; href=&quot;https://github.com/shubhamitc/hipchat_notify_2.0#example-notification&quot; id=&quot;user-content-example-notification&quot; style=&quot;box-sizing: border-box; color: #4078c0; display: inline-block; line-height: 1; margin-left: -18px; padding-right: 2px; text-decoration: none;&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; class=&quot;octicon octicon-link&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path d=&quot;M4 9h1v1h-1c-1.5 0-3-1.69-3-3.5s1.55-3.5 3-3.5h4c1.45 0 3 1.69 3 3.5 0 1.41-0.91 2.72-2 3.25v-1.16c0.58-0.45 1-1.27 1-2.09 0-1.28-1.02-2.5-2-2.5H4c-0.98 0-2 1.22-2 2.5s1 2.5 2 2.5z m9-3h-1v1h1c1 0 2 1.22 2 2.5s-1.02 2.5-2 2.5H9c-0.98 0-2-1.22-2-2.5 0-0.83 0.42-1.64 1-2.09v-1.16c-1.09 0.53-2 1.84-2 3.25 0 1.81 1.55 3.5 3 3.5h4c1.45 0 3-1.69 3-3.5s-1.5-3.5-3-3.5z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Example notification&lt;/h1&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px;&quot;&gt;&lt;a href=&quot;https://github.com/shubhamitc/hipchat_notify_2.0/blob/master/image1.png&quot; style=&quot;box-sizing: border-box; color: #4078c0; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;https://github.com/shubhamitc/hipchat_notify_2.0/raw/master/image1.png&quot; style=&quot;background-color: white; border-style: none; box-sizing: content-box; max-width: 100%;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;h1 style=&quot;border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 2.25em; line-height: 1.2; margin: 1em 0px 16px; padding-bottom: 0.3em;&quot;&gt;&lt;a aria-hidden=&quot;true&quot; class=&quot;anchor&quot; href=&quot;https://github.com/shubhamitc/hipchat_notify_2.0#roadmap&quot; id=&quot;user-content-roadmap&quot; style=&quot;box-sizing: border-box; color: #4078c0; display: inline-block; line-height: 1; margin-left: -18px; padding-right: 2px; text-decoration: none;&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; class=&quot;octicon octicon-link&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path d=&quot;M4 9h1v1h-1c-1.5 0-3-1.69-3-3.5s1.55-3.5 3-3.5h4c1.45 0 3 1.69 3 3.5 0 1.41-0.91 2.72-2 3.25v-1.16c0.58-0.45 1-1.27 1-2.09 0-1.28-1.02-2.5-2-2.5H4c-0.98 0-2 1.22-2 2.5s1 2.5 2 2.5z m9-3h-1v1h1c1 0 2 1.22 2 2.5s-1.02 2.5-2 2.5H9c-0.98 0-2-1.22-2-2.5 0-0.83 0.42-1.64 1-2.09v-1.16c-1.09 0.53-2 1.84-2 3.25 0 1.81 1.55 3.5 3 3.5h4c1.45 0 3-1.69 3-3.5s-1.5-3.5-3-3.5z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Roadmap&lt;/h1&gt;&lt;ol style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px; margin-bottom: 16px; margin-top: 0px; padding-left: 2em;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;Add hipchat user for Icinga server&lt;/div&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;Configure to talk to groups using token from user settings in&lt;/div&gt;&lt;blockquote style=&quot;border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 4px; box-sizing: border-box; color: #777777; margin: 0px 0px 16px; padding: 0px 15px;&quot;&gt;&lt;div style=&quot;box-sizing: border-box;&quot;&gt;hipchat&lt;/div&gt;&lt;/blockquote&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;Change notification files and update token+room_ids&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div style=&quot;box-sizing: border-box; color: #333333; font-family: &#39;Helvetica Neue&#39;, Helvetica, &#39;Segoe UI&#39;, Arial, freesans, sans-serif, &#39;Apple Color Emoji&#39;, &#39;Segoe UI Emoji&#39;, &#39;Segoe UI Symbol&#39;; font-size: 16px; line-height: 25.6px;&quot;&gt;All these steps are required to make sure hubot can take actions on events. For now hubot can not take actions if the user Hubot and notifying user is matched. It is required to prevent race conditions.&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shutech.blogspot.com/feeds/5714190361250340612/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shutech.blogspot.com/2016/05/hipchat-and-icinga.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/420298197680100543/posts/default/5714190361250340612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/420298197680100543/posts/default/5714190361250340612'/><link rel='alternate' type='text/html' href='http://shutech.blogspot.com/2016/05/hipchat-and-icinga.html' title='Hipchat and Icinga'/><author><name>singh</name><uri>http://www.blogger.com/profile/05560598178578014708</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-420298197680100543.post-4555665967127062169</id><published>2013-08-10T09:39:00.000-07:00</published><updated>2013-08-10T09:40:20.827-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mysql"/><category scheme="http://www.blogger.com/atom/ns#" term="mysql password"/><category scheme="http://www.blogger.com/atom/ns#" term="mysql user"/><title type='text'>Change password of mysql users</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;h2 style=&quot;text-align: center;&quot;&gt;&lt;b&gt;Change MySQL user&#39;s password in bulk&lt;/b&gt;&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Sometimes we need to change the password of mysql users at bulk. Lets say your company has fired a group of peoples or dissolved a project. This requirement can be supplied as :&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;We can achieve the same by changing the password field in mysql.user table. Password() is a predifined method in mysql which generates encrypted value of a certain string.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoTableLightGridAccent3&quot; style=&quot;border-collapse: collapse; border: none; mso-border-alt: solid #9BBB59 1.0pt; mso-border-themecolor: accent3; mso-padding-alt: 0in 5.4pt 0in 5.4pt; mso-yfti-tbllook: 1184;&quot;&gt; &lt;tbody&gt;&lt;tr&gt;  &lt;td style=&quot;border-bottom: solid #9BBB59 2.25pt; border: solid #9BBB59 1.0pt; mso-border-bottom-themecolor: accent3; mso-border-themecolor: accent3; padding: 0in 5.4pt 0in 5.4pt; width: 206.05pt;&quot; valign=&quot;top&quot; width=&quot;275&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Cambria, serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;host&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;  &lt;td style=&quot;border-bottom: solid #9BBB59 2.25pt; border-left: none; border-right: solid #9BBB59 1.0pt; border-top: solid #9BBB59 1.0pt; mso-border-bottom-themecolor: accent3; mso-border-left-alt: solid #9BBB59 1.0pt; mso-border-left-themecolor: accent3; mso-border-right-themecolor: accent3; mso-border-top-themecolor: accent3; padding: 0in 5.4pt 0in 5.4pt; width: 272.75pt;&quot; valign=&quot;top&quot; width=&quot;364&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-family: Cambria, serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;update mysql.user set password = PASSWORD(&quot;passwd&quot;)   where host IN (&amp;lt;Comma separated list of HostName/IP&amp;gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td style=&quot;background: #E6EED5; border-top: none; border: solid #9BBB59 1.0pt; mso-background-themecolor: accent3; mso-background-themetint: 63; mso-border-themecolor: accent3; mso-border-top-alt: solid #9BBB59 1.0pt; mso-border-top-themecolor: accent3; padding: 0in 5.4pt 0in 5.4pt; width: 206.05pt;&quot; valign=&quot;top&quot; width=&quot;275&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Cambria, serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;user&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;  &lt;td style=&quot;background: #E6EED5; border-bottom: solid #9BBB59 1.0pt; border-left: none; border-right: solid #9BBB59 1.0pt; border-top: none; mso-background-themecolor: accent3; mso-background-themetint: 63; mso-border-bottom-themecolor: accent3; mso-border-left-alt: solid #9BBB59 1.0pt; mso-border-left-themecolor: accent3; mso-border-right-themecolor: accent3; mso-border-top-alt: solid #9BBB59 1.0pt; mso-border-top-themecolor: accent3; padding: 0in 5.4pt 0in 5.4pt; width: 272.75pt;&quot; valign=&quot;top&quot; width=&quot;364&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;update mysql.user set   password = PASSWORD(&quot;passwd&quot;) where user IN (&amp;lt;Comma separated list   of ‘user’@’host’&amp;gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td style=&quot;border-top: none; border: solid #9BBB59 1.0pt; mso-border-themecolor: accent3; mso-border-top-alt: solid #9BBB59 1.0pt; mso-border-top-themecolor: accent3; padding: 0in 5.4pt 0in 5.4pt; width: 206.05pt;&quot; valign=&quot;top&quot; width=&quot;275&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;td style=&quot;border-bottom: solid #9BBB59 1.0pt; border-left: none; border-right: solid #9BBB59 1.0pt; border-top: none; mso-border-bottom-themecolor: accent3; mso-border-left-alt: solid #9BBB59 1.0pt; mso-border-left-themecolor: accent3; mso-border-right-themecolor: accent3; mso-border-top-alt: solid #9BBB59 1.0pt; mso-border-top-themecolor: accent3; padding: 0in 5.4pt 0in 5.4pt; width: 272.75pt;&quot; valign=&quot;top&quot; width=&quot;364&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt;  &lt;td style=&quot;background: #E6EED5; border-top: none; border: solid #9BBB59 1.0pt; mso-background-themecolor: accent3; mso-background-themetint: 63; mso-border-themecolor: accent3; mso-border-top-alt: solid #9BBB59 1.0pt; mso-border-top-themecolor: accent3; padding: 0in 5.4pt 0in 5.4pt; width: 206.05pt;&quot; valign=&quot;top&quot; width=&quot;275&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt;  &lt;td style=&quot;background: #E6EED5; border-bottom: solid #9BBB59 1.0pt; border-left: none; border-right: solid #9BBB59 1.0pt; border-top: none; mso-background-themecolor: accent3; mso-background-themetint: 63; mso-border-bottom-themecolor: accent3; mso-border-left-alt: solid #9BBB59 1.0pt; mso-border-left-themecolor: accent3; mso-border-right-themecolor: accent3; mso-border-top-alt: solid #9BBB59 1.0pt; mso-border-top-themecolor: accent3; padding: 0in 5.4pt 0in 5.4pt; width: 272.75pt;&quot; valign=&quot;top&quot; width=&quot;364&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shutech.blogspot.com/feeds/4555665967127062169/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shutech.blogspot.com/2013/08/change-password-of-mysql-users.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/420298197680100543/posts/default/4555665967127062169'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/420298197680100543/posts/default/4555665967127062169'/><link rel='alternate' type='text/html' href='http://shutech.blogspot.com/2013/08/change-password-of-mysql-users.html' title='Change password of mysql users'/><author><name>singh</name><uri>http://www.blogger.com/profile/05560598178578014708</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-420298197680100543.post-240129229333083441</id><published>2013-03-10T14:52:00.001-07:00</published><updated>2013-03-11T14:32:29.925-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="adding iptables rule"/><category scheme="http://www.blogger.com/atom/ns#" term="Appending iptables rule"/><category scheme="http://www.blogger.com/atom/ns#" term="iptables"/><category scheme="http://www.blogger.com/atom/ns#" term="RedHat"/><category scheme="http://www.blogger.com/atom/ns#" term="ssh"/><title type='text'>Allowing users to have ssh access</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;b&gt;Allowing users to have ssh access&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;Hi Readers,&lt;br /&gt;&lt;br /&gt;It is one of the tasks we need to complete in order to allow users to log-in into your server without compromising your security. We are going to accomplish the following tasks,&lt;br /&gt;&lt;br /&gt;1.) Allow the users for given domain only&lt;br /&gt;2.) Must allow access to a given domain&lt;br /&gt;3.) Block access for a specific domain.&lt;br /&gt;&lt;br /&gt;These questions are asked in RedHat certification examination &lt;i&gt;RHCE6&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;We are going to complete the above mention task using iptables&lt;br /&gt;&lt;br /&gt;To give proper example we are taking 192.168.20.0/255.255.255.0 as our domain and 192.168.21.0/255.255.255.0 as other domain.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Assuming that your system is a fresh installation we can remove all rules previously applied.&lt;/b&gt;&lt;br /&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;# iptables -F&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;The above mention command will flush all the previously applied rules.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Insert a rule in your input chain by below mention command,&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;# iptables -I INPUT -s &amp;lt;ip of your domain&amp;gt;/&amp;lt;subnet mask&amp;gt; -p &amp;lt;protocal tcp/udp&amp;gt; --dport &amp;lt;port&amp;gt; -j ACCEPT&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;# iptables -I INPUT ! -s 192.168.20.0/255.255.255.0 -p tcp --dport 22 -j REJECT&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Appending the rule in INPUT chain [Caution don&#39;t flush your iptables]&lt;br /&gt;&lt;br /&gt;# iptables -A INPUT ! -s 192.168.20.0/255.255.255.0 -p tcp --dport 22 -j REJECT&lt;br /&gt;&amp;nbsp;# iptables -A INPUT ! -s 192.168.20.0/255.255.255.0 -p udp --dport 22 -j REJECT&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Need to recall the same for UDP protocol.&amp;nbsp;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;A must allow access for your domain :&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;Here we are going to put an allow rule for our domain into INPUT chain. Needed to be used with I/A option as per requirement,&lt;br /&gt;&lt;br /&gt;# iptables -A INPUT -s 192.168.20.0 -p tcp --dport 22 -j ACCEPT&lt;br /&gt;&amp;nbsp;# iptables -A INPUT -s 192.168.20.0 -p udp --dport 22 -j ACCEPT&lt;br /&gt;&lt;b&gt;A Specific domain should not have any ssh access:&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;# iptables -A INPUT -s 192.168.25.0/255.255.255.0 -p tcp --dport 22 -j REJECT&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&amp;nbsp;# iptables -A INPUT -s 192.168.25.0/255.255.255.0 -p udp --dport 22 -j REJECT&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shutech.blogspot.com/feeds/240129229333083441/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shutech.blogspot.com/2013/03/hi-friends-it-is-one-of-tasks-we-need.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/420298197680100543/posts/default/240129229333083441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/420298197680100543/posts/default/240129229333083441'/><link rel='alternate' type='text/html' href='http://shutech.blogspot.com/2013/03/hi-friends-it-is-one-of-tasks-we-need.html' title='Allowing users to have ssh access'/><author><name>singh</name><uri>http://www.blogger.com/profile/05560598178578014708</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-420298197680100543.post-8826869427833736036</id><published>2013-01-28T09:34:00.002-08:00</published><updated>2013-03-11T14:34:15.558-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Centos"/><category scheme="http://www.blogger.com/atom/ns#" term="createrepo"/><category scheme="http://www.blogger.com/atom/ns#" term="rpm install"/><category scheme="http://www.blogger.com/atom/ns#" term="YUM"/><category scheme="http://www.blogger.com/atom/ns#" term="yum configuration"/><title type='text'>Mannaging/Configuring YUM [Managing And Configuring YUM [Centos 6.0]]</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;Yum Configuration&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;Hi Friends, we all have faced problems while configuring yum in RedHat, Fedora and Centos. Please find the below mention steps to use all the RPM packages come along with your distribution. Yum configuration will allow you to use them with proper dependency resolution.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;To configure yum you must have two packages,&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;1. yum&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;2. createrepo &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;To obtain the same do the below mention just after you have mounted you disk.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;There could be two conditions &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;a.) You have the distribution disk i.e. DVD. Please follow the below mention instructions to manage the same.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;Your system mush have the greater or equal space of DVD. &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;# df -ah&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;User the partition which has the space and create a directory. In my case /mnt has the space.&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;# mount /dev/dvdwriter /mnt&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;# cd /mnt/Packages/&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;# rpm -ivh yum-* --nodeps –force&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;# rpm -ivh vsftps* -y &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;# rpm -ivh createrepo* --nodeps --force&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;# cp -rpvf /mnt/* /var/ftp/pub &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;It will create the dump on /var/ftp/pub now we need to unmount the disk.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;# umount /mnt&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;b.) You have an iso of you distribution. In that condition you need to mount it with loop so,&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;cd to iso location &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;It will mount the ISO to /mnt&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;#mount -o loop rhel.iso /mnt&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;# cd /mnt/Packages/&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;# rpm -ivh yum-* --nodeps –force &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;# rpm -ivh vsftps* -y&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;# rpm -ivh createrepo* --nodeps --force&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;Copy packages folder to /var/ftp/pub &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;# cp -rpvh /mnt/Packages/* /var/ftp/pub&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;Now you have the dump of your distribution and you are ready to configure yum. To configure the same you must be aware of your hostname. Run the following command to know your hostname,&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;# hostname&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;CentOs&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;Now you have your host name create directories at /var/ftp/pub i.e. Server and VT by following command,&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;#mkdir -p Server; mkdir -p VT&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;You are ready to configure your Server and VT repos. Run the following command in order to generate the repos,&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;# createrepo -v Server ; createrepo -v VT&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;It will create the directory structure like /var/ftp/pub/Server/repodata &amp;amp; /var/ftp/pub/VT/repodata and a file repomd.xml under each. Configuration of yum is just a step ahead. Search a file like *debuginfo.repo* under /etc/yum/yum.repos.d/. Keep a copy of it for disaster and rename the same with a different command name,&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;# cp -rf *debuginfo.repo* `hostname`.repo&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;Edit the hostname.repo using your editor. I will you vim and will comment all the lines that are UN-commented and write new lines on it.&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;# vim `hostname`.repo&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;#[debug]&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;#name=CentOS-6 - Debuginfo&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;#baseurl=http://debuginfo.centos.org/6/$basearch/&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;#gpgcheck=1&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-Debug-6&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;#enabled=0&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;#&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;[Server]&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;name=CentOs&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;baseurl=file:///var/ftp/pub/Server/&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;gpgcheck=0&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;[VT]&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;name=CentOs&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;baseurl=file:///var/ftp/pub/VT/&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;gpgcheck=0&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;Run yum clean all and you are done.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;Thanks&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shutech.blogspot.com/feeds/8826869427833736036/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shutech.blogspot.com/2013/01/mannagingconfiguring-yum-managing-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/420298197680100543/posts/default/8826869427833736036'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/420298197680100543/posts/default/8826869427833736036'/><link rel='alternate' type='text/html' href='http://shutech.blogspot.com/2013/01/mannagingconfiguring-yum-managing-and.html' title='Mannaging/Configuring YUM [Managing And Configuring YUM [Centos 6.0]]'/><author><name>singh</name><uri>http://www.blogger.com/profile/05560598178578014708</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-420298197680100543.post-4867681873228472242</id><published>2012-03-25T02:50:00.000-07:00</published><updated>2012-03-25T02:50:03.277-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Bash"/><category scheme="http://www.blogger.com/atom/ns#" term="except"/><category scheme="http://www.blogger.com/atom/ns#" term="spawn"/><category scheme="http://www.blogger.com/atom/ns#" term="ssh"/><category scheme="http://www.blogger.com/atom/ns#" term="ssh and scp without password using expect"/><category scheme="http://www.blogger.com/atom/ns#" term="using expect in BASH."/><title type='text'>Using except command with bash</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span style=&quot;color: #444444;&quot;&gt;1.Use the interpreter for bash at first line .&lt;/span&gt;&lt;br /&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;#!/bin/bash&lt;/h4&gt;&lt;div style=&quot;color: #444444;&quot;&gt;2. Use variables as per requirement and pass it to except if needed.&lt;/div&gt;&lt;br /&gt;&lt;b&gt;HOST=&quot;localhost&quot;&lt;br /&gt;USER=&quot;chitti&quot;&lt;br /&gt;PASS=&quot;123&quot;&lt;br /&gt;CMD=$@&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #444444;&quot;&gt;3. Use expect script as required.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;XYZ=$(expect -c &quot;&lt;br /&gt;spawn ssh $USER@$HOST&lt;br /&gt;expect \&quot;password:\&quot;&lt;br /&gt;send \&quot;$PASS\r\&quot;&lt;br /&gt;expect \&quot;\\\\$\&quot;&lt;br /&gt;send \&quot;$CMD\r\&quot;&lt;br /&gt;expect -re \&quot;$USER.*\&quot;&lt;br /&gt;send \&quot;logout\&quot;&lt;br /&gt;&quot;)&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;4.Print the result of except using echo like&lt;br /&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;echo &quot;${XYZ}&quot;&lt;/h4&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shutech.blogspot.com/feeds/4867681873228472242/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shutech.blogspot.com/2012/03/using-except-command-with-bash.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/420298197680100543/posts/default/4867681873228472242'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/420298197680100543/posts/default/4867681873228472242'/><link rel='alternate' type='text/html' href='http://shutech.blogspot.com/2012/03/using-except-command-with-bash.html' title='Using except command with bash'/><author><name>singh</name><uri>http://www.blogger.com/profile/05560598178578014708</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-420298197680100543.post-8666625526868908762</id><published>2012-01-04T06:00:00.001-08:00</published><updated>2014-05-23T22:37:01.475-07:00</updated><title type='text'>Send mail via SMTP using PERL</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Send Mail to gmail account with perl&lt;/span&gt;&lt;/h2&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Installation of Send::SMTP::Gmail:&amp;nbsp;&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;In order to send mail via Gmail, you need to have TLS&amp;nbsp;verification. Having TLS and Installation of perl package Send::SMTP::Gmail is covered in brief.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;For Ubuntu:&amp;nbsp;&lt;/span&gt;&lt;/h4&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;sudo apt-get install openssl libnet-ssleay-perl &amp;nbsp;libcrypt-ssleay-perl&lt;/span&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;For RedHat/Fedora/CentOs:&lt;/span&gt;&lt;/h4&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;yum &amp;nbsp;install &amp;nbsp;perl-IO-Socket-SSL &amp;nbsp;perl-Digest-HMAC &amp;nbsp;perl-TermReadKey &amp;nbsp;perl-MIME-Lite &amp;nbsp;perl-File-LibMagic &amp;nbsp;perl-IO-Socket-INET6 perl-Net-SSLeay perl-Crypt-SSLeay perl-Email-Send&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Usages:&amp;nbsp;&lt;/h3&gt;&lt;div&gt;Following method is used to send mail and attachment in it. Please read it and post your comments.&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;sub sendMail&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; use Email::Send::SMTP::Gmail;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; my $to=shift;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; my $cc=shift;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; my $subject=shift;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; my $body=shift;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; my $mail=Email::Send::SMTP::Gmail-&amp;gt;new( -smtp=&amp;gt;&#39;smtp.gmail.com&#39;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -login=&amp;gt;&#39;yourUser@eko.co.in&#39;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -pass=&amp;gt;&#39;passwd&#39;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -port=&amp;gt;587,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -debug=&amp;gt;1);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$mail-&amp;gt;send(-to=&amp;gt;&quot;$to&quot;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -cc=&amp;gt;&quot;$cc&quot;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -subject=&amp;gt;$subject,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -verbose=&amp;gt;&#39;1&#39;,&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -body=&amp;gt;$body&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;#-attachments=&amp;gt;&#39;full_path_to_file&#39;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $mail-&amp;gt;bye;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shutech.blogspot.com/feeds/8666625526868908762/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shutech.blogspot.com/2012/01/send-mail-via-sftp-using-perl.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/420298197680100543/posts/default/8666625526868908762'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/420298197680100543/posts/default/8666625526868908762'/><link rel='alternate' type='text/html' href='http://shutech.blogspot.com/2012/01/send-mail-via-sftp-using-perl.html' title='Send mail via SMTP using PERL'/><author><name>singh</name><uri>http://www.blogger.com/profile/05560598178578014708</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-420298197680100543.post-5818996601033143174</id><published>2011-12-18T00:58:00.000-08:00</published><updated>2012-03-25T03:22:11.453-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Change file descriptor"/><category scheme="http://www.blogger.com/atom/ns#" term="Pass input from file instead from stdin."/><title type='text'>Read a File line by line in Shell</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;I&#39;ve used a few techniques for this kind of reading but gets failed until I&#39;ve read this fine blog .&lt;br /&gt;&lt;a href=&quot;http://read%20file%20line%20by%20line/&quot;&gt;http://www.bashguru.com/2010/05/how-to-read-file-line-by-line-in-shell.html&lt;/a&gt;&lt;br /&gt;this helps a lot and i have developed a trick for me.&lt;br /&gt;Refer to the following example to examine the script :&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre ;=&quot;&quot; new=&quot;&quot; roman=&quot;&quot; times=&quot;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;#!/bin/bash&lt;br /&gt;#SCRIPT:  method2.sh&lt;br /&gt;#PURPOSE: Process a file line by line with redirected while-read loop&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;FILENAME=$1&lt;br /&gt;count=0&lt;br /&gt;&lt;br /&gt;while read LINE&lt;br /&gt;do&lt;br /&gt;      let count++&lt;br /&gt;      echo &quot;$count $LINE&quot;&lt;br /&gt;&lt;br /&gt;done &amp;lt; $FILENAME&lt;br /&gt;&lt;br /&gt;echo -e &quot;\nTotal $count Lines read&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre ;=&quot;&quot; new=&quot;&quot; roman=&quot;&quot; times=&quot;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre ;=&quot;&quot; new=&quot;&quot; roman=&quot;&quot; times=&quot;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px;&quot;&gt;I have passed the file in the end of the loop so i didn&#39;t need&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre ;=&quot;&quot; new=&quot;&quot; roman=&quot;&quot; times=&quot;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px;&quot;&gt;to use pipe that is why i process the file in fastest manner and gives&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre ;=&quot;&quot; new=&quot;&quot; roman=&quot;&quot; times=&quot;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px;&quot;&gt;the required output in a quick manner.&lt;/span&gt;&lt;/pre&gt;&lt;pre ;=&quot;&quot; new=&quot;&quot; roman=&quot;&quot; times=&quot;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre ;=&quot;&quot; new=&quot;&quot; roman=&quot;&quot; times=&quot;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px;&quot;&gt;However i can use one more thing the File Descriptors.&lt;/span&gt;&lt;/pre&gt;&lt;pre ;=&quot;&quot; new=&quot;&quot; roman=&quot;&quot; times=&quot;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px;&quot;&gt;The File Descriptors are similar to the normal file pointers however in&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre ;=&quot;&quot; new=&quot;&quot; roman=&quot;&quot; times=&quot;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px;&quot;&gt;more analogue way.If you have used C then you will have familier with the&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre ;=&quot;&quot; new=&quot;&quot; roman=&quot;&quot; times=&quot;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px;&quot;&gt;the default file openers in C &quot;stdin&quot;,&quot;stdout&quot; and &quot;stderror&quot;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre ;=&quot;&quot; new=&quot;&quot; roman=&quot;&quot; times=&quot;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px;&quot;&gt;and each of them is assigned with a file descriptor respectivly 0,1 and 2.&lt;/span&gt;&lt;/pre&gt;&lt;pre ;=&quot;&quot; new=&quot;&quot; roman=&quot;&quot; times=&quot;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px;&quot;&gt;For opening additional files there are a few more descriptors from 3 to 9&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre ;=&quot;&quot; new=&quot;&quot; roman=&quot;&quot; times=&quot;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px;&quot;&gt;depending on your OS. So come to the point, if you want to read your file&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre ;=&quot;&quot; new=&quot;&quot; roman=&quot;&quot; times=&quot;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px;&quot;&gt;from standard input usually known as stdin among developers you need to&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre ;=&quot;&quot; new=&quot;&quot; roman=&quot;&quot; times=&quot;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px;&quot;&gt;change the default input from 0 to any other descriptor like this:&lt;/span&gt;&lt;/pre&gt;&lt;pre ;=&quot;&quot; new=&quot;&quot; roman=&quot;&quot; times=&quot;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre ;=&quot;&quot; new=&quot;&quot; roman=&quot;&quot; times=&quot;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;exec 3&amp;lt;&amp;amp;0&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre ;=&quot;&quot; new=&quot;&quot; roman=&quot;&quot; times=&quot;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre ;=&quot;&quot; new=&quot;&quot; roman=&quot;&quot; times=&quot;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px;&quot;&gt;it will change the defdault stdin descriptor from 0 to 3 and you need to&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre ;=&quot;&quot; new=&quot;&quot; roman=&quot;&quot; times=&quot;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px;&quot;&gt;follow one more step to complete the task is:&lt;/span&gt;&lt;/pre&gt;&lt;pre ;=&quot;&quot; new=&quot;&quot; roman=&quot;&quot; times=&quot;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre ;=&quot;&quot; new=&quot;&quot; roman=&quot;&quot; times=&quot;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;exec 0&amp;lt;$filename&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre ;=&quot;&quot; new=&quot;&quot; roman=&quot;&quot; times=&quot;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre ;=&quot;&quot; new=&quot;&quot; roman=&quot;&quot; times=&quot;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px;&quot;&gt;and its done. Now use the below given script to acomplish your job.&lt;/span&gt;&lt;/pre&gt;&lt;pre ;=&quot;&quot; new=&quot;&quot; roman=&quot;&quot; times=&quot;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre ;=&quot;&quot; new=&quot;&quot; roman=&quot;&quot; times=&quot;&quot;&gt;&lt;pre ;=&quot;&quot; new=&quot;&quot; roman=&quot;&quot; times=&quot;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #666666;&quot;&gt;#!/bin/bash&lt;br /&gt;#SCRIPT:  method3.sh&lt;br /&gt;#PURPOSE: Process a file line by line with while read LINE Using&lt;br /&gt;#File Descriptors&lt;br /&gt;&lt;br /&gt;FILENAME=$1&lt;br /&gt;count0=&lt;br /&gt;exec 3&amp;lt;&amp;amp;0&lt;br /&gt;exec 0&amp;lt; $FILENAME&lt;br /&gt;&lt;br /&gt;while read LINE&lt;br /&gt;do&lt;br /&gt;        let count++&lt;br /&gt;        echo &quot;$count $LINE&quot;&lt;br /&gt;done&lt;br /&gt;&lt;br /&gt;exec 0&amp;lt;&amp;amp;3&lt;br /&gt;echo -e &quot;\nTotal $count Lines read&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre ;=&quot;&quot; new=&quot;&quot; roman=&quot;&quot; times=&quot;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre ;=&quot;&quot; new=&quot;&quot; roman=&quot;&quot; times=&quot;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;For more information refer to the given blog and use man pages for command&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre ;=&quot;&quot; new=&quot;&quot; roman=&quot;&quot; times=&quot;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;information.&lt;/span&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;pre ;=&quot;&quot; new=&quot;&quot; roman=&quot;&quot; times=&quot;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shutech.blogspot.com/feeds/5818996601033143174/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shutech.blogspot.com/2011/12/read-file-line-by-line-in-shell.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/420298197680100543/posts/default/5818996601033143174'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/420298197680100543/posts/default/5818996601033143174'/><link rel='alternate' type='text/html' href='http://shutech.blogspot.com/2011/12/read-file-line-by-line-in-shell.html' title='Read a File line by line in Shell'/><author><name>singh</name><uri>http://www.blogger.com/profile/05560598178578014708</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-420298197680100543.post-4488297132577585174</id><published>2011-11-04T10:58:00.000-07:00</published><updated>2011-11-04T10:58:10.076-07:00</updated><title type='text'>Using Flash in your HTML</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;&lt;div id=&quot;abw&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-top-color: rgb(255, 51, 0); border-top-style: solid; border-top-width: 3px; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0.75em; margin-left: auto; margin-right: auto; margin-top: 0px; padding-bottom: 0px; padding-left: 15px; padding-right: 15px; padding-top: 0px; position: relative; text-align: left; text-decoration: inherit; width: 930px;&quot;&gt;&lt;div class=&quot;clear&quot; id=&quot;abm&quot; style=&quot;font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: relative; text-decoration: inherit; zoom: 1;&quot;&gt;&lt;div id=&quot;abc&quot; style=&quot;font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: -336px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: relative; text-decoration: inherit; width: 930px;&quot;&gt;&lt;div id=&quot;articlebody&quot; style=&quot;font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.5em; margin-left: 0px; margin-right: 351px; margin-top: 1.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: static; text-decoration: inherit;&quot;&gt;&lt;ul style=&quot;font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 1.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; position: relative; text-decoration: inherit; z-index: 0;&quot;&gt;&lt;li style=&quot;font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-type: disc; margin-bottom: 0px; margin-left: 18px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: inherit;&quot;&gt;Edit your Publish settings for Flash SWFs and HTML to reflect how you want your Flash SWF to appear in your web page.&lt;/li&gt;&lt;li style=&quot;font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-type: disc; margin-bottom: 0px; margin-left: 18px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: inherit;&quot;&gt;Export your Flash movie as HTML.&lt;/li&gt;&lt;li style=&quot;font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-type: disc; margin-bottom: 0px; margin-left: 18px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: inherit;&quot;&gt;Locate your HTML file on your computer, right-click, and select &quot;Open With&quot;.&lt;/li&gt;&lt;li style=&quot;font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-type: disc; margin-bottom: 0px; margin-left: 18px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: inherit;&quot;&gt;Choose either NotePad or another text editor.&lt;/li&gt;&lt;li style=&quot;font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-type: disc; margin-bottom: 0px; margin-left: 18px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: inherit;&quot;&gt;Copy the source code from the HTML file.&lt;/li&gt;&lt;li style=&quot;font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-type: disc; margin-bottom: 0px; margin-left: 18px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: inherit;&quot;&gt;Paste it into your web page&#39;s source code in the appropriate location where you want your SWF file to display.&lt;/li&gt;&lt;li style=&quot;font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; list-style-type: disc; margin-bottom: 0px; margin-left: 18px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: inherit;&quot;&gt;Edit the file path to reflect the location of the SWF file on your web server, and upload both your HTML and SWF file to the appropriate directories on your server. (&lt;b style=&quot;font-weight: bold;&quot;&gt;Note:&lt;/b&gt;&amp;nbsp;this also applies if you&#39;re using PHP, JSP, ASP, CGI, or other web page extensions.)&lt;/li&gt;&lt;/ul&gt;&lt;div style=&quot;font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 1.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: inherit;&quot;&gt;Your code should look something like this:&lt;/div&gt;&lt;div style=&quot;font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 1.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: inherit;&quot;&gt;&lt;b style=&quot;font-weight: bold;&quot;&gt;&lt;i style=&quot;font-style: italic;&quot;&gt;&amp;lt;OBJECT classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; codebase=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0&quot; WIDTH=&quot;320&quot; HEIGHT=&quot;240&quot; id=&quot;Yourfilename&quot; ALIGN=&quot;&quot;&amp;gt;&lt;/i&gt;&lt;br /&gt;&amp;lt;PARAM NAME=movie VALUE=&quot;Yourfilename.swf&quot;&amp;gt; &amp;lt;PARAM NAME=quality VALUE=high&amp;gt; &amp;lt;PARAM NAME=bgcolor VALUE=#333399&amp;gt; &amp;lt;EMBED src=&quot;Yourfilename.swf&quot; quality=high bgcolor=#333399 WIDTH=&quot;320&quot; HEIGHT=&quot;240&quot; NAME=&quot;Yourfilename&quot; ALIGN=&quot;&quot; TYPE=&quot;application/x-shockwave-flash&quot; PLUGINSPAGE=&quot;http://www.macromedia.com/go/getflashplayer&quot;&amp;gt;&amp;lt;/EMBED&amp;gt; &amp;lt;/OBJECT&amp;gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 1.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: inherit;&quot;&gt;Most of this you don&#39;t need to touch, so don&#39;t worry about making sense of that. The italicized section sets the codebase for the version of Flash used, to check against to see if your user has that version. The rest has taglines to download the Flash player (if the user doesn&#39;t have it) and the parameters that you would need to edit--mainly, the line labeled&lt;b style=&quot;font-weight: bold;&quot;&gt;EMBED src=&quot;Yourfilename.swf&quot;&lt;/b&gt;.&lt;/div&gt;&lt;div style=&quot;font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 1.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: inherit;&quot;&gt;By default only the file name would be there, because Flash publishes the SWF and the HTML file in the same folder together with your FLA file. However, you may want to put your SWF files in a separate subfolder on your server, perhaps a folder labeled &quot;flash&quot;--in which instance you would edit the code to read&amp;nbsp;&lt;b style=&quot;font-weight: bold;&quot;&gt;EMBED src=&quot;flash/Yourfilename.swf&quot;&lt;/b&gt;.&lt;/div&gt;&lt;div style=&quot;font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 1.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: inherit;&quot;&gt;Trust me, it&#39;s much simpler than it sounds. Give it a try and find out for yourself.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shutech.blogspot.com/feeds/4488297132577585174/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shutech.blogspot.com/2011/11/using-flash-in-your-html.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/420298197680100543/posts/default/4488297132577585174'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/420298197680100543/posts/default/4488297132577585174'/><link rel='alternate' type='text/html' href='http://shutech.blogspot.com/2011/11/using-flash-in-your-html.html' title='Using Flash in your HTML'/><author><name>singh</name><uri>http://www.blogger.com/profile/05560598178578014708</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-420298197680100543.post-3753739927848008996</id><published>2011-09-27T02:51:00.000-07:00</published><updated>2011-09-27T03:32:56.598-07:00</updated><title type='text'>Mysql Scripts in Linux Command Line Terminal</title><content type='html'>In MySQL user always tries to connect with the server via command line interface such as remote login like &#39;ssh&#39; then they troubled themselves in using graphical interface and get the required output quickly. So they need to automate that task. In this Blog I am going to suggest you a way to do this ...&lt;br /&gt;First of all we need to know that a MySQL service is kept in /etc/init.d/mysqld and we need to invoke that in order to use mysql server and client.&lt;br /&gt;To do this use following command in terminal :&lt;br /&gt;&lt;div style=&quot;text-align: center; font-weight: bold; font-style: italic;&quot;&gt;service /etc/init.d/mysqld start&lt;br /&gt;or&lt;br /&gt;service mysqld start&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;When mysql server is started make a directory like /home/anduril/shubham_Script and after entering into that directory use this command in your terminal.&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: center; font-weight: bold; font-style: italic;&quot;&gt;vi connect_string.sh&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;It will create a file with the name connect_string.sh you can give any name you want. Press &#39;i&#39; to edit and enter the following text :&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;mysqlshow -u root -proot&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;mysqladmin version -u root -proot&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;mysqladmin variables -u root -proot&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;mysqladmin ping -u root -proot&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;mysql -u root -proot &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;echo Execute SQL from Linux command line interface:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;mysql -h localhost -u root -proot  -e &quot;select host,db,user from db&quot; mysql&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;After enterning all text press esc and use &#39;:wq&#39; to exit from vim...&lt;br /&gt;Where mysql is plateform -u stands for username in this case it is root and the switch -p demands for password which is concatenated with the switch -p and in this case it is root. Users can also specify their host with the switch -h and the host name with a space between them.&lt;br /&gt;In the 5th command we have used a file named &#39;queries_mysql_script.sql&#39; and saved our queries in this file and run our script.&lt;br /&gt;In the Last statement we have used -e switch to enter our command at the terminal and have fun .&lt;br /&gt;This small script could be very useful when you need to take daily dump and forward it in zip . I hope it helps you.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://shutech.blogspot.com/feeds/3753739927848008996/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shutech.blogspot.com/2011/09/mysql-scripts-in-linux-command-line.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/420298197680100543/posts/default/3753739927848008996'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/420298197680100543/posts/default/3753739927848008996'/><link rel='alternate' type='text/html' href='http://shutech.blogspot.com/2011/09/mysql-scripts-in-linux-command-line.html' title='Mysql Scripts in Linux Command Line Terminal'/><author><name>singh</name><uri>http://www.blogger.com/profile/05560598178578014708</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-420298197680100543.post-554934841316747354</id><published>2011-09-26T13:11:00.000-07:00</published><updated>2012-03-25T03:23:45.656-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="use root level access using sudo without password promt"/><category scheme="http://www.blogger.com/atom/ns#" term="Use sudo without password prompt"/><title type='text'>Add user in Sudoer file</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;The command sudo provides other users to run a command as a root. To use sudo user must have their level of privilege in /etc/sudoer file. In some cases this file is set for read only and others can edit that file and add their user name in Sudoer for this case such as Fedora 12 users need to provide this syntax as a root on their terminal.&lt;br /&gt;Syntax for adding a user  in Sudoer file is:&lt;br /&gt;&lt;pre class=&quot;alt2&quot; dir=&quot;ltr&quot; style=&quot;border: 1px inset; font-family: courier new; height: 34px; margin: 0px; overflow: auto; padding: 6px; text-align: left; width: 640px;&quot;&gt;echo &quot;username ALL=(ALL) NOPASSWD:ALL&quot; &amp;gt;&amp;gt; /etc/sudoers&lt;/pre&gt;And to gain the writing privilege you can use the following code in your terminal :&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;     &lt;br /&gt;      chmod 755 /etc/sudoers&lt;/span&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;This&lt;/span&gt;&lt;/span&gt; code will be enough to give permissions to the user and his user group.&lt;span style=&quot;font-style: italic;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;If you are an ubuntu user you can easily add your user in this file like:&lt;span style=&quot;font-style: italic;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;br /&gt;      vi /etc/sudoers&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;And you will get a text file. Afterward you need to press &#39;i&#39; for edit and edit by adding your username just below  &lt;span style=&quot;font-style: italic;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;     &lt;br /&gt;     &quot;root                  ALL=(ALL) ALL&quot;&lt;br /&gt;     &quot;username         ALL=(ALL)         ALL&quot;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shutech.blogspot.com/feeds/554934841316747354/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shutech.blogspot.com/2011/09/add-user-in-sudoer-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/420298197680100543/posts/default/554934841316747354'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/420298197680100543/posts/default/554934841316747354'/><link rel='alternate' type='text/html' href='http://shutech.blogspot.com/2011/09/add-user-in-sudoer-file.html' title='Add user in Sudoer file'/><author><name>singh</name><uri>http://www.blogger.com/profile/05560598178578014708</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-420298197680100543.post-5136413519569523947</id><published>2011-09-15T04:43:00.000-07:00</published><updated>2011-09-15T04:43:38.983-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="database() method"/><category scheme="http://www.blogger.com/atom/ns#" term="last_insert_id()"/><category scheme="http://www.blogger.com/atom/ns#" term="mysql functions"/><category scheme="http://www.blogger.com/atom/ns#" term="start mysql in ubuntu"/><category scheme="http://www.blogger.com/atom/ns#" term="user() method"/><title type='text'>A few useful sql functions</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;b&gt;Start mysql in Ubuntu without having root privilege:- &lt;/b&gt;&lt;br /&gt;If you want to use mysql in Ubutu you can use following command which will use a root level privilege &lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;b&gt; &lt;/b&gt;&lt;br /&gt;&lt;b&gt;$ mysql -u root -p&lt;br /&gt;Enter password: &lt;br /&gt;Welcome to the MySQL monitor.&amp;nbsp; Commands end with ; or \g.&lt;br /&gt;Your MySQL connection id is 147&lt;br /&gt;Server version: 5.1.49-1ubuntu8.1-log (Ubuntu)&lt;/b&gt;&lt;br /&gt;When it demands to enter the password fill it with &#39;root&#39; and hopefully you&#39;ll get logged in . &lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Last_insert_id():- &lt;/b&gt;(with no argument) returns the first automatically generated value that was set for an AUTO_INCREMENT column by the most recently executed INSERT statement to affect such a column. For example, after inserting a row that generates an AUTO_INCREMENT value, you can get the value like this:&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;mysql&amp;gt; SELECT LAST_INSERT_ID();&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Database():-&lt;/b&gt;&lt;br /&gt;Database() method returns the current selected database and you can use it in your communication and your queries. The syntax is :&lt;br /&gt;&amp;nbsp;&lt;b&gt;mysql&amp;gt;select Database&lt;/b&gt; ();&lt;br /&gt;&lt;br /&gt;&lt;b&gt;User():-&lt;/b&gt;&lt;br /&gt;It also has synonym named&amp;nbsp; &lt;b&gt;Session_user() and System_user() &lt;/b&gt;which returns the current user who is using the mysql along with the hostname.&lt;br /&gt;&lt;b&gt;mysql&amp;gt;select user();&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shutech.blogspot.com/feeds/5136413519569523947/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shutech.blogspot.com/2011/09/few-useful-sql-functions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/420298197680100543/posts/default/5136413519569523947'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/420298197680100543/posts/default/5136413519569523947'/><link rel='alternate' type='text/html' href='http://shutech.blogspot.com/2011/09/few-useful-sql-functions.html' title='A few useful sql functions'/><author><name>singh</name><uri>http://www.blogger.com/profile/05560598178578014708</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-420298197680100543.post-6477236604189896814</id><published>2011-07-20T16:25:00.000-07:00</published><updated>2011-07-20T16:26:25.608-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="asp.net navigation"/><category scheme="http://www.blogger.com/atom/ns#" term="SiteMap file"/><category scheme="http://www.blogger.com/atom/ns#" term="SiteMapPath"/><title type='text'>SiteMapPath</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Navigation is one of the most important feature in Asp.net. It helps to set the look or show the features of your site in same time.&amp;nbsp; Navigation is very important when you want to show you web site to the clients. Asp.net offers three navigation tools to supply these requirements:&lt;br /&gt;&lt;br /&gt;1.Menu&amp;nbsp;&amp;nbsp; &lt;br /&gt;2.TreeView&lt;br /&gt;3.SiteMapPath&lt;br /&gt;&amp;nbsp;For site Navigation you must know your&amp;nbsp; site&#39;s site map. A complete site map&amp;nbsp; is always required for navigation among pages.For site map you need to create a Site Map file usualy comes with name &#39;Web.sitemap&#39; and has&amp;nbsp; following XML codes:&lt;br /&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&amp;gt;&lt;br /&gt;&amp;lt;siteMap xmlns=&quot;http://schemas.microsoft.com/AspNet/SiteMap-File-1.0&quot; &amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;siteMapNode url=&quot;&quot; title=&quot;&quot;&amp;nbsp; description=&quot;&quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;siteMapNode url=&quot;&quot; title=&quot;&quot;&amp;nbsp; description=&quot;&quot; /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;siteMapNode url=&quot;&quot; title=&quot;&quot;&amp;nbsp; description=&quot;&quot; /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/siteMapNode&amp;gt;&lt;br /&gt;&amp;lt;/siteMap&amp;gt;&lt;br /&gt;It has a root node&amp;nbsp; &amp;lt;siteMapNode url=&quot;&quot; title=&quot;&quot;&amp;nbsp; description=&quot;&quot;&amp;gt;&amp;nbsp; where we need to put&amp;nbsp; a navigation url, a title and its description which will show on SiteMapPath tool. lets first discus about SiteMapPath tool:&lt;br /&gt;SiteMapPath comes with following source code and has the functionalty of showing current pages address with description. It shows the description from SiteMap file.&lt;br /&gt;&amp;nbsp;&amp;lt;asp:SiteMapPath ID=&quot;SiteMapPath1&quot; runat=&quot;server&quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/asp:SiteMapPath&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shutech.blogspot.com/feeds/6477236604189896814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shutech.blogspot.com/2011/07/sitemappath.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/420298197680100543/posts/default/6477236604189896814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/420298197680100543/posts/default/6477236604189896814'/><link rel='alternate' type='text/html' href='http://shutech.blogspot.com/2011/07/sitemappath.html' title='SiteMapPath'/><author><name>singh</name><uri>http://www.blogger.com/profile/05560598178578014708</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-420298197680100543.post-8218395466521415222</id><published>2011-07-13T16:05:00.000-07:00</published><updated>2011-07-13T16:05:16.927-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Nullable"/><title type='text'>Nullable types in c#</title><content type='html'>&lt;link href=&quot;file:///C:%5CDOCUME%7E1%5CA%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml&quot; rel=&quot;File-List&quot;&gt;&lt;/link&gt;&lt;link href=&quot;file:///C:%5CDOCUME%7E1%5CA%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx&quot; rel=&quot;themeData&quot;&gt;&lt;/link&gt;&lt;link href=&quot;file:///C:%5CDOCUME%7E1%5CA%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml&quot; rel=&quot;colorSchemeMapping&quot;&gt;&lt;/link&gt;    &lt;m:smallfrac m:val=&quot;off&quot;&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val=&quot;0&quot;&gt;    &lt;m:rmargin m:val=&quot;0&quot;&gt;    &lt;m:defjc m:val=&quot;centerGroup&quot;&gt;    &lt;m:wrapindent m:val=&quot;1440&quot;&gt;    &lt;m:intlim m:val=&quot;subSup&quot;&gt;    &lt;m:narylim m:val=&quot;undOvr&quot;&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:&quot;Cambria Math&quot;; 	panose-1:2 4 5 3 5 4 6 3 2 4; 	mso-font-charset:0; 	mso-generic-font-family:roman; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face 	{font-family:Calibri; 	panose-1:2 15 5 2 2 2 4 3 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1073750139 0 0 159 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-unhide:no; 	mso-style-qformat:yes; 	mso-style-parent:&quot;&quot;; 	margin-top:0in; 	margin-right:0in; 	margin-bottom:10.0pt; 	margin-left:0in; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:&quot;Times New Roman&quot;; 	mso-bidi-theme-font:minor-bidi;} p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph 	{mso-style-priority:34; 	mso-style-unhide:no; 	mso-style-qformat:yes; 	margin-top:0in; 	margin-right:0in; 	margin-bottom:10.0pt; 	margin-left:.5in; 	mso-add-space:auto; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:&quot;Times New Roman&quot;; 	mso-bidi-theme-font:minor-bidi;} p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst 	{mso-style-priority:34; 	mso-style-unhide:no; 	mso-style-qformat:yes; 	mso-style-type:export-only; 	margin-top:0in; 	margin-right:0in; 	margin-bottom:0in; 	margin-left:.5in; 	margin-bottom:.0001pt; 	mso-add-space:auto; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:&quot;Times New Roman&quot;; 	mso-bidi-theme-font:minor-bidi;} p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle 	{mso-style-priority:34; 	mso-style-unhide:no; 	mso-style-qformat:yes; 	mso-style-type:export-only; 	margin-top:0in; 	margin-right:0in; 	margin-bottom:0in; 	margin-left:.5in; 	margin-bottom:.0001pt; 	mso-add-space:auto; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:&quot;Times New Roman&quot;; 	mso-bidi-theme-font:minor-bidi;} p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast 	{mso-style-priority:34; 	mso-style-unhide:no; 	mso-style-qformat:yes; 	mso-style-type:export-only; 	margin-top:0in; 	margin-right:0in; 	margin-bottom:10.0pt; 	margin-left:.5in; 	mso-add-space:auto; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:&quot;Times New Roman&quot;; 	mso-bidi-theme-font:minor-bidi;} .MsoChpDefault 	{mso-style-type:export-only; 	mso-default-props:yes; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:&quot;Times New Roman&quot;; 	mso-bidi-theme-font:minor-bidi;} .MsoPapDefault 	{mso-style-type:export-only; 	margin-bottom:10.0pt; 	line-height:115%;} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.0in 1.0in 1.0in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;}  /* List Definitions */  @list l0 	{mso-list-id:552159273; 	mso-list-type:hybrid; 	mso-list-template-ids:1639710826 -2014129800 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} @list l0:level1 	{mso-level-tab-stop:none; 	mso-level-number-position:left; 	margin-left:.75in; 	text-indent:-.25in;} ol 	{margin-bottom:0in;} ul 	{margin-bottom:0in;} --&gt; &lt;/style&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;div class=&quot;MsoNormal&quot;&gt;If you have worked in .net technology then you are familiar to Nullable Types. Their &amp;nbsp;concept comes with.net framework 2.0 and yet they are used frequently by the programmers and it gains the popularity among them .The scenario of Nullable Types are usually comes in dealing with Data Base, when you receive a value for integer or a datetime variable null. By the way, Null is a very interesting topic because it is neither a Zero nor a blank space. So how we can consider it and for what?&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Null is often considered as a not known value or undefined data that is why it often used like a flag by the developers in different scenarios. Nullability refers for a primitive data types to accept and appropriately handle the case with null value. As it is considered in .net primitive data types are stored in a stack that is also a reason why they are usually not able to contain reference types. Now I need to mention that null is reference type and it is stored in a heap.&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&amp;nbsp;In past there are several ways to overcome with this problem:&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;margin-left: 0.75in; text-indent: -0.25in;&quot;&gt;1.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;We can use a boxed value type. These are not Strongly-typed in compile time yet they involves during every heap allocation.&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 0.75in; text-indent: -0.25in;&quot;&gt;2.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;We can use a wrapper class for value type. They are strongly –typed yet they still needs and involves a heap allocation and you have to write their wrapper.&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;margin-left: 0.75in; text-indent: -0.25in;&quot;&gt;3.&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size-adjust: none; font-size: 7pt; font-stretch: normal; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;A structure wrapper that used to support nullability. But it also has a drawback that you have to write them by yourself.&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;To reduce these complexities in Visual Studio 2005 Microsoft introduced a new concept ‘Nullable’.&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Nullable types are similar to generic data types with a wrapper structure written around them. This wrapper structure allows value types to hold null or even an object. The basic Nullable structure seems similar to the following but it is more complicated than it seems:&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;b&gt;struct nullable&amp;lt;t&amp;gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;b&gt;{&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;b&gt;public bool hasVlaue &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;b&gt;public T value;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;b&gt;}&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;You can write the constructor to allocate null values but Microsoft makes it easier. Firstly you can declare null types as follows:&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;b&gt;Nullable&amp;lt;int&amp;gt; x=new nullable&amp;lt;int&amp;gt;(125);&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;This result can be received in a easier way like this:&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;b&gt;Nullable&amp;lt;int&amp;gt;x=125;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Both are correct.&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Furthermore .net &amp;nbsp;&amp;nbsp;implements a new ease in nullable types with the help of ‘?’ operator. Now we can write them like this too:&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;b&gt;Int? x=125;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Here this is it for Nullable types.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shutech.blogspot.com/feeds/8218395466521415222/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shutech.blogspot.com/2011/07/nullable-types-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/420298197680100543/posts/default/8218395466521415222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/420298197680100543/posts/default/8218395466521415222'/><link rel='alternate' type='text/html' href='http://shutech.blogspot.com/2011/07/nullable-types-in-c.html' title='Nullable types in c#'/><author><name>singh</name><uri>http://www.blogger.com/profile/05560598178578014708</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-420298197680100543.post-3411282194035822422</id><published>2011-07-12T01:37:00.000-07:00</published><updated>2012-03-25T03:25:24.000-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Samsung Galaxy"/><title type='text'>Samsung Galaxy</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Samsung Galaxy&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;World&#39;s second cellphone manufacturing company Samsung is planning to release new version of Galaxy Tab in this June which will run on Android&#39;s new version Honeycomb platform and based on 4G technology. The new Galaxy tab will be in two sizes, an 8.9-inch and a 10.1-inch and the price will be $499 to $599. In the market of smartphones, iPads and iPhones Samsung trails from Apple and Android. To compete Apple&#39;s iPhone, Samsung wants to extand strong relationship with Google&#39;s Android and will continue release android based smartphones. Samsung has been developing its own mobile software, Bada and launched about half of all Android based smartphones but Android also wants to capture smartphones and tablets business.&lt;br /&gt;&lt;br /&gt;When Apple launched iPad last year, Samsung was one of the few companies,who held Android and released new 7-inch Galaxy Tab in October,2010. Samsung expects that its tablet can capture about fivefold from 7.5 million units this year while Apple&#39;s iPad would capture 39.7 million this year. It is a huge difference,obviously Samsung is not going to overtake Apple&#39;s iPhone but on the other side samsung will lead in android based tab.&lt;br /&gt;&lt;br /&gt;now recently Apple has claimed on Samsung to copy style and features of very popular iPhone and iPads but Samsung declined this .Ofcourse Apple is the main competitor of Samsung but as well as a great customer of components. Samsung will continue to work with android for tab and smartphones because Android is the fastest growing OS in mobile market. Samsung can cut the price of Galaxy Tab to attract customers to increase the range of market and continuously launch new models of different ranges.Many data carriers network companies have jumped into commercialized LTE service&amp;nbsp; network services with high data traffic which will povide high data speed of downloading like 4G.&amp;nbsp; Along with many other companies like Taiwan&#39;s Acer, Asustek Computer also have jumped into tablet market with their low priced tab.During quarter of this year Samsung was the first in Android Tab market and Samsung expects that smartphone business will grow threetime of last year 24 million.we can say that race of 4G technology has begun and many companies have jumped to take first advantage.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://shutech.blogspot.com/feeds/3411282194035822422/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://shutech.blogspot.com/2011/07/samsung-galaxy-worlds-second-cellphone.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/420298197680100543/posts/default/3411282194035822422'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/420298197680100543/posts/default/3411282194035822422'/><link rel='alternate' type='text/html' href='http://shutech.blogspot.com/2011/07/samsung-galaxy-worlds-second-cellphone.html' title='Samsung Galaxy'/><author><name>singh</name><uri>http://www.blogger.com/profile/05560598178578014708</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>