I have an issue with timestamp on rundeck, my machine hosting the application is in Europe/Paris timezone and CEST time but in Rundeck the timestamp displays in UTC.
So all the jobs are two hours late...
After reading many posts about this topic, tried to add this option in the profile configuration file but without success:
RDECK_JVM_OPTS="-Duser.timezone=Europe/Paris"
Have you ever had this issue? Can you please help me?
Thanks, BR.
Stop the Rundeck service.
If you're using a Debian/Ubuntu-based instance create the /etc/default/rundeckd file. If you're using a Redhat/CentOS/Rocky-based instance create the /etc/sysconfig/rundeckd file.
The rundeckd file must contain the following content:
RDECK_JVM_OPTS="-Duser.timezone=Europe/Paris"
Save the file and then, Start the Rundeck instance.
You can test on two different timezones: Paris and Santiago (America/Santiago).
Related
I have multiple scheduled jobs on a windows Server that run every night starting at 9 PM till midnight.
Is there any programmatic way (C#) to read (export) the Logs/History of each scheduled task and save it to SQL Server or as a text file within the server.
We are tying to show that data on a dashboard.
Thank You
I have researched on this issue and found a solution that worked for me. Created a sample project and is on GitHub.
Please check it out GetTaskSchedulerHistory
Thank You
I have a requirement to monitor a particular java string in a logfile whose name changes with date, for ex. D:\Logs\logfile-DDMMYYYY.log. I want to get a alert if this string is detected in the log. Can someone help me that?
Regards,
Script is your best way for accomplish that, if it is an linux machine you can wrote a perl\bash script. if you need to monitor Windows machine you can use VBScript.
If you prefer not dealing with scripts, you can use NiCE Excellnet & Free Log File Monitoring MP: http://www.nice.de/log-file-monitoring-scom-nice-logfile-mp/ But i don't sure if theirs mp supports monitoring wildcards log file names.
SCOM can monitor log files dynamically. You should monitor log directory D:\Logs with log file pattern logfile-????????.log.
I am using postgresql 9.5 on ubuntu 16.04.
Is there any way in postgresql so that it's logs can be stored in JSON format ?
I need to send it to elasticsearch, that's why I need to make postgresql logs in JSON format.
I followed this tutorial, but did not quite understood that what and where it was asking me to make changes in the conf file.
PostgreSQL listens to their community and your voice is heard !
PostgreSQL 15 beta has been released on May 15th, 2022. PostgreSQL version 15 now supports the jsonlog logging format which is to be released in third quarter of 2022 .
You have to make the below change in the postgresql.conf file
log_destination = 'jsonlog'
The log output will be written to a file, making it the third type of destination of this kind, after stderr and csvlog.
You can send these generated json logs to elasticsearch or any application for further log aggergations.
Check here for more info
Update: PostgreSQL v15 is out now. You can now explore them here
PostgreSQL self doesn't support any other formats than plain text and CSV. When you need other formats, then you need to get somewhere (or write by self) special extension that is able to touch log API and format and push PostgreSQL logs. One extension was developed by Michael and it is described in mentioned link. Here is link to source code: https://github.com/michaelpq/pg_plugins/tree/master/jsonlog . You have to compile this extension like any other (PostgreSQL extension) - code is in C language, and then you can use it.
As I am understanding your problem statement is you want to push postgresql logs to Elasticsearch.
For this I would recommend to use filebeat where you can simple enable the PostgresSQL module and set the log path. Filebeat start reading logs file and push to Elasticsearch.
You can visualize your data from kibana with readymade dashboard. It is simple plug and play.
When I look at the log files for my application, the entries are listed in UTC. However, I want the entries to reflect my local timezone. Can you customize the time zone for the log files?
I did not find the information in the documentation. I used the following commands to change the time zone to US Eastern time:
cf set-env <app-name> JAVA_OPTS '-Duser.timezone=America/New_York'
cf restage <app-name>
As an alternative, I could have changed the manifest.yml file.
Following problem:
I have a Yesod web app that is connected to a Postgres database (everything is hosted on AWS Elastic Beanstalk).
My customer wants to define a schedule (day, hour, ...) for things to happen automatically (e.g. sending out a message). E.g.: "every wednesday message A will be sent at 02:00 PM, but does not get sent after 03:00 PM if the server was down in that period". The definition could be saved to a text file on S3 for example.
One lib I found was https://hackage.haskell.org/package/cron which could be used as a basis for my needs with a caveat: if the server is shut down in that particular minute in which a job would be triggered, the message would not be sent when the server is back.
I used DelayedJob (Ruby) in the past and there the scheduled jobs were stored in a database to circumvent this issue. But in Haskell I could only find solutions without database persistence.
Is there anything to look into for Haskell or do I have to build that on my own e.g. use something like http://jdabbs.com/resquing-yesod/ as a starting point)?