modify telemetry parameters

This commit is contained in:
Andrew Bauer 2016-02-11 13:10:36 -06:00
parent 1811d71562
commit 1b6af8afae
1 changed files with 4 additions and 1 deletions

View File

@ -57,6 +57,8 @@ use autouse 'Pod::Usage'=>qw(pod2usage);
use LWP::UserAgent;
use Sys::MemInfo;
use Sys::CPU;
use DateTime;
use POSIX qw(strftime);
$ENV{PATH} = '/bin:/usr/bin:/usr/local/bin';
$ENV{SHELL} = '/bin/sh' if exists $ENV{SHELL};
@ -87,9 +89,10 @@ if ( $Config{ZM_TELEMETRY_DATA} )
my %telemetry;
$telemetry{uuid} = getUUID();
$telemetry{ip} = getIP();
$telemetry{timestamp} = runSysCmd("date +%Y-%m-%dT%H:%M:%S%z");
$telemetry{timestamp} = DateTime->now( time_zone => "local" )->strftime("%Y-%m-%dT%H:%M:%S%z");
$telemetry{monitor_count} = countQuery("Monitors");
$telemetry{event_count} = countQuery("Events");
$telemetry{architecture} = runSysCmd("uname -m");
$telemetry{distro} = runSysCmd("uname -a");
$telemetry{release} = runSysCmd("cat /etc/*{release,version}");
$telemetry{zm_version} = ZoneMinder::Base::ZM_VERSION;