How do you change the MARK period in the new rsyslog configuration file? - rsyslog

The old $MarkMessagePeriod no longer works. In my attempt to set the MARK period in the new configuration file, I changed the following line
`#module(load="immark")`
to
`module(load="immark" MarkMessagePeriod="600")`
But I get the following error:
rsyslogd: error during parsing file /etc/rsyslog.conf, on or before line 26: parameter 'MarkMessagePeriod' no known -- type in conf file? [v8.2002.0 try https://www.rsyslog.com/e/2207 ]

This is the new syntax:
module(load="immark" interval="600")

Related

How to use environment variable(string) in a .conf file

I have a .conf file that has a label and variable that I'm trying to move to a .env file. How can I accomplish this?
This is what I have in my .conf file
[[inputs.snmp]] #Label
agents = ["1.1.1.1:111","2.2.2.2:111","2.3.3.3:111"] #Variable
version = 2 #Variable
I'm trying to have something like this in the .env file
VAR_FOR_CONF_FILE='[[inputs.snmp]]\n agents= ["1.1.1.1:111","2.2.2.2:111","2.3.3.3:111"]\n version=2'
I was hoping I could use $VAR_FOR_CONF_FILE in my .conf file instead of [[inputs.snmp]]agents = ["1.1.1.1:111","2.2.2.2:111","2.3.3.3:111"]
but I keep getting this error Error parsing data: line 7: invalid TOML syntax for $VAR_FOR_CONF_FILE (Im not sure if I'm getting this error because I have the syntax wrong in my .env file or I'm declaring $VAR_FOR_CONF_FILE incorrectly in my .conf file)
Am I doing it correctly (or is it even possible to do what I'm trying to accomplish)?
(Note: I'm trying to accomplish this so I can simply use $VAR_FOR_CONF_FILE instead of hard coding things in the .conf file)
I'm trying to use VAR_FOR_CONF_FILE in the .conf file
If the .conf file parsing program doesn't support variable substitution, there's no way around modifying the .conf file, but this can be automated:
sed -i "s/\<VAR_FOR_CONF_FILE\>/$VAR_FOR_CONF_FILE/" my.conf

Jmeter: How to create HTML dashboard in jmeter using saved summary csv file

I am using following command to generate HTML dashboard:
jmeter -g C:/Users/E01659/Desktop/feb28/feb28_10_3600.csv -o C:/Users/E01659/Downloads/apache-jmeter-5.1/bin/sonali/
Following error is coming: File
'C:\Users\E01659\Desktop\feb28\feb28_10_3600.csv' does not contain the
field names header, ensure the jmeter.save.saveservice.* properties
are the same as when the CSV file was created or the file may be read
incorrectly when generating report An error occurred: Mismatch between
expected number of columns:17 and columns in CSV file:11, check your
jmeter.save.saveservice.* configuration or check line is complete
errorlevel=1
From the error message, it is clear that - CSV file created earlier don't have the header as the first line. When you want to create the APDEX Dashboard from CSV file, JMeter expects that files are created with correct Save Service Configuration. You can change Result file config which are present in jmeter.propertes file.
You may need to change the line as below, so that file created has the headers name as required
jmeter.save.saveservice.label = true
The command you're using is correct, the reason of failure is mismatch of the .jtl file contents and what JMeter expects it to be.
If you got this feb28_10_3600.csv file from execution on another JMeter installation - make sure that JMeter's result save configuration on the machine where you're trying to generate the report is identical to the JMeter installation where JMeter was running.
Inspect the associated JMeter properties and amend them to for 100% match, once done you should be able to normally generate the dashboard.
If you still experience the differences update your question with first 2-3 lines of your .jtl results file.
You are receiving this error (most likely) due to a corrupt line at the end of your file. Just execute a 'tail ' to see the last few lines. Most likely, your last line is missing columns due to an abrupt stop in the test. Once you delete the problematic line, you should be able to generate the HTML report.

How can I set "disable_http" which is flag parameter with file strategy in marathon

I'am trying to add the file /etc/marathon/conf/disable_http with no value but I have this error:
Error: Bad arguments for option 'disable_http': '' - too many arguments for flag option
I try, empty file, "enabled" value, "disabled" value, "true".
Thanks.
If your are using the package provide by mesoshepere the file must start with a ? , with this the content of the file is not add to the command line
https://github.com/mesosphere/marathon/blob/22a00d46fa1741e5c237f2e70e4180d53b3b127b/bin/marathon-framework#L42

JMeter: How to specify the users.csv file in the command line

When using JMeter from the command line, I get the following error in my log:
2014/08/05 14:29:43 ERROR - jmeter.config.CSVDataSet: java.io.FileNotFoundException:
/home/stew/YOU_FORGOT_TO_SPECIFY_USERS_CSV_FILE.csv (No such file or directory)
The user.csv file is in the same directory as the testplan.jmx file. Is there an option to specify the file in the command line?
Regards,
Wolf
If you use relative file name for path then it should work, as per reference documentation:
Filename Name of the file to be read. Relative file names are resolved with respect to the path of the active test plan. For distributed testing, the CSV file must be stored on the server host system in the correct relative directory to where the jmeter server is started.
For another solution, Have a look at :
http://jmeter.apache.org/usermanual/functions.html#__P
You use this function in CSV dataset :
${__P(resdir)}
and on command line:
-Jresdir=your path to csv file
I was using Jmeter to test load Moodle and used options -Jresdir and -Jusersfile options to pass usersfile name

Bro IDS Signature file error

I am trying to run bro in my bash terminal. I have got a duplicate local.bro file which i renamed as localv2.bro, and put it in my working directory /home/bibin, so its not in default path. I am just trying to do a simple signature match, therefore i have created a signature.sig file in the directory. In my localv2.bro file i have tried using both ways:
#load-sigs ./signature
And
redef signature_files += "signature.sig
The signature.sig file has the signature my-first-sig example from bro.org site.
In the terminal when i try to execute this command:
bro -r traffic.pcap localv2.bro
I get an error message saying:
line 27: unrecognized character -
I have also tried doing it in a different route:
bro -r traffic.pcap -s signature.sig
This also gives me the same unrecognized character error.
Am i doing something wrong, please can you guide me to a solution ?

Resources