Monit all files in directory - monit

Is there a possibility to run checks on all files in a directory with monit, Without mention every file in this directory by itself?
For example:
/etc/configurations-to-monitor/
config1
config2
config3
By now I use this in /etc/monit/conf.d/myconfigs:
check directory myconfigs path /etc/configurations-to-monitor/
if changed timestamp then alert
But there are some bypass possibilities to this construct. So I would like, to run timestamp and checksum-checks on this directory. The goal is to add more configurations to this directory, without touching the monit configuration again.
Thanks in advance

The solution for all missing features in monit is creating a script which will do the job and monit will just check its return code.

From monit-general#nongnu.org on 19.11.2014
Hello, using pattern for multiple files monitoring is not supported currently.
We plan to add this feature.

Related

change the location of the .nextflow folder?

when I run nextflow, I get a .nextflow folder, but I can't find a way to change its location (i.e. it is't -work-dir). How can I change the location of the .nextflow folder?
I have looked at launchDir but it seems that is a read-only implicit variable and cannot be overwritten in the CLI, also, the --launchDir option is only valid for the k8s scope (see original chat in gitter)
I'm using Nextflow 20.10.0 build 5430.
Keeping things neat and tidy is admirable. From this comment, it looks like the only way (without doing crazy things...) is to change to the directory you want your .nextflow cache directory to live and point all other options (i.e. -work-dir, -log etc) away to a separate directory:
If you want .nextflow in dir A and the pipeline work dir in B:
cd A
nextflow run -w B
The .nextflow has to be in the launching
directory to properly maintain the history of the executions.

BlueZ: Change local storage directory

By default, BlueZ stores its persistent data in /var/lib/bluetooth. This includes controller settings and information about paired devices. However, I'm working in a system where the /var directory is unreliable, so I wonder if there is any way I can change this directory?
I have seen examples where it can be changed during installation, with the "--localstatedir" flag, but I'm looking for a solution that doesn't require reinstallation.
Without reinstalling its not possible. Path is configured at compile time so recompilation and installation is required. You can replace STORAGEDIR macro with string which is read from main.conf to different path at runtime. After modifying these changes you can restart bluetoothd every time you change path then it works.

How do I specify JRE when creating a Bamboo sidekick agent for their per-build-container plug-in?

Trying to get the sidekick image built and having some issues. Is there any documentation other than the README.md file?
My current problem is with getting the JRE requirement working but there are others. The page says "download Oracle JRE and place it inside the working directory. Optionally if you have a company wide distribution url, use that one at a later step." and the help says "Java (JRE) download url or path inside working directory". Have not been able to get this to work.
I went to the JRE link provided and was presented with options to download a rpm file or a tar.gz file. Which is expected (was unable to get either one working)?
It says to place the file in the "working directory" but not sure where exactly. Tried in sidekick folder and in sidekick/jre both without success no matter what I used after the -j command. Is this just the path or should the filename be included as well? Can I get an example?
I'm running this script using my login but noticed the output folder is being created with root user and group. I see no indication that this should be run with sudo. What is the correct way to run this script?
Using debug, I see the function "download if not cached". Can I save these files (JRE, Bamboo jar file, etc.) somewhere so I don't have to worry about downloading them? If so, where should they go? Looks like I might have a problem with the wget to d/l the jar file so would like to just be able to place all these in a folder and be done with it.
It looks like the major problem is the script didn't clean up after itself if it fails. The issue was the first time it failed then that caused subsequent issues as the output folder was already there. Removing this directory between each attempt help.
As for the correct syntax for the -j JRE option I manually downloaded the JRE and placed in a folder called per-build-container/sidekick/stuff/. For the command line it is not just the path but the file name as well (the tar.gz and not the RPM). For my case it was
-j stuff/jre-8u251-linux-x64.tar.gz
Note I also ran the script as sudo. Wasn't stated but seemed to work OK.
Another issue I ran into was the download of the agent jar file. There is a redirect in the wget file that was not working for us. I ended up editing the script and replacing the Altassian based url with the redirected one.
This addresses all the issues I ran into with the initial question.

Marklogic - Adding a default rule set through admin console

I have defined a default ruleset through admin console. I have given the location of the ruleset as "C:/isParentOf.rules". However, it is not able to find this file. While running a query, it is complaining that
" The ruleset file cannot be found: C:/isParentOf.rules"
I have tried giving a relative path but it does not seem to work.
Can someone suggest what is the right way to specify the location of the ruleset and where ideally should it be kept (along with existing .rules files)
Thanks
Custom rulesets can be placed inside the MarkLogic installation dir under Config/, but I'd recommend uploading it to the schemas database. See also:
http://docs.marklogic.com/guide/semantics/inferencing#id_pgfId-924845
HTH!

php cron job doesn't update php.ini

I recently modify the "include_path" var in my php.ini file. Before you ask, I restarted the apache service. The change work for every pages we access from a web browser.
The problem is the cron jobs doesn't seems to consider that change. When I do a phpinfo() inside the cron job, it uses the same php.ini file than the web server and it is the one I changed, but the value beside "include_path" is the old one.
So is there a way to "restart" crontab?
Or maybe there is another problem?
Several systems use a separate php.ini file for web and CLI. You will need to make changes in that one as well: How to find the php.ini file used by the command line?
The easiest way to find this file is to run this at the command line: php --ini which will result in output like this:
user#computer:~$ php --ini
Configuration File (php.ini) Path: /etc/php5/cli
Loaded Configuration File: /etc/php5/cli/php.ini
Scan for additional .ini files in: /etc/php5/cli/conf.d
What you see as "Loaded Configuration File:" is where you need to add your changes.
EDIT: Another option, is in your CRON script use set_include_path() to make the change at runtime.
PHP generally has two .ini files. One for in-webserver (SAPI) and one for command-line (CLI) usage. If you modified only the SAPI one, then anything running from CLI (e.g. cron jobs) will not see the change.
do a php -i at the command line to see where PHP is looking for its ini file while in that mode.