<?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; cfstat</title>
	<atom:link href="http://www.mogilowski.net/lang/de-de/tag/cfstat/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>Thu, 26 Apr 2012 06:44:10 +0000</lastBuildDate>
	<language>de-de</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Monitoring an Coldfusion server with Cacti</title>
		<link>http://www.mogilowski.net/lang/de-de/2008/07/02/monitoring-an-coldfusion-server-with-cacti</link>
		<comments>http://www.mogilowski.net/lang/de-de/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[Da ich leider keine Coldfusion Templates für Cacti gefunden habe, habe ich hier mal kurz selber eines erstellt. Für die Abfrage wird cfstat benutzt. Cacti und Coldfusion laufen in dieser Konfiguration unter Linux. Zuerst wird ein Skript benötigt welches den cfstat Befehl auf den Servern ausführt: #!/bin/bash # This script call the coldfusion server stat [...]]]></description>
			<content:encoded><![CDATA[<p><span lang="de-de">Da ich leider keine Coldfusion Templates für <a title="Cacti" href="http://www.cacti.net" target="_blank">Cacti</a> gefunden habe, habe ich hier mal kurz selber eines erstellt. Für die Abfrage wird <em>cfstat</em> benutzt. <a title="Cacti" href="http://www.cacti.net" target="_blank">Cacti</a> und Coldfusion laufen in dieser Konfiguration unter Linux.</span></p>
<p><span lang="de-de">Zuerst wird ein Skript benötigt welches den <em>cfstat</em> Befehl auf den Servern ausführt:</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="de-de">Dieses Skript führt per ssh die <em>cfstat</em> Anfrage auf dem Coldfusion Server aus, und formatiert die erhaltenen Daten so um, das diese mit Cacti auszuwerten sind. Mit dem Parameter -n wird die Ausgabe der Kopfzeile (Feldnamen) unterdrückt und mit -x holt man sich alle Werte. Für die Einrichtung der Schlüsselbasierten ssh Authtifizierung verweise ich auf Google oder <a title="http://oreilly.com/pub/h/66" href="http://oreilly.com/pub/h/66" target="_blank">http://oreilly.com/pub/h/66</a>. Zum ausführen von cfstat sind keine root-Rechte erforderlich, somit ist kein sudo erforderlich. Hier das Skript als Download:</span></p>
<a class="downloadlink" href="http://www.mogilowski.net/wp-content/plugins/download-monitor/download.php?id=6" title="Version 0.1 heruntergeladen 283 mal" >getColdFusionStats.sh (756 bytes)</a>
<p><span lang="de-de">Es muss im script Verzeichnis von Cacti abgelegt werden. </span>(Debian: /usr/share/cacti/site/scripts/getColdFusionStats.sh)</p>
<p><span lang="de-de">Als nächstes müssen entsprechende Cacti Templates angelegt werden. Hier sollte man sich die Cacti Dokumentation ansehen. Hier habe hier auch mein Template zum download bereitgestellt:</span></p>
<a class="downloadlink" href="http://www.mogilowski.net/wp-content/plugins/download-monitor/download.php?id=5" title="Version 0.1 heruntergeladen 280 mal" >cacti_host_template_host_coldfusion_server.xml (3.37 KB)</a>
<p><span lang="de-de">Zur Zeit werden 4 Werte abgefragt (AvgQ Time, AvgReq Time, AvgDB Time, Req TO&#8217;ed).</span></p>
<p><span lang="de-de">Hier einige Screenshots von den erstellten Graphen:</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/de-de/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://www.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://www.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://www.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://www.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://www.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://www.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://www.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://www.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="de-de">Ich bitte um Feedback, wenn entsprechendes Interesse besteht, kann man einen Thread im <a title="Cacti Forum" href="http://forums.cacti.net/" target="_blank">Cacti Forum</a> erstellen.</span></p>
<p><span lang="de-de"><strong>Bemerkung:</strong> Funktioniert nur mit der Singleserver Installation, da in der Multiserver <em>cfstat</em> nicht verfügbar ist.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mogilowski.net/lang/de-de/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 17/39 queries in 0.037 seconds using apc
Object Caching 588/613 objects using apc

Served from: www.mogilowski.net @ 2012-05-22 00:03:44 -->
