Skip to content

AlfrescoPlugin

evernat edited this page Sep 19, 2016 · 9 revisions

Installation

To monitor a Alfresco server v5.1 or later, you can install a Alfresco javamelody plugin (add-on):

  • Download the latest Alfresco amp file from releases. The amp file needs to be installed into the Alfresco Repository webapp using the Alfresco Module Management Tool (MMT):
  • Shut down your Alfresco server.
  • Copy the amp file to the amps directory in your Alfresco installation.

(Windows) c:\Alfresco\amps

(Linux) /opt/alfresco/amps

  • Run the apply_amps application to apply all amp files that are in the amps and amps_share directories:
For Windows, navigate to the bin directory and double click `apply_amps`.

For Linux, enter the command: `bin/apply_amps.sh`
  • Alternatively, to install individual AMP files, use MMT directly:

    For Windows: java -jar alfresco-mmt.jar install c:\Alfresco\bin\amps\alfresco-javamelody-addon.amp c:\Alfresco\tomcat\webapps\alfresco.war

    For Linux: java -jar alfresco-mmt.jar install /opt/alfresco/amps/alfresco-javamelody-addon.amp /opt/alfresco/tomcat/webapps/alfresco.war

    For more information on MMT, see Installing an Alfresco Module Package.

    Remove your existing expanded Alfresco web application directory to allow updates to be picked up when the server restarts.

    (Windows) c:\Alfresco\tomcat\webapps\alfresco

    (Linux) /opt/alfresco/tomcat/webapps/alfresco

  • Restart your Alfresco server.

That's it!

You can browse the monitoring page at http://<host>:<port>/alfresco/monitoring. For example, if the server is local: http://localhost:8080/alfresco/monitoring

Security

If you want to add authentication on the monitoring page, you can add "javamelody.authorized-users" system property (in $TOMCAT_HOME/bin/setenv.sh or in $TOMCAT_HOME/conf/catalina.properties) and restart Alfresco. For example:

	... -Djavamelody.authorized-users=user1:pwd1

Storage directory

The data files will be stored by default in $ALFRESCO_HOME/alf_data/javamelody. If you want to use another storage directory, add a "javamelody.storage-directory" system property (in $TOMCAT_HOME/bin/setenv.sh or in $TOMCAT_HOME/conf/catalina.properties). For example:

	... -Djavamelody.storage-directory=/my/path

You can configure other parameters, see Optional parameters.

Weekly, daily or monthly reports by mail

In Alfresco, you can also send weekly, daily or monthly reports in pdf format by mail to one or several people. This is explained in the chapter Weekly, daily or monthly reports by mail.

For Alfresco, add the following Resource and Parameter lines in the $TOMCAT_HOME/conf/context.xml file:

	...
	<Context ... > 
		...
		<Resource name="mail/JavaMelodySession" auth="Container" type="javax.mail.Session"
			mail.smtp.host="mailhost.foo.bar"
			mail.smtp.user="someLoginIfNeeded"
			mail.from="javamelody@foo.bar"
		/>
		<Parameter name='javamelody.admin-emails' value='admin1@company.com,admin2@company.com' override='false'/>
		<Parameter name='javamelody.mail-session' value='java:comp/env/mail/JavaMelodySession' override='false'/>
		<Parameter name='javamelody.mail-periods' value='day,week,month' override='false'/>
	</Context>
	...

Read Weekly, daily or monthly reports by mail for more parameters if needed.