Monitor and log the censhare and related services.


Work with censhare services

Services:

  • censhare Server

  • censhare.cloud-gateway

  • censhare.static-resource-server

  • keycloak

  • censhare.google-ai

  • social.media.service
  • censhare core-mail.service

Check all running services: 

systemctl status  
CODE

Check running censhare services (does not include Keycloak): 

systemctl status censhare.*  
CODE

Check for a certain service: 

systemctl status SERVICE_NAME
CODE

Start a service: 

sudo systemctl start SERVICE_NAME
CODE

Restart a service: 

sudo systemctl restart SERVICE_NAME 
CODE

Stop a service: 

sudo systemctl stop SERVICE_NAME
CODE

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

Monitoring

Monitoring for censhare services is activated by default. 

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

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


On success, this returns:

{ "status": "UP"} 
CODE


Monitoring for Cloud Gateway is activated by default.

The health check endpoint for Cloud Gateway, for example, is usable like this:

curl -s http://localhost:8082/actuator/health
CODE


On success, the JSON returned also includes this:

{ "status": "UP"} 
CODE


Monitoring for Static Resource Server is activated by default.

The health check endpoint for Static Resource Server, for example, is usable like this:

curl -s http://localhost:8081/actuator/health
CODE


On success, the JSON returned also includes this:

{ "status": "UP"} 
CODE

Logging

Find log file directions for all censhare and related services.

censhare Server

You can find the logs at:

/opt/corpus/work/logs/server-0.0.log
CODE

Cloud Gateway

You can find the logs at:

/var/log/censer/core-cloud-gateway.log
CODE

Cloud Gateway detailed logging:

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

Static Resource Server

You can find the logs at:

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

Static Resource Server detailed logging:

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

Keycloak logs

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

Authorization mapper logging

For more information, see Authorization mapper.

Optional services logs

If installed, logs for the optional services are in

Google AI

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

Social media management

/var/log/censer/social-media-service.log
CODE

Social media management

/var/log/censer/core-mail-service.log
CODE