Skip to main content
Skip table of contents

censhare WP and Keycloak - Monitor and logging


Monitor and log the censhare WP and Keycloak related services.

Work with censhare WP services

Services:

  • censhare Server

  • censhare.cloud-gateway

  • censhare.static-resource-server

  • keycloak

  • censhare.google-ai

  • social.media.service

Check all running services: 

CODE
systemctl status  

Check running censhare services (does not include Keycloak): 

CODE
systemctl status censhare.*  

Check for a certain service: 

CODE
systemctl status SERVICE_NAME

Start a service: 

CODE
sudo systemctl start SERVICE_NAME

Restart a service: 

CODE
sudo systemctl restart SERVICE_NAME 

Stop a service: 

CODE
sudo systemctl stop SERVICE_NAME

For more information, see How to administrate censhare related systemd services.

Monitoring

Monitoring for censhare WP services is activated by default. 

The health check endpoint for load balancers, for example, is usable like this:

CODE
curl -s http://localhost:9000/monitoring/health


On success, this returns:

CODE
{ "status": "UP"} 


Logging

Find log file directions for all censhare WP and Keycloak related services.

censhare Server

You can find the logs at:

CODE
/var/opt/censer/censhare-server.log

Cloud Gateway

You can find the logs at:

CODE
/opt/log/censer/cloud-gateway.log

Cloud Gateway detailed logging:

CODE
spring.application.log-request-details:   true
logging.level.org.springframework.web:   TRACE
logging.level.org.springframework.web.HttpLogging:   TRACE

Static Resource Server

You can find the logs at:

CODE
/var/log/censer/static-resource-server.log

Static Resource Server detailed logging:

CODE
spring.application.log-request-details: true
logging.level.org.springframework.web: TRACE
logging.level.org.springframework.web.HttpLogging: TRACE

Keycloak logs

CODE
/opt/jboss/keycloak/standalone/logs
 
less /opt/jboss/keycloak/standalone/logs/server.log

Keycloak all events

By default, Keycloak logs failed authentication attempts. To log all events, add the following to the Keycloak configuration file in the logging section.

Add this logger to the logging subsystem:

/opt/jboss/keycloak/standalone/configuration/standalone.xml

CODE
<logger category="org.keycloak.events">
    <level name="DEBUG"/>
</logger>

Keycloak detailed logging

/opt/jboss/keycloak/standalone/configuration/standalone.xml

CODE
<periodic-rotating-file-handler name="FILE" autoflush="true">
    <level name="DEBUG"/>
    <formatter>
        <named-formatter name="PATTERN"/>
    </formatter>
    <file relative-to="jboss.server.log.dir" path="server.log"/>
    <suffix value=".yyyy-MM-dd"/>
    <append value="true"/>
</periodic-rotating-file-handler>

Authorization mapper logging

For more information, see Authorization mapper.

Optional services logs

If installed, logs for the optional services are in

Google AI

CODE
/var/opt/censer/google-ai.log

Social media management

CODE
/var/opt/censer/social-media-service.log
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.