192 lines
6 KiB
TeX
192 lines
6 KiB
TeX
%!TEX root = ../Thesis.tex
|
|
\section*{Anhang}
|
|
\addcontentsline{toc}{section}{Anhang}
|
|
\fancyhead[R]{Anhang}
|
|
|
|
\anhangsverzeichnis
|
|
|
|
%\anhang{Gesprächsnotizen}
|
|
|
|
%\subanhang{Gespräch mit Werner Müller}
|
|
|
|
%Gespräch mit Werner Müller am 01.01.2013 zum Thema XXX:
|
|
%\begin{compactitem}
|
|
% \item Über das gute Wetter gesprochen
|
|
% \item Die Regenwahrscheinlichkeit liegt immer bei ca. 3\%
|
|
% \item Das Unternehmen ist total super
|
|
% \item Hier könnte eine wichtige Gesprächsnotiz stehen
|
|
%\end{compactitem}
|
|
|
|
\anhang{InfluxDB Python Code}
|
|
|
|
\begin{figure}[bht]
|
|
\lstset{numbers=left, numberstyle=\tiny, stepnumber=1, numbersep=5pt}
|
|
\begin{lstlisting}[caption=InfluxDB Python Daten schreiben {Quelle: \cite[][]{InfluxAPIPythonClient}}, firstnumber=1, label=list:influxPythonWrite, language=Python],
|
|
import influxdb_client
|
|
from influxdb_client.client.write_api import SYNCHRONOUS
|
|
|
|
bucket = "<my-bucket>"
|
|
org = "<my-org>"
|
|
token = "<my-token>"
|
|
url="http://influxdb:8086"
|
|
|
|
client = influxdb_client.InfluxDBClient(
|
|
url=url,
|
|
token=token,
|
|
org=org
|
|
)
|
|
|
|
write_api = client.write_api(write_options=SYNCHRONOUS)
|
|
|
|
p = influxdb_client.Point("my_measurement")
|
|
.tag("location", "Paderborn")
|
|
.field("temperature", 25.3)
|
|
write_api.write(bucket=bucket, org=org, record=p)
|
|
\end{lstlisting}
|
|
\end{figure}
|
|
|
|
\begin{figure}[bht]
|
|
\lstset{
|
|
numbers=left,
|
|
numberstyle=\tiny,
|
|
stepnumber=1,
|
|
numbersep=5pt,
|
|
}
|
|
\begin{lstlisting}[caption=InfluxDB Python Daten lesen {Quelle: \cite[][]{InfluxAPIPythonClient}}, firstnumber=1, label=list:influxPythonRead, language=Python],
|
|
query_api = client.query_api()
|
|
query = 'from(bucket:"my-bucket")\
|
|
|> range(start: -10m)\
|
|
|> filter(fn:(r) => r._measurement == "my_measurement")\
|
|
|> filter(fn: (r) => r.location == "Prague")\
|
|
|> filter(fn:(r) => r._field == "temperature" )'
|
|
result = query_api.query(org=org, query=query)
|
|
results = []
|
|
for table in result:
|
|
for record in table.records:
|
|
results.append((record.get_field(), record.get_value()))
|
|
|
|
print(results)
|
|
[(temperature, 25.3)]
|
|
|
|
\end{lstlisting}
|
|
\end{figure}
|
|
|
|
\clearpage %Damit die Bilder richtig positioniert sind.
|
|
|
|
\anhang{Times Seires DB Rangliste}
|
|
|
|
\begin{figure}[hbt]
|
|
\centering
|
|
\begin{minipage}[t]{0.9\textwidth} % Breite, z.B. 1\textwidth
|
|
\caption{DB-Engines Ranking} % Überschrift
|
|
\includegraphics[width=1\textwidth]{img/DB-Engines-Ranking} % Pfad
|
|
\source{https://db-engines.com/de/ranking?msclkid=4f2a29e5d08811ec95ccd74f8f5146ab} % Quelle
|
|
\label{fig:db-ranking}
|
|
\end{minipage}
|
|
\end{figure}
|
|
|
|
\clearpage %Damit die Bilder richtig positioniert sind.
|
|
|
|
\anhang{InfluxDB Flux Code}
|
|
\begin{figure}[bht]
|
|
\lstset{
|
|
numbers=left,
|
|
numberstyle=\tiny,
|
|
stepnumber=1,
|
|
numbersep=5pt,
|
|
}
|
|
\begin{lstlisting}[caption=InfluxDB Flux Beispiel {Quelle: \cite[][]{InfluxAPIPythonClient}}, firstnumber=1, label=list:influxFlux],
|
|
from(bucket:"test-bucked")
|
|
|> range(start: -1h)
|
|
|
|
from(bucket:"test-bucked")
|
|
|> range(start: -1h, stop: -10m)
|
|
|
|
from(bucket:"test-bucked")
|
|
|> range(start: 2022-06-30T00:00:00Z, stop: 2022-06-30TT12:00:00Z)
|
|
|
|
from(bucket: "test-bucked")
|
|
|> range(start: -15m)
|
|
|> filter(fn: (r) => r._measurement == "cpu" and r._field == "cpu-total")
|
|
|> yield()
|
|
|
|
\end{lstlisting}
|
|
\end{figure}
|
|
|
|
|
|
|
|
|
|
|
|
\clearpage
|
|
|
|
|
|
\anhang{InfluxDB Webinterface Screenshot}
|
|
|
|
\begin{figure}[hbt]
|
|
\centering
|
|
\begin{minipage}[t]{0.9\textwidth} % Breite, z.B. 1\textwidth
|
|
\caption{InfluxDB Dashboard} % Überschrift
|
|
\includegraphics[width=1\textwidth]{img/InfluxDB-Dashboard}% Pfad
|
|
\source{Eigener Screenshot InfluxDB Webinterface} % Quelle\label{fig:dashboard}
|
|
\label{fig:dashboard}
|
|
\end{minipage}
|
|
\end{figure}
|
|
|
|
\begin{figure}[hbt]
|
|
\centering
|
|
\begin{minipage}[t]{0.9\textwidth} % Breite, z.B. 1\textwidth
|
|
\caption{InfluxDB Load Data Source} % Überschrift
|
|
\includegraphics[width=1\textwidth]{img/InfluxD-LoadData-Sources.PNG} % Pfad
|
|
\source{Eigener Screenshot InfluxDB Webinterface} % Quelle
|
|
\label{fig:load-data-source}
|
|
\end{minipage}
|
|
\end{figure}
|
|
|
|
\begin{figure}[hbt]
|
|
\centering
|
|
\begin{minipage}[t]{0.9\textwidth} % Breite, z.B. 1\textwidth
|
|
\caption{InfluxDB Load Data Bucket} % Überschrift
|
|
\includegraphics[width=1\textwidth]{img/InfluxD-LoadData-Bucket.PNG} % Pfad
|
|
\source{Eigener Screenshot InfluxDB Webinterface} % Quelle
|
|
\label{fig:load-data-bucket}
|
|
\end{minipage}
|
|
\end{figure}
|
|
|
|
\begin{figure}[hbt]
|
|
\centering
|
|
\begin{minipage}[t]{0.9\textwidth} % Breite, z.B. 1\textwidth
|
|
\caption{InfluxDB Load Data Bucket hinzufügen} % Überschrift
|
|
\includegraphics[width=1\textwidth]{img/InfluxD-LoadData-AddBucket.PNG} % Pfad
|
|
\source{Eigener Screenshot InfluxDB Webinterface} % Quelle
|
|
\label{fig:load-data-add-bucket}
|
|
\end{minipage}
|
|
\end{figure}
|
|
|
|
\begin{figure}[hbt]
|
|
\centering
|
|
\begin{minipage}[t]{0.9\textwidth} % Breite, z.B. 1\textwidth
|
|
\caption{InfluxDB Load Data API Tokens} % Überschrift
|
|
\includegraphics[width=1\textwidth]{img/InfluxD-LoadData-API-Key.PNG} % Pfad
|
|
\source{Eigener Screenshot InfluxDB Webinterface} % Quelle
|
|
\label{fig:load-data-api-token}
|
|
\end{minipage}
|
|
\end{figure}
|
|
|
|
\begin{figure}[hbt]
|
|
\centering
|
|
\begin{minipage}[t]{0.9\textwidth} % Breite, z.B. 1\textwidth
|
|
\caption{InfluxDB Load Data API Token hinzufügen} % Überschrift
|
|
\includegraphics[width=1\textwidth]{img/InfluxD-LoadData-API-Key-anlegen.PNG} % Pfad
|
|
\source{Eigener Screenshot InfluxDB Webinterface} % Quelle
|
|
\label{fig:load-data-add-token}
|
|
\end{minipage}
|
|
\end{figure}
|
|
|
|
% Die anzeige Funktioniert leider nicht!
|
|
%\anhang{DWD Wetterdaten}
|
|
%\begin{figure}[bht]
|
|
%\begin{lstlisting}[caption=Beschreibung Stationen {Quelle: DWD Datei Download}, label=list:lineproto, basicstyle=\tiny,],
|
|
%Stations_id von_datum bis_datum Stationshoehe geoBreite geoLaenge Stationsname Bundesland
|
|
%----------- --------- --------- ------------- --------- --------- ----------------------------------------- ----------
|
|
%\end{lstlisting}
|
|
%\end{figure} |