Hi, I've got a strange date issue. I've written some local scripts to pad information onto the combo message. Here is the background:
- When you run the script by hand locally (take note of the date):
[davieb at xymonsvr ~]$ ~xymon/client/local/dateinfo dhcp-common,4.3.6,18 Jul 2020
- When I pull the information from xymon server:
[davieb at xymonsvr ~]$ ~xymon/server/bin/xymon localhost "clientlog xymonsvr section=local:dateinfo" [local:dateinfo] dhcp-common,4.3.6,Jul 18 17:44:26
Notice how the date field gets modified? I can't figure out why. The only thing I can think of is something within the xymon code, but I don't know why it would?
Here's the simple script:
[davieb at xymonsvr ~]$ cat ~xymon/client/local/dateinfo #!/bin/sh
OS=uname -s
RPM=dhcp-common
if [ ${OS} = "Linux" ]; then
VERSION=rpm -q ${RPM} --qf "%{VERSION}\n"
INSTALLED=rpm -q ${RPM} --qf "%{INSTALLTIME:date}\n"|awk {'print $2" "$3" "$4'}
fi
echo "${RPM},${VERSION},${INSTALLED}"
Does anybody have any idea what is going on?
Thanks, Dave