Log & Log-Verzeichnis
Auf NSX-Appliances befinden sich Syslog-Nachrichten in /var/log/syslog
.
Auf NSX-Appliances können Sie den folgenden NSX-CLI-Befehl verwenden, um die Logs anzuzeigen:
1
| get log-file <auth.log | controller | controller-error | http.log | kern.log | manager.log | node-mgmt.log | syslog> [follow]
|
Name | Beschreibung |
---|
auth.log | Authentifizierungslog |
controller | Controller-Log |
controller-error | Controller-Fehler-Log |
http.log | HTTP-Dienst-Log |
kern.log | Kernel-Log |
manager.log | Manager-Dienst-Log |
node-mgmt.log | Node-Management-Log |
nsx-audit-write.log | NSX-Audit-Schreib-Log |
nsx-audit.log | NSX-Audit-Log |
syslog | System-Log |
Syslog Konfiguration
ESXi
1
2
3
4
5
6
7
8
9
10
|
esxcli network firewall ruleset set -r syslog -e true
esxcli system syslog config set --loghost=udp://<log server ip>:<Port>
esxcli system syslog reload
esxcli system syslog mark -s "This is a test message"
|
NSX-Manager Syslog-Konfiguration
1
| set logging-server <log server ip or FQDN>:514 proto udp level info
|
1
2
3
4
5
6
7
8
| # Anzeigen der Cluster-Konfiguration
get cluster config
# Anzeigen des API-Zertifikat-Thumbprints
get certificate api thumbprint
# Hinzufügen eines Knotens zum Cluster
join <ip> cluster-id <ID> thumbprint <thumbprint> username <username> password <password>
|
NSX-Edge
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
| get managers
get node-uuid
get vteps
get interfaces
get host-switches
get logical-routers
get route bgp
get bgp neighbor summary
get ospf route
get ospf neighbor
|
NSX-Edge join management-plane
1
2
3
4
5
| ### nsx-manager
get certificate api thumbprint
### nsx-edge
join management-plane <ip> thumbprint <thumbprint> username <username> password <password>
|
ESXi Distributed Firewall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
| summarize-dvfilter | grep -A 3 vmm
vsipioctl getrules -f <name nic> -> Option -s Firewall Statistik
vsipioctl getaddrset -f <name nic>
vsipioctl getflows -f <name nic>
vsipioctl getfwconfig -f <name nic>
### Hilfe Menü
vsipioctl -h
|
pktcap-uw
ESXTOP
Net-stats
1
| Net-stats -l -> PortNum
|
ESXCLI
1
| esxcli network nic list -> Name
|
summarize-dvfilter -> Name
–dir 0 – capture incoming traffic –dir 1 – capture outgoing traffic –dir 2 – capture both traffic
–stage 0 – before traffic dvfilter –stage 1 – after traffic dvfilter
Beispiel für die Verwendung von pktcap-uw
1
2
3
| pktcap-uw --switchport <port nummer> --dir 0 -o capture.pcap
pktcap-uw –vmk vmk10 –dir 2 -o – | tcpdump-uw -enr –
pktcap-uw --switchport <port nummer> --trace
|