@@ -62,48 +62,41 @@ memusedroundup="$(((memused + 99) / 100 * 100))"
62
62
# Hardware Property - UA-165287622-3
63
63
64
64
# # Distro.
65
- curl https://www.google-analytics.com/collect -d " tid=UA-655379-31" -d " aip=1" -d " cid=${uuidinstance} " -d " t=event" -d " ec=distro" -d " ea=${distroname} " -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
66
65
curl https://www.google-analytics.com/collect -d " tid=UA-165287622-1" -d " aip=1" -d " cid=${uuidinstance} " -d " t=event" -d " ec=distro" -d " ea=${distroname} " -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
67
66
curl https://www.google-analytics.com/collect -d " tid=UA-165287622-2" -d " aip=1" -d " cid=${uuidinstall} " -d " t=event" -d " ec=distro" -d " ea=${distroname} " -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
68
67
curl https://www.google-analytics.com/collect -d " tid=UA-165287622-3" -d " aip=1" -d " cid=${uuidhardware} " -d " t=event" -d " ec=distro" -d " ea=${distroname} " -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
69
68
70
69
# # Game Server Name.
71
- curl https://www.google-analytics.com/collect -d " tid=UA-655379-31" -d " aip=1" -d " cid=${uuidinstance} " -d " t=event" -d " ec=game" -d " ea=${gamename} " -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
72
70
curl https://www.google-analytics.com/collect -d " tid=UA-165287622-1" -d " aip=1" -d " cid=${uuidinstance} " -d " t=event" -d " ec=game" -d " ea=${gamename} " -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
73
71
curl https://www.google-analytics.com/collect -d " tid=UA-165287622-2" -d " aip=1" -d " cid=${uuidinstall} " -d " t=event" -d " ec=game" -d " ea=${gamename} " -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
74
72
curl https://www.google-analytics.com/collect -d " tid=UA-165287622-3" -d " aip=1" -d " cid=${uuidhardware} " -d " t=event" -d " ec=game" -d " ea=${gamename} " -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
75
73
76
74
# # LinuxGSM Version.
77
- curl https://www.google-analytics.com/collect -d " tid=UA-655379-31" -d " aip=1" -d " cid=${uuidinstance} " -d " t=event" -d " ec=version" -d " ea=${version} " -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
78
75
curl https://www.google-analytics.com/collect -d " tid=UA-165287622-1" -d " aip=1" -d " cid=${uuidinstance} " -d " t=event" -d " ec=version" -d " ea=${version} " -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
79
76
curl https://www.google-analytics.com/collect -d " tid=UA-165287622-2" -d " aip=1" -d " cid=${uuidinstall} " -d " t=event" -d " ec=version" -d " ea=${version} " -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
80
77
curl https://www.google-analytics.com/collect -d " tid=UA-165287622-3" -d " aip=1" -d " cid=${uuidhardware} " -d " t=event" -d " ec=version" -d " ea=${version} " -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
81
78
82
79
# # CPU usage of a game server.
83
80
if [ -n " ${cpuusedmhzroundup} " ]; then
84
- curl https://www.google-analytics.com/collect -d " tid=UA-655379-31" -d " aip=1" -d " cid=${uuidinstance} " -d " t=event" -d " ec=cpuused" -d " ea=${cpuusedmhzroundup} MHz" -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
85
81
curl https://www.google-analytics.com/collect -d " tid=UA-165287622-1" -d " aip=1" -d " cid=${uuidinstance} " -d " t=event" -d " ec=cpuused" -d " ea=${cpuusedmhzroundup} MHz" -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
86
82
curl https://www.google-analytics.com/collect -d " tid=UA-165287622-2" -d " aip=1" -d " cid=${uuidinstall} " -d " t=event" -d " ec=cpuused" -d " ea=${cpuusedmhzroundup} MHz" -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
87
83
curl https://www.google-analytics.com/collect -d " tid=UA-165287622-3" -d " aip=1" -d " cid=${uuidhardware} " -d " t=event" -d " ec=cpuused" -d " ea=${cpuusedmhzroundup} MHz" -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
88
84
fi
89
85
# # Ram usage of a game server.
90
86
if [ -n " ${memusedroundup} " ]; then
91
- curl https://www.google-analytics.com/collect -d " tid=UA-655379-31" -d " aip=1" -d " cid=${uuidinstance} " -d " t=event" -d " ec=ramused" -d " ea=${memusedroundup} MB" -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
92
87
curl https://www.google-analytics.com/collect -d " tid=UA-165287622-1" -d " aip=1" -d " cid=${uuidinstance} " -d " t=event" -d " ec=ramused" -d " ea=${memusedroundup} MB" -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
93
88
curl https://www.google-analytics.com/collect -d " tid=UA-165287622-2" -d " aip=1" -d " cid=${uuidinstall} " -d " t=event" -d " ec=ramused" -d " ea=${memusedroundup} MB" -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
94
89
curl https://www.google-analytics.com/collect -d " tid=UA-165287622-3" -d " aip=1" -d " cid=${uuidhardware} " -d " t=event" -d " ec=ramused" -d " ea=${memusedroundup} MB" -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
95
90
fi
96
91
# # Disk usage of a game server.
97
92
if [ -n " ${serverfilesdu} " ]; then
98
- curl https://www.google-analytics.com/collect -d " tid=UA-655379-31" -d " aip=1" -d " cid=${uuidinstance} " -d " t=event" -d " ec=diskused" -d " ea=${serverfilesdu} " -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
99
93
curl https://www.google-analytics.com/collect -d " tid=UA-165287622-1" -d " aip=1" -d " cid=${uuidinstance} " -d " t=event" -d " ec=diskused" -d " ea=${serverfilesdu} " -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
100
94
curl https://www.google-analytics.com/collect -d " tid=UA-165287622-2" -d " aip=1" -d " cid=${uuidinstall} " -d " t=event" -d " ec=diskused" -d " ea=${serverfilesdu} " -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
101
95
curl https://www.google-analytics.com/collect -d " tid=UA-165287622-3" -d " aip=1" -d " cid=${uuidhardware} " -d " t=event" -d " ec=diskused" -d " ea=${serverfilesdu} " -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
102
96
fi
103
97
104
98
# # CPU Model.
105
99
if [ -n " ${cpumodel} " ]; then
106
- curl https://www.google-analytics.com/collect -d " tid=UA-655379-31" -d " aip=1" -d " cid=${uuidinstance} " -d " t=event" -d " ec=servercpu" -d " ea=${cpumodel} ${cpucores} cores" -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
107
100
curl https://www.google-analytics.com/collect -d " tid=UA-165287622-1" -d " aip=1" -d " cid=${uuidinstance} " -d " t=event" -d " ec=servercpu" -d " ea=${cpumodel} ${cpucores} cores" -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
108
101
curl https://www.google-analytics.com/collect -d " tid=UA-165287622-2" -d " aip=1" -d " cid=${uuidinstall} " -d " t=event" -d " ec=servercpu" -d " ea=${cpumodel} ${cpucores} cores" -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
109
102
curl https://www.google-analytics.com/collect -d " tid=UA-165287622-3" -d " aip=1" -d " cid=${uuidhardware} " -d " t=event" -d " ec=servercpu" -d " ea=${cpumodel} ${cpucores} cores" -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
112
105
113
106
# # CPU Frequency.
114
107
if [ -n " ${cpufreqency} " ]; then
115
- curl https://www.google-analytics.com/collect -d " tid=UA-655379-31" -d " aip=1" -d " cid=${uuidinstance} " -d " t=event" -d " ec=servercpufreq" -d " ea=${cpufreqency} x${cpucores} " -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
116
108
curl https://www.google-analytics.com/collect -d " tid=UA-165287622-1" -d " aip=1" -d " cid=${uuidinstance} " -d " t=event" -d " ec=servercpufreq" -d " ea=${cpufreqency} x${cpucores} " -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
117
109
curl https://www.google-analytics.com/collect -d " tid=UA-165287622-2" -d " aip=1" -d " cid=${uuidinstall} " -d " t=event" -d " ec=servercpufreq" -d " ea=${cpufreqency} x${cpucores} " -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
118
110
curl https://www.google-analytics.com/collect -d " tid=UA-165287622-3" -d " aip=1" -d " cid=${uuidhardware} " -d " t=event" -d " ec=servercpufreq" -d " ea=${cpufreqency} x${cpucores} " -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
119
111
fi
120
112
121
113
# # Server RAM.
122
114
if [ -n " ${physmemtotal} " ]; then
123
- curl https://www.google-analytics.com/collect -d " tid=UA-655379-31" -d " aip=1" -d " cid=${uuidinstance} " -d " t=event" -d " ec=serverram" -d " ea=${physmemtotal} " -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
124
115
curl https://www.google-analytics.com/collect -d " tid=UA-165287622-1" -d " aip=1" -d " cid=${uuidinstance} " -d " t=event" -d " ec=serverram" -d " ea=${physmemtotal} " -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
125
116
curl https://www.google-analytics.com/collect -d " tid=UA-165287622-2" -d " aip=1" -d " cid=${uuidinstall} " -d " t=event" -d " ec=serverram" -d " ea=${physmemtotal} " -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
126
117
curl https://www.google-analytics.com/collect -d " tid=UA-165287622-3" -d " aip=1" -d " cid=${uuidhardware} " -d " t=event" -d " ec=serverram" -d " ea=${physmemtotal} " -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
127
118
fi
128
119
129
120
# # Server Disk.
130
121
if [ -n " ${totalspace} " ]; then
131
- curl https://www.google-analytics.com/collect -d " tid=UA-655379-31" -d " aip=1" -d " cid=${uuidinstance} " -d " t=event" -d " ec=serverdisk" -d " ea=${totalspace} " -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
132
122
curl https://www.google-analytics.com/collect -d " tid=UA-165287622-1" -d " aip=1" -d " cid=${uuidinstance} " -d " t=event" -d " ec=serverdisk" -d " ea=${totalspace} " -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
133
123
curl https://www.google-analytics.com/collect -d " tid=UA-165287622-2" -d " aip=1" -d " cid=${uuidinstall} " -d " t=event" -d " ec=serverdisk" -d " ea=${totalspace} " -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
134
124
curl https://www.google-analytics.com/collect -d " tid=UA-165287622-3" -d " aip=1" -d " cid=${uuidhardware} " -d " t=event" -d " ec=serverdisk" -d " ea=${totalspace} " -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
135
125
fi
136
126
127
+ # # Alert Stats.
128
+ if [ " ${discordalert} " == " on" ]; then
129
+ curl https://www.google-analytics.com/collect -d " tid=UA-165287622-1" -d " aip=1" -d " cid=${uuidinstance} " -d " t=event" -d " ec=alert" -d " ea=Discord" -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
130
+ fi
131
+ if [ " ${emailalert} " == " on" ]; then
132
+ curl https://www.google-analytics.com/collect -d " tid=UA-165287622-1" -d " aip=1" -d " cid=${uuidinstance} " -d " t=event" -d " ec=alert" -d " ea=Email" -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
133
+ fi
134
+ if [ " ${iftttalert} " == " on" ]; then
135
+ curl https://www.google-analytics.com/collect -d " tid=UA-165287622-1" -d " aip=1" -d " cid=${uuidinstance} " -d " t=event" -d " ec=alert" -d " ea=IFTTT" -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
136
+ fi
137
+ if [ " ${mailgunalert} " == " on" ]; then
138
+ curl https://www.google-analytics.com/collect -d " tid=UA-165287622-1" -d " aip=1" -d " cid=${uuidinstance} " -d " t=event" -d " ec=alert" -d " ea=Mailgun" -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
139
+ fi
140
+ if [ " ${pushbulletalert} " == " on" ]; then
141
+ curl https://www.google-analytics.com/collect -d " tid=UA-165287622-1" -d " aip=1" -d " cid=${uuidinstance} " -d " t=event" -d " ec=alert" -d " ea=Pushbullet" -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
142
+ fi
143
+ if [ " ${pushoveralert} " == " on" ]; then
144
+ curl https://www.google-analytics.com/collect -d " tid=UA-165287622-1" -d " aip=1" -d " cid=${uuidinstance} " -d " t=event" -d " ec=alert" -d " ea=Pushover" -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
145
+ fi
146
+ if [ " ${rocketchatalert} " == " on" ]; then
147
+ curl https://www.google-analytics.com/collect -d " tid=UA-165287622-1" -d " aip=1" -d " cid=${uuidinstance} " -d " t=event" -d " ec=alert" -d " ea=Rocket Chat" -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
148
+ fi
149
+ if [ " ${slackalert} " == " on" ]; then
150
+ curl https://www.google-analytics.com/collect -d " tid=UA-165287622-1" -d " aip=1" -d " cid=${uuidinstance} " -d " t=event" -d " ec=alert" -d " ea=Slack" -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
151
+ fi
152
+ if [ " ${telegramalert} " == " on" ]; then
153
+ curl https://www.google-analytics.com/collect -d " tid=UA-165287622-1" -d " aip=1" -d " cid=${uuidinstance} " -d " t=event" -d " ec=alert" -d " ea=Telegram" -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
154
+ fi
155
+
137
156
# # Summary Stats
138
- curl https://www.google-analytics.com/collect -d " tid=UA-655379-31" -d " aip=1" -d " cid=${uuidinstance} " -d " t=event" -d " ec=summary" -d " ea=GAME: ${gamename} | DISTRO: ${distroname} | CPU MODEL: ${cpumodel} ${cpucores} cores | RAM: ${physmemtotal} | DISK: ${totalspace} " -d " v=1" > /dev/null 2>&1
139
- curl https://www.google-analytics.com/collect -d " tid=UA-165287622-1" -d " aip=1" -d " cid=${uuidinstance} " -d " t=event" -d " ec=summary" -d " ea=GAME: ${gamename} | DISTRO: ${distroname} | CPU MODEL: ${cpumodel} ${cpucores} cores | RAM: ${physmemtotal} | DISK: ${totalspace} " -d " v=1" > /dev/null 2>&1
140
- curl https://www.google-analytics.com/collect -d " tid=UA-165287622-2" -d " aip=1" -d " cid=${uuidinstall} " -d " t=event" -d " ec=summary" -d " ea=GAME: ${gamename} | DISTRO: ${distroname} | CPU MODEL: ${cpumodel} ${cpucores} cores | RAM: ${physmemtotal} | DISK: ${totalspace} " -d " v=1" > /dev/null 2>&1
141
- curl https://www.google-analytics.com/collect -d " tid=UA-165287622-3" -d " aip=1" -d " cid=${uuidhardware} " -d " t=event" -d " ec=summary" -d " ea=GAME: ${gamename} | DISTRO: ${distroname} | CPU MODEL: ${cpumodel} ${cpucores} cores | RAM: ${physmemtotal} | DISK: ${totalspace} " -d " v=1" > /dev/null 2>&1
157
+ curl https://www.google-analytics.com/collect -d " tid=UA-165287622-1" -d " aip=1" -d " cid=${uuidinstance} " -d " t=event" -d " ec=summary" -d " ea=GAME: ${gamename} | DISTRO: ${distroname} | CPU MODEL: ${cpumodel} ${cpucores} cores | RAM: ${physmemtotal} | DISK: ${totalspace} " -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
158
+ curl https://www.google-analytics.com/collect -d " tid=UA-165287622-2" -d " aip=1" -d " cid=${uuidinstall} " -d " t=event" -d " ec=summary" -d " ea=GAME: ${gamename} | DISTRO: ${distroname} | CPU MODEL: ${cpumodel} ${cpucores} cores | RAM: ${physmemtotal} | DISK: ${totalspace} " -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
159
+ curl https://www.google-analytics.com/collect -d " tid=UA-165287622-3" -d " aip=1" -d " cid=${uuidhardware} " -d " t=event" -d " ec=summary" -d " ea=GAME: ${gamename} | DISTRO: ${distroname} | CPU MODEL: ${cpumodel} ${cpucores} cores | RAM: ${physmemtotal} | DISK: ${totalspace} " -d " el=${gamename} " -d " v=1" > /dev/null 2>&1
142
160
143
161
fn_script_log_info " Send LinuxGSM stats"
144
162
fn_script_log_info " * uuid-${selfname} : ${uuidinstance} "
0 commit comments