ich möchte ein Nagios Plugin (aus check_sap.pl soll check_sap.py werden) schreiben und bin schon recht weit - jetzt hänge ich aber an der Stelle wo ich die Ausgabe des aufgerufenen Programms auswerten soll...
ich rufe das das Programm so auf
Code: Alles auswählen
output = os.popen(command,"r")
Code: Alles auswählen
output = os.popen(command,"r")
line = 1
while line:
line = output.readline()
if not line: break
print line
AUSGABE:
Code: Alles auswählen
SAP System Information
-----------------------------------------------
Destination dbk22host_K22_00
Host dbk22host
System ID K22
Database K22
DB host dbk22host
DB system ORACLE
SAP release 701
SAP kernel release 701
RFC Protokoll 011
Characters 4103 (UNICODE PCS=2)
Integers LIT
Floating P. IE3
SAP machine id 390
Timezone 3600 (Daylight saving time)
if host = 2. Argument in Zeile mit HOST und SID = 2. Argument in Zeile mit System ID....
hab schonwas probiert mit split() - aber komm da leider nicht weiter...
kann mir hier jemand helfen...?