<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sebastian Mogilowskis Blog &#187; script</title>
	<atom:link href="http://www.mogilowski.net/lang/en-us/tag/script/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mogilowski.net</link>
	<description>Just another blog about administration, linux and other stuff</description>
	<lastBuildDate>Tue, 17 Jan 2012 13:42:30 +0000</lastBuildDate>
	<language>en-us</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Monitoring an Coldfusion server with Cacti</title>
		<link>http://www.mogilowski.net/lang/en-us/2008/07/02/monitoring-an-coldfusion-server-with-cacti</link>
		<comments>http://www.mogilowski.net/lang/en-us/2008/07/02/monitoring-an-coldfusion-server-with-cacti#comments</comments>
		<pubDate>Wed, 02 Jul 2008 08:49:44 +0000</pubDate>
		<dc:creator>sebastian</dc:creator>
				<category><![CDATA[Coldfusion]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[cacti]]></category>
		<category><![CDATA[cfstat]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[template]]></category>

		<guid isPermaLink="false">http://www.mogilowski.net/?p=30&#038;lang=en-us</guid>
		<description><![CDATA[I don&#8217;t found a coldfusion template for Cacti so i created one. It uses cfstat. I use Cacti and coldfusion on Debian Linux. First you need a script to call the cfstat command on the coldfusion server: #!/bin/bash # This script call the coldfusion server stat service and format the output for cacti # 2008 [...]]]></description>
			<content:encoded><![CDATA[<p><span lang="en-us">I don&#8217;t found a coldfusion template for <a title="Cacti" href="http://www.cacti.net" target="_blank">Cacti</a> so i created one. It uses <em>cfstat</em>. I use <a title="Cacti" href="http://www.cacti.net" target="_blank">Cacti</a> and coldfusion on Debian Linux.</span></p>
<p><span lang="en-us">First you need a script to call the <em>cfstat</em> command on the coldfusion server:</span></p>
<pre>
#!/bin/bash

# This script call the coldfusion server stat service and format the output for cacti
# 2008 by Mogilowski Sebastian

# Settings:
HOSTNAME='127.0.0.1'
SSH_USER='username'
SSH_KEY_FILE='/path/to/ssh/key/file'
# Check argument
if [ $# -ne 1 ]
then
  echo "Usage: `basename $0` &#60;hostname&#62;"
  exit $E_BADARGS
fi

# Using command line argument 1 for hostname
HOSTNAME=$1

# Request statistics from the coldfusion stat service
STAT_OUTPUT=`ssh -i $SSH_KEY_FILE $SSH_USER@$HOSTNAME /opt/coldfusion8/bin/cfstat -n -x`

# Format the output for cacti
IFS=" "
ARRAY_OUTPUT=($STAT_OUTPUT)
echo "Pg/Sec_Now:"${ARRAY_OUTPUT[0]}" Pg/Sec_Hi:"${ARRAY_OUTPUT[1]}"
      DB/Sec_Now:"${ARRAY_OUTPUT[2]}" DB/Sec_Hi:"${ARRAY_OUTPUT[3]}"
      CP/Sec_Now:"${ARRAY_OUTPUT[4]}" CP/Sec_Hi:"${ARRAY_OUTPUT[4]}"
      Reqs_Qed:"${ARRAY_OUTPUT[6]}" Reqs_Rung:"${ARRAY_OUTPUT[7]}"
      Reqs_TOed:"${ARRAY_OUTPUT[8]}" Templ_Qed:"${ARRAY_OUTPUT[9]}"
      Templ_Rung:"${ARRAY_OUTPUT[10]}" Templ_TOed:"${ARRAY_OUTPUT[11]}"
      Flash_Qed:"${ARRAY_OUTPUT[12]}" Flash_Rung:"${ARRAY_OUTPUT[13]}"
      Flash_TOed:"${ARRAY_OUTPUT[14]}" CFC_Qed:"${ARRAY_OUTPUT[15]}"
      CFC_Rung:"${ARRAY_OUTPUT[16]}" CFC_TOed:"${ARRAY_OUTPUT[17]}"
      WebS_Qed:"${ARRAY_OUTPUT[18]}" WebS_Rung:"${ARRAY_OUTPUT[19]}"
      WebS_TOed:"${ARRAY_OUTPUT[20]}" AvgQ_time:"${ARRAY_OUTPUT[21]}"
      AvgReq_Time:"${ARRAY_OUTPUT[22]}" AvgDB_Time:"${ARRAY_OUTPUT[23]}"
      Bytes_In/Sec:"${ARRAY_OUTPUT[24]}" Bytes_Out/Sec:"${ARRAY_OUTPUT[25]}
</pre>
<p><span lang="en-us">This script calls <em>cfstat</em> via ssh on the coldfusion server, and format the data for cacti. With the parameter -n you disable the header output and option -x enables all values. For manual for remote command execution with ssh use google or <a title="http://oreilly.com/pub/h/66" href="http://oreilly.com/pub/h/66" target="_blank">http://oreilly.com/pub/h/66</a>. You don&#8217;t need root permissons for <em>cfstat</em>. You can download the script here:</span></p>
<a class="downloadlink" href="http://www.mogilowski.net/wp-content/plugins/download-monitor/download.php?id=6" title="Version 0.1 heruntergeladen 275 mal" >getColdFusionStats.sh (756 bytes)</a>
<p><span lang="en-us">Save it in the script directory of cacti.</span>(Debian: /usr/share/cacti/site/scripts/getColdFusionStats.sh)</p>
<p><span lang="en-us">Now you have to create the cacti templates. Look at the documentation of cacti for more informations. Here is my template:</span></p>
<a class="downloadlink" href="http://www.mogilowski.net/wp-content/plugins/download-monitor/download.php?id=5" title="Version 0.1 heruntergeladen 272 mal" >cacti_host_template_host_coldfusion_server.xml (3.37 KB)</a>
<p><span lang="en-us">This values will be graphed: AvgQ Time, AvgReq Time, AvgDB Time, Req TO&#8217;ed</span></p>
<p><span lang="en-us">Some screenshots:</span></p>
<div class="ngg-galleryoverview" id="ngg-gallery-9-30">

	<!-- Slideshow link -->
	<div class="slideshowlink">
		<a class="slideshowlink" href="http://www.mogilowski.net/lang/en-us/2008/07/02/monitoring-an-coldfusion-server-with-cacti?show=slide">
			[Show as slideshow]		</a>
	</div>

	
	<!-- Thumbnails -->
		
	<div id="ngg-image-58" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://cdn.mogilowski.net/wp-content/gallery/cf_cacti/request_timeout.jpg" title=" " class="shutterset_set_9" >
								<img title="request_timeout.jpg" alt="request_timeout.jpg" src="http://cdn.mogilowski.net/wp-content/gallery/cf_cacti/thumbs/thumbs_request_timeout.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-59" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://cdn.mogilowski.net/wp-content/gallery/cf_cacti/average_request_time.jpg" title=" " class="shutterset_set_9" >
								<img title="average_request_time.jpg" alt="average_request_time.jpg" src="http://cdn.mogilowski.net/wp-content/gallery/cf_cacti/thumbs/thumbs_average_request_time.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-60" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://cdn.mogilowski.net/wp-content/gallery/cf_cacti/average_queue_time.jpg" title=" " class="shutterset_set_9" >
								<img title="average_queue_time.jpg" alt="average_queue_time.jpg" src="http://cdn.mogilowski.net/wp-content/gallery/cf_cacti/thumbs/thumbs_average_queue_time.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-61" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://cdn.mogilowski.net/wp-content/gallery/cf_cacti/average_db_time.jpg" title=" " class="shutterset_set_9" >
								<img title="average_db_time.jpg" alt="average_db_time.jpg" src="http://cdn.mogilowski.net/wp-content/gallery/cf_cacti/thumbs/thumbs_average_db_time.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	
 	
</div>

<p><span lang="en-us">Please give me feedback for this template.</span></p>
<p><span lang="en-us"><strong>Note:</strong> Only available for singe server instance of coldfusion, because <em>cfstat</em> is not available in the multiserver configuration.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mogilowski.net/lang/en-us/2008/07/02/monitoring-an-coldfusion-server-with-cacti/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using apc
Database Caching 18/38 queries in 0.021 seconds using apc
Object Caching 601/618 objects using apc
Content Delivery Network via cdn.mogilowski.net

Served from: www.mogilowski.net @ 2012-02-05 02:15:14 -->
