Tuesday, October 18, 2011

JSPC Maven Plugin Package Name

Specifying package name when using the JSPC Maven plugin to pre-compile jsps


<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jspc-maven-plugin</artifactId>
<configuration>
<packageName>com.company.package.name</packageName>
</configuration>
<executions>
<execution>
<id>jspc</id>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>

Tuesday, October 04, 2011

Amazon AWS Service Status

AWS currently does not provide an API to query service status. They only provide a health dashboard webpage. Although the page has RSS feed capability, I couldn't detect any specific pattern to watch for. This simple solution below works for now. We have created nagios monitoring out of these one liners



status0 = OK
status2 = Performance Issues
status3 = ERROR

The service and region name below is literally as is from the web page.

wget -qO- "http://status.aws.amazon.com/" | grep -B 1 "Amazon Elastic Compute Cloud (N. California)" | head -n 1 |
perl -n -e 'm/images\/([\s\S]+?)\.gif/ && {print "$1\n"}'

status0

wget -qO- "http://status.aws.amazon.com/" | grep -B 1 "Amazon Elastic Compute Cloud (N. Virginia)" | head -n 1 |
perl -n -e 'm/images\/([\s\S]+?)\.gif/ && {print "$1\n"}'

status0