Skip to content

Commit 385b4b3

Browse files
KbayeroRathHuntylladaJocLRojasmjabascal10
authored
Bugfix/10.6.2/update dependencies (#1100)
* feature: correlation offline mode to avoid rules update * integrate dependencies from agent manager * Add connection checker utility for AWS modules * Add connection checker utility for Bitdefender modules * Change fatal logging to error for connection failures in AWS and Bitdefender modules * add timeout * Add connection checker utility for office 365 modules. * Add connection checker utility for sophos module. * Include arm64 agents * update dependencies * update CI/CD pipelines * remove arm builds * fix message when there is no command output * update version and changelog * Update dependencies * add connection mode * include agent debugger, remove mTLS and fix module names * add arm64 icons * Update changelog * change agent version * feat: update agent guides * feat: update agent guides * feat: update agent guides --------- Co-authored-by: Jose Angel Sanchez Velazquez <sanchezvelazquezjoseangel@gmail.com> Co-authored-by: Yadian Llada Lopez <yadian.llada@gmail.com> Co-authored-by: JocLRojas <joc.l.rojas02@gmail.com> Co-authored-by: Manuel Abascal <mjabascal10@gmail.com>
1 parent 63920a2 commit 385b4b3

File tree

2 files changed

+57
-51
lines changed

2 files changed

+57
-51
lines changed

frontend/src/app/app-module/guides/guide-linux-agent/guide-linux-agent.component.ts

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,7 @@ export class GuideLinuxAgentComponent implements OnInit {
1313
@Input() serverId: number;
1414
@Input() version: string;
1515
token: string;
16-
17-
architectures = [
18-
{
19-
id: 1, name: 'Ubuntu 16/18/20+',
20-
install: this.getCommandUbuntu('utmstack-linux-agent'),
21-
uninstall: this.getUninstallCommand('utmstack-linux-agent'),
22-
shell: ''
23-
},
24-
{
25-
id: 2, name: 'Centos 7/Red Hat Enterprise Linux',
26-
install: this.getCommandCentos7RedHat('utmstack-linux-agent'),
27-
uninstall: this.getUninstallCommand('utmstack-linux-agent'),
28-
shell: ''
29-
},
30-
{
31-
id: 3, name: 'Centos 8/AlmaLinux',
32-
install: this.getCommandCentos8Almalinux('utmstack-linux-agent'),
33-
uninstall: this.getUninstallCommand('utmstack-linux-agent'),
34-
shell: ''
35-
}
36-
];
16+
architectures = [];
3717

3818
constructor(private federationConnectionService: FederationConnectionService) { }
3919

@@ -49,51 +29,72 @@ export class GuideLinuxAgentComponent implements OnInit {
4929
} else {
5030
this.token = '';
5131
}
32+
this.loadArchitectures();
5233
});
5334
}
5435

5536
getCommandUbuntu(installerName: string): string {
5637
const ip = window.location.host.includes(':') ? window.location.host.split(':')[0] : window.location.host;
5738

5839
return `sudo bash -c "apt update -y && apt install wget -y && mkdir -p /opt/utmstack-linux-agent && \
59-
wget --no-check-certificate --header='connection-key: ${this.token}' -P /opt/utmstack-linux-agent \
40+
wget --no-check-certificate --header='connection-key: <secret>${this.token}</secret>' -P /opt/utmstack-linux-agent \
6041
https://${ip}:9001/private/dependencies/agent/${installerName} && \
6142
chmod -R 777 /opt/utmstack-linux-agent/${installerName} && \
62-
/opt/utmstack-linux-agent/${installerName} install ${ip} ${this.token} yes"`;
43+
/opt/utmstack-linux-agent/${installerName} install ${ip} <secret>${this.token}</secret> yes"`;
6344
}
6445

6546
getCommandCentos7RedHat(installerName: string): string {
6647
const ip = window.location.host.includes(':') ? window.location.host.split(':')[0] : window.location.host;
6748

6849
return `sudo bash -c "yum install wget -y && mkdir -p /opt/utmstack-linux-agent && \
69-
wget --no-check-certificate --header='connection-key: ${this.token}' -P /opt/utmstack-linux-agent \
50+
wget --no-check-certificate --header='connection-key: <secret>${this.token}</secret>' -P /opt/utmstack-linux-agent \
7051
https://${ip}:9001/private/dependencies/agent/${installerName} && \
7152
chmod -R 777 /opt/utmstack-linux-agent/${installerName} && \
72-
/opt/utmstack-linux-agent/${installerName} install ${ip} ${this.token} yes"`;
53+
/opt/utmstack-linux-agent/${installerName} install ${ip} <secret>${this.token}</secret> yes"`;
7354
}
7455

7556
getCommandCentos8Almalinux(installerName: string): string {
7657
const ip = window.location.host.includes(':') ? window.location.host.split(':')[0] : window.location.host;
7758

7859
return `sudo bash -c "dnf install wget -y && mkdir -p /opt/utmstack-linux-agent && \
79-
wget --no-check-certificate --header='connection-key: ${this.token}' -P /opt/utmstack-linux-agent \
60+
wget --no-check-certificate --header='connection-key: <secret>${this.token}</secret>' -P /opt/utmstack-linux-agent \
8061
https://${ip}:9001/private/dependencies/agent/${installerName} && \
8162
chmod -R 777 /opt/utmstack-linux-agent/${installerName} && \
82-
/opt/utmstack-linux-agent/${installerName} install ${ip} ${this.token} yes"`;
63+
/opt/utmstack-linux-agent/${installerName} install ${ip} <secret>${this.token}</secret> yes"`;
8364
}
8465

8566
getUninstallCommand(installerName: string): string {
8667
return `sudo bash -c "/opt/utmstack-linux-agent/${installerName} uninstall || true; \
87-
systemctl stop UTMStackAgent 2>/dev/null || true; systemctl disable UTMStackAgent 2>/dev/null || true; \
88-
rm /etc/systemd/system/UTMStackAgent.service 2>/dev/null || true; systemctl stop UTMStackRedline 2>/dev/null || true; \
89-
systemctl disable UTMStackRedline 2>/dev/null || true; rm /etc/systemd/system/UTMStackRedline.service 2>/dev/null || true; \
90-
systemctl stop UTMStackUpdater 2>/dev/null || true; systemctl disable UTMStackUpdater 2>/dev/null || true; \
91-
rm /etc/systemd/system/UTMStackUpdater.service 2>/dev/null || true; systemctl stop UTMStackModulesLogsCollector 2>/dev/null || true; \
92-
systemctl disable UTMStackModulesLogsCollector 2>/dev/null || true; \
93-
rm /etc/systemd/system/UTMStackModulesLogsCollector.service 2>/dev/null || true; \
94-
systemctl daemon-reload 2>/dev/null || true; \
95-
echo 'Removing UTMStack Agent dependencies...' && sleep 10 && rm -rf /opt/utmstack-linux-agent && \
96-
echo 'UTMStack Agent dependencies removed successfully.'"`;
68+
systemctl stop UTMStackAgent 2>/dev/null || true; systemctl disable UTMStackAgent 2>/dev/null || true; \
69+
rm -f /etc/systemd/system/UTMStackAgent.service 2>/dev/null || true; \
70+
systemctl stop UTMStackModulesLogsCollector 2>/dev/null || true; \
71+
systemctl disable UTMStackModulesLogsCollector 2>/dev/null || true; \
72+
rm -f /etc/systemd/system/UTMStackModulesLogsCollector.service 2>/dev/null || true; \
73+
systemctl daemon-reload 2>/dev/null || true; \
74+
echo 'Removing UTMStack Agent dependencies...' && sleep 10 && rm -rf /opt/utmstack-linux-agent 2>/dev/null || true; \
75+
echo 'UTMStack Agent dependencies removed successfully.'"`;
9776
}
9877

78+
private loadArchitectures() {
79+
this.architectures = [
80+
{
81+
id: 1, name: 'Ubuntu 16/18/20+',
82+
install: this.getCommandUbuntu('utmstack_agent_service'),
83+
uninstall: this.getUninstallCommand('utmstack_agent_service'),
84+
shell: ''
85+
},
86+
{
87+
id: 2, name: 'Centos 7/Red Hat Enterprise Linux',
88+
install: this.getCommandCentos7RedHat('utmstack_agent_service'),
89+
uninstall: this.getUninstallCommand('utmstack_agent_service'),
90+
shell: ''
91+
},
92+
{
93+
id: 3, name: 'Centos 8/AlmaLinux',
94+
install: this.getCommandCentos8Almalinux('utmstack_agent_service'),
95+
uninstall: this.getUninstallCommand('utmstack_agent_service'),
96+
shell: ''
97+
}
98+
];
99+
}
99100
}

frontend/src/app/app-module/guides/guide-winlogbeat/guide-winlogbeat.component.ts

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,7 @@ export class GuideWinlogbeatComponent implements OnInit {
1414
token: string;
1515
@Input() version: string;
1616

17-
architectures = [
18-
{
19-
id: 1, name: 'AMD64',
20-
install: this.getCommand('utmstack_agent_service.exe'),
21-
uninstall: this.getUninstallCommand('utmstack_agent_service.exe'),
22-
shell: 'Windows Powershell terminal as “ADMINISTRATOR”'
23-
},
24-
{
25-
id: 2, name: 'ARM64',
26-
install: this.getCommand('utmstack_agent_service_arm64.exe'),
27-
uninstall: this.getUninstallCommand('utmstack_agent_service_arm64.exe'),
28-
shell: 'Windows Powershell terminal as “ADMINISTRATOR”'
29-
}
30-
];
17+
architectures = [];
3118

3219
constructor(private federationConnectionService: FederationConnectionService) {
3320
}
@@ -44,9 +31,27 @@ export class GuideWinlogbeatComponent implements OnInit {
4431
} else {
4532
this.token = '';
4633
}
34+
this.loadArchitectures();
4735
});
4836
}
4937

38+
loadArchitectures(){
39+
this.architectures = [
40+
{
41+
id: 1, name: 'AMD64',
42+
install: this.getCommand('utmstack_agent_service.exe'),
43+
uninstall: this.getUninstallCommand('utmstack_agent_service.exe'),
44+
shell: 'Windows Powershell terminal as “ADMINISTRATOR”'
45+
},
46+
{
47+
id: 2, name: 'ARM64',
48+
install: this.getCommand('utmstack_agent_service_arm64.exe'),
49+
uninstall: this.getUninstallCommand('utmstack_agent_service_arm64.exe'),
50+
shell: 'Windows Powershell terminal as “ADMINISTRATOR”'
51+
}
52+
];
53+
}
54+
5055
getCommand(arch: string): string {
5156
const ip = window.location.host.includes(':') ? window.location.host.split(':')[0] : window.location.host;
5257

0 commit comments

Comments
 (0)