Verpassen Sie nicht den AnschlussDie Informationstechnologie schreitet zügig voran. Neue Applikationen kommen immer schneller auf den Markt. Die Anforderungen an Ihre IT-Systeme steigen stetig.Mit einer IT-Infrastruktur welche wirtschaftlich und technologisch auf dem Stand der Zeit ist, ist es Ihnen möglich effizient und kostengünstig Ihre Leistungen am Markt anzubieten. |
![]() |
Linux: "Asynchrone FTP Schnittstelle"
Einfach mit einen Unix Editor eine Shellscript-Datei erzeugen. Zum Beispiel "vi /usr/bin/local/copy_nagios_to_itsm.sh". Die Scriptcode reinkopieren und speichern. Jetzt nur noch die Datei mit "chmod -x /usr/bin/local/copy_nagios_to_itsm.sh" ausführbar machen. Die Datei kann jetzt mit root-Rechten /usr/bin/local/install_csync.sh ausgeführt werden.
| Haftungsausschluss beachten! |
|
#!/bin/bash # Don't delete this script! # This ist the location where Nagios creates the export files for ITSM (SAP-PM) TRANSFER="/var/transfer" # The remote target directory TARGETDIR="/nagios" # The interval should not be less than two minutes and not longer than the CRON job schedule INTERVALL=2 # FTP Konfiguration ftps="???" # FTP target server ftpu="???" # FTP user tppp="???" # FTP password ########################################## # Do not change anything below this line # ########################################## && mkdir -p $TRANSFER/move/ for i in $(find $TRANSFER -maxdepth 1 -type f -mmin +$INTERVALL -print) do mv -uf $i $TRANSFER/move/ done if [ `ls /var/transfer/move/ | wc -l` -ge 0 ]; then ftp -ni $ftps < quote USER $ftpu quote PASS $tppp lcd $TRANSFER/move/ cd $TARGETDIR mput * quit EOF # FTP success/error handler if [ `cat /tmp/nagios_to_itsm.log | wc -l` -le 2 ]; then rm $TRANSFER/move/* else echo "`date '+%b %d %X'` Error: Schnittstelle zwischen Nagios und ITSM ist gestoert!" >>/var/log/messages fi fi exit |





