Configuration
Monitoring has to be enabled in the sophora.properties
file before you can access the information as described here. The following snippet from the sophora.properties
file shows how to activate JMX monitoring with access control:
sophora.rmi.servicePort=1198
sophora.rmi.registryPort=1199
sophora.jmx.enabled=true
sophora.jmx.username=admin
sophora.jmx.password=admin
With this configuration, the Sophora Server can be accessed using the following JMX connection string:
service:jmx:rmi://<HOST>:1198/jndi/rmi://<HOST>:1199/server
The following image shows the connection settings dialog from VisualVM:
Available MBeans
Note, that some Beans are only available if the corresponding feature is active in the respective Sophora server. For example, you will find the ArchiveWorker-Bean only if you have enabled the archival of documents in the server.
com.subshell.sophora
JMX-Attribute/JMX-Method | Description | Possible Values | Modifiable via JMX |
---|---|---|---|
CheckForIncorrectLogins | Controls, whether incorrect login requests are counted. Too many incorrect login requests lead to the locking of accounts, depending on the server configuration parameter sophora.authenticate.incorrectLoginCount . | true /false | Yes |
EnableUserLogin | When set to false, non-admin users cannot log in to this server. Users who are logged in already remain logged in. | true /false | Yes |
JMX-Attribute/JMX-Method | Description | Possible Values | Modifiable via JMX |
---|---|---|---|
AddingToQueue | When set to true , documents are added to the archive worker queue. | true /false | Yes, viastartAddingToQueue() /stopAddingToQueue() |
Archiving | The archive worker is enabled, when this is set to true . | true /false | Yes, viastartArchival() /stopArchival() |
CheckAllDocumentsFor OldVersions | The archive worker checks all documents for old versions in a background thread, if set to true. | true /false | Yes |
CurrentDocumentUUID | The UUID of the current document. | A Sophora UUID | No |
Delay | Delay in ms between the archiving of versions. | Positive long integers. | Yes |
DeleteOldVersionsAfterDays | When the age of an archive version exceeds this amount of days the version will be removed from the archive. | Positive integers. If 0 to 0, versions are not removed at all. | Yes |
MaxVersionsToGet | The maximum number of document versions that should be processed at once. | Positive integers. | Yes |
MaxVersionsToRetain | The maximum number of document versions that will be kept in the main repository. | Positive integers. | Yes |
PreserveNumberOfVersions InArchiveRepository | The archiving processes keep at least this number of versions for all documents, regardless how old the versions are. | Positive integers. | Yes |
Queue | The UUIDs of documents waiting to be processed by the archive worker. | A list of UUIDs. | Yes |
clearQueue() | Clears the archive worker queue. | ||
addToQueue(String) | Adds a document to the archive worker queue, where the string is the UUID of the Sophora document that should be added | UUID | |
QueueSize | Current size of the archive worker queue. | Positive integers. | No |
RemainingVersionsOfCurrentDocument | Remaining number of versions of the current document. | Positive integers. | No |
TotalVersionsOfCurrentDocument | Total number of versions of the current document. | Positive integers. | No |
createNewDocumentForVersions(String) | Creates a new document for the newest version of the document that is given by its UUID. |
ConfigurationHashes
There are configuration hashes for multiple types of configuration documents that can be found via JMX. However, the scheme is the same for all of these types. Therefore, the table below lists a few attributes as Feature[...]
. For this attributes, you can substitute Feature with the following: Cnd, DefaultChildNodeConfiguration, DefaultPropertyConfiguration, DocumentProposalSection, FormFieldGroup, NodeTypeConfiguration, Role, StructureNodeDocument, StructureNode, SystemDocument, User.
JMX-Attribute/JMX-Method | Description | Possible Values | Modifiable via JMX |
---|---|---|---|
FeatureHash | Hash, calculated for all available documents of this feature. | a String | No |
FeatureHashEntries | All entries that were used to calculate the FeatureHash. | Map<String, String> of each document's name and hash. | No |
FeaturesAreInSyncWithMaster | Informs, whether this server's hash value is equal to the Sophora Primary Server's hash value of this feature, and therefore, if the configuration of this feature is in sync with the Sophora Primary Server. | TRUE, FALSE, UNKNOWN, NOT_CONSIDERED | No |
HasSameConfigurationAsMaster | Informs, whether this server has the same configuration as its Sophora Primary Server. | TRUE, FALSE, UNKNOWN, NOT_CONSIDERED | No |
JMX-Attribute/JMX-Method | Description | Possible Values | Modifiable via JMX |
---|---|---|---|
ApiVersion | Version of the Sophora API used in this server. | Sophora API version numbers | No |
Call Statistics | Statistics about method calls in the ContentManager. | No | |
CreateDocumentVersion WithoutStateCheckCount | The same as getMethodCount("createDocumentVersionWithoutStateCheck") . | Positive integers | No |
CreateDocumentVersion WithoutStateCheckDuration | The same as getMethodDuration("createDocumentVersionWithoutStateCheck") . | Positive integers | No |
CurrentLoad | System load average during the last minute. The calculation is depending on the operating system. | Positive floating point numbers | No |
DocumentTypeStatistics | Number of documents in the repository per type. Documents that are marked as deleted are included. | No | |
LockedDocumentCount | The number of currently locked documents. | Positive integers | No |
LoggedInUsers | A list of all users that are currently logged in. | String array of user names | No |
NumberOfActiveRequests | The number of current requests to the ContentManager. | Positive integers | No |
ProfilerSummary | Statistic for every API call concerning the ContentManager. | No | |
PublishDocumentCount | The number of publishing events during the last minute (getMethodCount("publishDocument") ). | Positive integers | No |
PublishDocumentDuration | The average duration of publishing events during the last minute (in ms) (getMethodDuration("publishDocument") ). | Positive integers | No |
ReadAnywhereAvailable | Informs, if this server is available in a ReadAnywhere cluster. | true /false | Yes, via toggleReadAnywhereStatus() |
ReplicationMode | Current replication mode of this Sophora server. | NONE, MASTER, SLAVE, STAGINGSLAVE | Yes, for servers started in cluster mode. |
SaveDocumentWithout PermissionCheckCount | The same as getMethodCount("saveDocumentWithoutPermissionCheck") . | Positive integers | No |
SaveDocumentWithout PermissionCheckDuration | The same as getMethodDuration("saveDocumentWithoutPermissionCheck") . | Positive integers | No |
SaveSophoraDocumentCount | The same as getMethodCount("saveSophoraDocument") . | Positive integers | No |
SaveSophoraDocumentDuration | The same as getMethodDuration("saveSophoraDocument") . | Positive integers | No |
ServerId | Unique ID of this Sophora server. | UUID | No |
ServerVersion | Version number of this Sophora server. | Sophora Server version numbers | No |
StartDate | Startup date and time of this server. | Date in format yyyy-MM-dd | No |
ThrottleLoadLimit | Threshold to decide on whether to throttle background tasks or not. See also the Throttle Mode documentation. | Positive floating point numbers. | Yes |
ThrottleMode | Informs whether the Sophora server is under high load, causing the server to go into throttle mode. | 1 if the load is high, 0 otherwise. | No |
resetInvertibleBloomFilters() | Erases and again initializes invertible bloom filters, if they are activated. | ||
syncDocuments(String) | Synchronizes the documents that are given via their UUIDs to all staging and replication Sophora Replica Servers. Returns an error, if the server this method is called on is not in replication mode MASTER. Multiple UUIDs can be separated with a comma, semicolon or tab. | ||
sendDocumentChangeEvents(String) | Sends document changed events for the documents specified by the given UUIDs. Multiple UUIDs can be separated with a comma, semicolon or tab. | ||
getMethodCount(String) | Returns the number of method calls to the ContentManager of the given method during the last minute. | ||
getMethodDuration(String) | Returns the average duration of method calls to the ContentManager of the given method during the last minute. | ||
removeAllServers() | Removes all Sophora Replica Servers that were previously connected to this server. |
JMX-Attribute/JMX-Method | Description | Possible Values | Modifiable via JMX |
---|---|---|---|
BlockSize | Number of documents that are collected for removal in each run. | Positive integers | Yes |
MinimumAgeInDays | Number indication how long ago a document's deletion has to be before it is considered by the DeletedDocumentsWorker | Positive integers | Yes |
CronExpression | The Cron Expression to trigger the DeletedDocumentsWorker | Valid Cron Expressions | Yes |
startDeletingDocuments() | Enables the worker if it has been switched off | ||
stopDeletingDocuments() | Disables the worker. | ||
isDeletingDocuments() | Informs, whether the worker is currently enabled. | ||
triggerDeletedDocumentsWorker() | Run the DeletedDocumentsWorker one time |
JMX-Attribute/JMX-Method | Description | Possible Values | Modifiable via JMX |
---|---|---|---|
Indexers | Lists all Solr indexes that are currently available. | Set with each indexes name and UUID. | No |
IndexQueueSizes | Provides information about each index's Solr queue size. | A map of Index names and their queue sizes. | No |
reindexCompleteIndexByName(String) | Reindexes the Solr index with the given name, considering a reindex query if it is available. | ||
reindexCompleteIndexByName | Reindexes the Solr index with the given name, not considering a reindex query even with one available. | ||
reindexCompleteIndexByUUID(String) | Reindexes the Solr index with the given UUID. | ||
reindexDocumentsByQuery(String, boolean) | Reindexes the documents that are found by the query. A query might look like this:@sophora:myproperty='value' .The query will hit deleted documents as well. The boolean parameter controls whether the documents to be indexed are added to the indexer's queue ( true ) or indexed through the indexers fast lane handling (false ). | ||
reindexDocumentsByUUID(String, boolean) | Reindexes the documents provided by a comma-separated UUID string. Spaces around UUIDs are trimmed. Unparseable UUIDs are ignore. The boolean parameter controls whether the documents to be indexed are added to the indexer's queue ( true ) or indexed through the indexers fast lane handling (false ). | ||
reindexDocumentsSince(String, boolean) | Reindexes all documents modified after this date. This will cover deleted documents as well. The boolean parameter controls whether the documents to be indexed are added to the indexer's queue ( true ) or indexed through the indexers fast lane handling (false ). |
|
JMX-Attribute/JMX-Method | Description | Possible Values | Modifiable via JMX |
---|---|---|---|
InitializedSolrCores | All currently initialized Solr cores. | A set of the Solr cores' names. | No |
Initializing | True , if the server is currently starting, false otherwise. | true /false | No |
IsArchiving | Whether the archival process is active. | 0, if archival is not active 1, if archival is active 2, if archival is active and currently busy 3, if archival is not enabled | No |
Ready | There are 3 criteria: 1. the server can accept client connections 2. the synchronization is finished 3. the staging has not been stopped after the synchronization To be considered as ready, all servers have to fulfill 1. Servers in mode Sophora Replica Server have to fulfill 2 in addition, staging Sophora Replica Servers have to additionally fulfill criteria 2 and 3. | true /false | No |
SolrInitialized | Whether all Solr cores are initialized. A Solr core is initialized, when it was initially synchronized after the server startup. | true /false | No |
StartArchival() | Starts the archival, if it is enabled | 1, if the archival is already running 2, if the archival was started 3, if archival is not enabled | |
StartStaging() | Starts the staging, if it is enabled | 1, if the staging is already running 2, if the staging was started 3, if staging is not enabled | |
StopArchival() | Stops the archival. | 1, if the archival was not started 2, if the archival was stopped 3, if archival is not enabled | |
StopStaging() | Stops the staging. | 1, if the staging was not started 2, if the staging was stopped 3, if staging is not enabled | |
Stop() | Stops the archival and the Sophora Server. |