Skip to content

Instantly share code, notes, and snippets.

View linuxmalaysia's full-sized avatar
🏠
Working from home

Harisfazillah Jamel linuxmalaysia

🏠
Working from home
View GitHub Profile

Keybase proof

I hereby claim:

  • I am linuxmalaysia on github.
  • I am linuxmalaysia (https://keybase.io/linuxmalaysia) on keybase.
  • I have a public key whose fingerprint is D10A 7BC3 6E37 4688 3025 F23A E674 713A 5CA7 60C8

To claim this, I am signing this object:

Make sure these boxes are checked before submitting/approving the PR

General

  • The code works
  • The code is easy to understand
  • Follows coding conventions
  • Names are simple and if possible short
  • Names are spelt correctly
  • Names contain units where applicable
  • There are no usages of magic numbers
@linuxmalaysia
linuxmalaysia / logstash-syslog.conf
Last active March 18, 2019 13:32
Logstash Conf Filter For Syslog Input
## https://github.com/minyk/morphline-mr/wiki/DictionariesOfGrok
## https://serverfault.com/questions/735230/why-cant-the-logstash-syslog-pri-filter-see-the-priority-in-syslog-messages
filter {
if "syslog" in [tags] {
grok {
match => {
"message" => [ "%{SYSLOG5424PRI}%{SYSLOGBASE2}", "%{SYSLOGBASE2}", "%{SYSLOGPAMSESSION}", "%{CRONLOG}", "%{SYSLOGLINE}" ]
}
tag_on_failure => [ "failedPattern_syslog" ]
input {
file {
path => "/data/ujian/fortigate*.txt"
start_position => beginning
sincedb_path => "/dev/null"
type => "fortigate"
}
}
filter {
Config Untuk Listbot
Contoh diambil dari
https://github.com/dtag-dev-sec/listbot
1) Git clone masukkan dalam /etc/logstash
@linuxmalaysia
linuxmalaysia / logstash-windows-events.txt
Last active March 15, 2024 13:51
logstash windows events from winlogbeat. Translate common Event ID's and Translate common Event ID's to Quadrants
input {
beats {
id => "01-beats-input"
port => 55044
tags => "winlogbeat"
}
}
@linuxmalaysia
linuxmalaysia / README-autossh-systemd.txt
Last active October 9, 2024 05:30
Autossh using systemd
1) ==== Autossh using systemd ====
Example from
https://gist.github.com/drmalex07/c0f9304deea566842490
2) =============
Install autossh
@linuxmalaysia
linuxmalaysia / logstash-grok-uri.txt
Last active March 18, 2019 15:02
logstash grok uri. Find URL or URI in field data.
# %{URI:uri}
#
# %{URIPROTO:uriproto}://(?:%{USER:user}(?::[^@]*)?@)?(?:%{URIHOST:urihost})?(?:%{URIPATHPARAM:uripathparam})?
#
# %{EMAILLOCALPART:emaillocalpart}@%{HOSTNAME:emailhostname}
#
# %{EMAILADDRESS:emailaddress}
### URI / URL
@linuxmalaysia
linuxmalaysia / rsyslog-logstash.conf
Created March 25, 2019 01:54
Config for rsyslog in /etc/rsyslog.d or rsyslog.conf and named it rsyslog-logstash.conf
# Setup disk assisted queues
# Disable rate limit
$SystemLogRateLimitInterval 0
$SystemLogRateLimitBurst 0
$WorkDirectory /var/spool/rsyslog # where to place spool files
$ActionQueueFileName fwdRule21 # unique name prefix for spool files
$ActionQueueMaxDiskSpace 10g # 10gb space limit (use as much as possible)