Event/Alert/Monitoring Applications

  • Elastic beats
  • Redis
  • logstash
  • Splunk
  • BigPanda
  • servicenow
  • Kafka

Elastic Stack

Was ist der ELK Stack? (ELK = Elasticsearch, Logstash und Kibana ==> Elastic Stack mit Beats)
How to forward events from logstash to Splunk
Deploying Redis with the ELK Stack
Sending logs from filebeat to redis and then logstash
Filebeats: Configure the Redis output

BigPanda

Splunk Integration
Cribl Integration
Sleeping Good At Night — Kafka Configurations Tweaks

BigPanda’s pipeline handles millions of events per second using micro services architecture which is heavily dependent on Kafka.We are using Kafka as an events streaming platform which helps our micro services “talk” with each other.

Splunk

Set up and use HTTP Event Collector in Splunk Web
Supported integrations

Cribl

Elastic + Cribl help organizations migrate SIEM and keep it simple

YouTube

BigPanda

Getting Started with BigPanda (Playlist)
Fast Track Video Series #7 – Getting started with BigPanda
Machine Learning & AIOps: Why IT Operations & Monitoring Teams Should Care
UBS invests in BigPanda to help drive digital disruption and innovation in AIOps

Elastic Stack

How to install and configure elasticsearch Auditbeat [7.x] | Auditbeat tutorial for beginners
[ Elasticsearch 12 ] How to configure and use AuditBeat
View Your System Logs with Elastic in Under 10 Minutes
Everything you Always Wanted to Know about Filebeat * But Were Afraid to Ask
Webinar: Elastic: Was sind Beats (Webinar vom 11. Mai 2022)

Kafka

Course | Apache Kafka Fundamentals (Playlist), Confluent
Apache Kafka Tutorials | Kafka 101, Confluent
Apache Kafka in 1 hour for C# Developers – Guilherme Ferreira – NDC London 2023, NDC Conferences
System Design: Why is Kafka fast?, ByteByteGo
Apache Kafka for Beginners (3+ hours long), Bogdan Stashchuk
Was ist Kafka?, IBM Technology

C++ Debugging with gdb

$ readelf -S <executable>
[...]
  [29] .debug_aranges    PROGBITS         0000000000000000  0001e5dd
       00000000000025d0  0000000000000000           0     0     1
  [30] .debug_info       PROGBITS         0000000000000000  00020bad
       00000000000fe146  0000000000000000           0     0     1
  [31] .debug_abbrev     PROGBITS         0000000000000000  0011ecf3
       00000000000078ba  0000000000000000           0     0     1
  [32] .debug_line       PROGBITS         0000000000000000  001265ad
       0000000000009e15  0000000000000000           0     0     1
  [33] .debug_str        PROGBITS         0000000000000000  001303c2
       00000000000461b1  0000000000000001  MS       0     0     1
  [34] .debug_ranges     PROGBITS         0000000000000000  00176573
       00000000000027d0  0000000000000000           0     0     1
[...]

C++ const

Const Correctness / C vs. C++ Differences
error: passing xxx as ‘this’ argument of xxx discards qualifiers

you’re calling a non-const member function on const object which is not allowed because non-const member functions make NO PROMISE not to modify the object

What is the meaning of ‘const’ at the end of a member function declaration?
declaring a const instance of a class

error: passing xxx as 'this' argument of xxx discards qualifiers
error: passing ‘const Foo’ as ‘this’ argument of ‘void Foo::bar()’ discards qualifiers [-fpermissive]
class Foo {
  public:
    Foo() {};
    virtual ~Foo() {};
    
    // must be const:
    // void bar() const {};
    void bar() {};
};

int
main(int argc, char *argv[])
{
  const Foo foo;

  foo.bar();

  return 0;
}

C++ chrono

C++ Performance Timer, uses the C++20 language standard

cppreference.com

Date and time utilities
std::chrono::duration
std::formatter
std::put_time

cplusplus.com

Time library
std::chrono::duration

C++ Cross-Platform High-Resolution Timer
chrono_literals is not a namespace-name
How to get duration, as int milli’s and float seconds from ?
Outputting Date and Time in C++ using std::chrono
Print current system time in nanoseconds using c++ chrono
How to convert std::chrono::time_point to string


Old-Style C

Print current system time in nanoseconds using c++ chrono
what is gettimeofday() equivalent in c++11

struct timeval now;

// seconds and nanoseconds
gettimeofday(&now, NULL);
const std::tm *localTime = std::localtime((time_t *) &now.tv_sec);

// only in seconds
//std::time_t now = std::time(nullptr);
//const std::tm *localTime = std::localtime(&now);

// GCC < 5.0
char dateTime[] = "00.00.00 00:00:00.";
char millis [] = "000";
strftime(dateTime, sizeof(dateTime), "%d.%m.%y %H:%M:%S.", localTime);
snprintf(millis, sizeof(millis), "%03li", now.tv_usec/1000 );

cout << dateTime << millis << " | ";


date


SIGSEGV

$ gdb build/bin/PerfTest
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-120.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /app/dev/andreas/build/bin/PerfTest...done.
(gdb) r
Starting program: /app/dev/andreas/build/bin/PerfTest
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6b316a3 in std::basic_ostream<char, std::char_traits<char> >& std::operator<< <char, std::char_traits<char>, std::allocator<char> >(std::basic_ostream<char, std::char_traits<char> >&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from /lib64/libstdc++.so.6
Missing separate debuginfos, use: debuginfo-install glibc-2.17-326.el7_9.x86_64 libgcc-4.8.5-44.el7.x86_64 libstdc++-4.8.5-44.el7.x86_64
(gdb) bt
#0  0x00007ffff6b316a3 in std::basic_ostream<char, std::char_traits<char> >& std::operator<< <char, std::char_traits<char>, std::allocator<char> >(std::basic_ostream<char, std::char_traits<char> >&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from /lib64/libstdc++.so.6
#1  0x0000000000401751 in app (trx=0x7fffffffe260) at /app/dev/andreas/PerfTest/main.cpp:47
#2  0x00000000004018d1 in main (argc=1, argv=0x7fffffffe398) at /app/dev/andreas/PerfTest/main.cpp:104

C++ map

Fun with printing tables with std::format and C++20
Const collection of unique_ptr, options and design choices

C++ Map Explained with Examples
Map in C++ Standard Template Library (STL)

How to use range-based for() loop with std::map?
std::map::at
How to find if a given key exists in a C++ std::map
C++: std::map throws an out_of_range exception

At Map C++
C++ map at()

// 
for (const auto& [key, value]: myMap) {
    std::cout << key << " has value " << value << std::endl;
}

Structured binding declaration
A brief introduction to C++ structured binding
Structured binding in C++

for (const auto& kv : myMap) {
    std::cout << kv.first << " has value " << kv.second << std::endl;
}

Range-based for loop
Range-based for loop in C++
Range-based for Statement (C++)

Oracle


/*************************************************************************************
 * sqlplus: no TNS_ADMIN => error
 */

$ ${ORACLE_HOME}/bin/sqlplus -L <user>@<servicename>
SQL*Plus: Release 19.0.0.0.0 - Production on Mon Jul 10 19:08:27 2023
Version 19.13.0.0.0
Copyright (c) 1982, 2021, Oracle.  All rights reserved.

ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified

SP2-0751: Unable to connect to Oracle.  Exiting SQL*Plus

/*************************************************************************************
 * sqlplus: with TNS_ADMIN, TCPS using sqlnet.ora/wallet => error, wallet not accessible (permission denied)
 */

$ TNS_ADMIN=/app/tns ${ORACLE_HOME}/bin/sqlplus -L <user>@<servicename>
SQL*Plus: Release 19.0.0.0.0 - Production on Mon Jul 10 19:08:56 2023
Version 19.13.0.0.0
Copyright (c) 1982, 2021, Oracle.  All rights reserved.

ERROR:
ORA-28759: failure to open file

SP2-0751: Unable to connect to Oracle.  Exiting SQL*Plus

/*************************************************************************************
 * tnsping: with TNS_ADMIN, TCPS using sqlnet.ora/wallet => error, wallet not accessible (permission denied)
 */
$ TNS_ADMIN=/app/tns ${ORACLE_HOME}/bin/tnsping <servicename>
TNS Ping Utility for Linux: Version 19.0.0.0.0 - Production on 11-JUL-2023 08:18:34
Copyright (c) 1997, 2021, Oracle.  All rights reserved.

Used parameter files:
/app/tns/sqlnet.ora

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION_LIST= (LOAD_BALANCE=off) (FAILOVER=off) (DESCRIPTION= (CONNECT_TIMEOUT=5) (TRANSPORT_CONNECT_TIMEOUT=3) (RETRY_COUNT=3) (ADDRESS_LIST= (LOAD_BALANCE=on) (ADDRESS= (PROTOCOL=TCPS) (HOST=<hostname>) (PORT=1522))) (CONNECT_DATA= (SERVICE_NAME=<servicename>))))

TNS-12560: TNS:protocol adapter error

/*************************************************************************************
 * tnsping: with TNS_ADMIN, TCP => ok
 */
$ TNS_ADMIN=/app/tns ${ORACLE_HOME}/bin/tnsping <servicename>

TNS Ping Utility for Linux: Version 19.0.0.0.0 - Production on 11-JUL-2023 09:52:39

Copyright (c) 1997, 2021, Oracle.  All rights reserved.

Used parameter files:
/app/tns/sqlnet.ora

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION_LIST= (LOAD_BALANCE=off) (FAILOVER=off) (DESCRIPTION= (CONNECT_TIMEOUT=5) (TRANSPORT_CONNECT_TIMEOUT=3) (RETRY_COUNT=3) (ADDRESS_LIST= (LOAD_BALANCE=o) (ADDRESS= (PROTOCOL=TCP) (HOST=<hostname>) (PORT=1521))) (CONNECT_DATA= (SERVICE_NAME=<servicename>))))

OK (0 msec)

/*************************************************************************************
 * sqlplus: with TNS_ADMIN, TCP => ok
 */
$ TNS_ADMIN=/app/tns ${ORACLE_HOME}/bin/sqlplus <user>@<servicename>

SQL*Plus: Release 19.0.0.0.0 - Production on Tue Jul 11 09:52:48 2023
Version 19.13.0.0.0

Copyright (c) 1982, 2021, Oracle.  All rights reserved.

Enter password:
Last Successful login time: Tue Jul 11 2023 07:18:44 +02:00

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.18.0.0.0

SQL> exit
NLS_LANG=American_America.WE8ISO8859P1
NLS_LANG=American_America.UTF8