IBM Tivoli Storage Manager / Spectrum Protect protokolliert in Syslog
Im Rahmen unserer tiri GmbH Logmanagement Erfahrungen hat es sich gezeigt, dass es sinnvoll ist, auf bestehende Strukturen und Sicherheitseinstellungen aufzubauen und diese als Logshipper zu verwenden.
Damit der TSM Server seine Meldungen (actlog) ins Syslog protokolliert, sind folgende Einstellungen nötig:
TSM> enable events syslog all
TSM> begin eventlogging syslog
Nach einem Serverstart zeigen sich aktuelle Meldungen direkt im Syslog (hier: /var/log/messages
)
Oct 12 14:00:49 x7227 dsmserv[12141]: TSM1: ANR2741I Alert monitor has started.
Oct 12 14:00:49 x7227 dsmserv[12141]: TSM1: ANR3339I Default Label in key data base is TSM Server SelfSigned SHA Key.
Oct 12 14:00:50 x7227 dsmserv[12141]: TSM1: ANR4726I The NAS-NDMP support module has been loaded.
Oct 12 14:00:50 x7227 dsmserv[12141]: TSM1: ANR1794W TSM SAN discovery is disabled by options.
Oct 12 14:00:51 x7227 dsmserv[12141]: TSM1: ANR8439I SCSI library TS3500 is ready for operations.
Oct 12 14:00:56 x7227 dsmserv[12141]: TSM1: ANR8285I Shared Memory driver ready for connection with clients on port 1510
Oct 12 14:00:56 x7227 dsmserv[12141]: TSM1: ANR8200I TCP/IP Version 4 driver ready for connection with clients on port 1500.
Oct 12 14:00:56 x7227 dsmserv[12141]: TSM1: ANR2803I License manager started.
Oct 12 14:00:56 x7227 dsmserv[12141]: TSM1: ANR2828I Server is licensed to support Tivoli Storage Manager Basic Edition.
Oct 12 14:00:56 x7227 dsmserv[12141]: TSM1: ANR2828I Server is licensed to support Tivoli Storage Manager Extended Edition.
Oct 12 14:00:56 x7227 dsmserv[12141]: TSM1: ANR8195I The SSL TCP/IP Version 4 driver is ready for connection with clients on port 1542.
Oct 12 14:00:56 x7227 dsmserv[12141]: TSM1: ANR8196I The SSL TCP/IP administrative driver is ready for connection with clients on port 1543.
Oct 12 14:00:56 x7227 dsmserv[12141]: TSM1: ANR8598I Outbound SSL Services were loaded.
Oct 12 14:00:56 x7227 dsmserv[12141]: TSM1: ANR2560I Schedule manager started.
Oct 12 14:01:03 x7227 dsmserv[12141]: TSM1: ANR0993I Server initialization complete.
Oct 12 14:01:03 x7227 dsmserv[12141]: TSM1: ANR0916I TIVOLI STORAGE MANAGER distributed by Tivoli is now ready for use.
Oct 12 14:01:03 x7227 dsmserv[12141]: TSM1: ANR1959I Status monitor collecting current data at 02:01:03 PM.
Oct 12 14:01:04 x7227 dsmserv[12141]: TSM1: ANR1960I Status monitor finished collecting data at 02:01:04 PM and will sleep for 5 minutes.
Oct 12 14:01:09 x7227 dsmserv[12141]: TSM1: ANR0407I Session 1 started for administrator ANALYST (Linux x86-64) (Tcp/Ip localhost(50030)).
Oct 12 14:01:09 x7227 dsmserv[12141]: TSM1: ANR2017I Administrator ANALYST issued command: ISSUE MESSAGE i 'tiri: systemstart'
Oct 12 14:01:09 x7227 dsmserv[12141]: TSM1: ANR1496I tiri: systemstart
Oct 12 14:01:09 x7227 dsmserv[12141]: TSM1: ANR0405I Session 1 ended for administrator ANALYST (Linux x86-64).
Dies funktioniert auch wesentlich effektiver als der FILETEXTEXIT, der erst nach einem Flush schreibt.
Unser Startup-Skript prüft auf die Meldung ANR0993I und sendet dann als Nur-Lese User eine informelle Message, die den Systemstart bestätigt.
Dieses ist im folgenden dargestellt.
#!/bin/bash
# description: DSMSERV
# processname: dsmserv
# chkconfig: 345 15 95
TSMUSER=tsminst1
TSMGRP=tsmsrvrs
TSMERR=0
if [ $(ps -efww | grep dsmser[v] | wc -l) -gt 0 ]; then
echo "127 - dsmserv might already run"
TSMERR=2
exit ${TSMERR}
fi
iscsiadm -m discovery -t st -p 192.168.127.99:3260
iscsiadm -m discovery -t sendtargets -p 192.168.127.99
systemctl restart iscsi
systemctl restart iscsid
systemctl restart lin_tape
for MOUNTS in /tsminst1/log/active /tsminst1/log/archive /tsminst1/log/failover \
/tsminst1/db/0 /tsminst1/db/1 /tsminst1/data/dbbackup0 /tsminst1/data/dbbackup1 \
/tsminst1/data/u149455
do
if [ "$(df -hP ${MOUNTS} |tail -1 | awk '{print $NF}')" != "${MOUNTS}" ] ; then
mount ${MOUNTS}
RC=$?
if [ ${RC} -ne 0 ]; then
echo "${RC} - mount error"
TSMERR=1
break
fi
else
echo ${MOUNTS} already mounted
fi
done
if [ ${TSMERR} -ne 0 ]; then
exit ${TSMERR}
fi
[ ! -d /var/log/tsm/${TSMUSER} ] && mkdir -p /var/log/tsm/${TSMUSER}
[ -e /var/log/tsm/${TSMUSER}/SERVER_CONSOLE ] && mv /var/log/tsm/${TSMUSER}/SERVER_CONSOLE{,.$(date +%Y%m%d-%H%M)} 2>&1
echo "----- $(date) -----" > /var/log/tsm/${TSMUSER}/SERVER_CONSOLE 2>&1
chown ${TSMUSER}:${TSMGRP} /var/log/tsm/${TSMUSER}/SERVER_CONSOLE
( su - ${TSMUSER} -c "/opt/tivoli/tsm/server/bin/dsmserv" >> /var/log/tsm/${TSMUSER}/SERVER_CONSOLE 2>&1 ) &
COUNT=0
until ( grep -q "^ANR0993I" /var/log/tsm/${TSMUSER}/SERVER_CONSOLE ) || [ ${COUNT} -gt 20 ]; do
echo -n .
sleep 10
COUNT=$(( COUNT + 1 ))
done
dsmadmc -errorlogname=/dev/null -id=analyst -pa=ana1yst -dataonly=yes "issue message i 'tiri: systemstart'" >/dev/null 2>&1 && echo 'successfully started' || echo "error $? - startup failed"