Hi,
I’m trying to make 2 simple node js processes and add them in process group.
This is my current setup:
2 oneagents on 2 hosts - ariel and earth.
node js source code:
#!/usr/bin/env node
setInterval(() => {
console.log(‘Process 1 is running…’);
}, 60000);
service config files content:
[Unit]
Description=My Dummy Process
After=network.target
[Service]
Environment=NODE_GROUP=nodejs-test
ExecStart=/home/deni/test_process.js
Restart=always
User=deni
Group=deni
[Install]
WantedBy=multi-user.target
I have 4 such files:
on earth:
/etc/systemd/system/test_process_1.service
/etc/systemd/system/test_process_2.service
/etc/systemd/system/test_process_3.service
on ariel:
/etc/systemd/system/test_process_1.service
I started them via systemctl start command
I saw in the documentation that there are minimum requirements for process to be detected, but also that I can manually configure simple and advanced detection rules:
1. Process availability:
2. Simple detection rule:
3. Advanced detection rule:
deni@earth:~$ ps aux | grep test_process
deni 2471839 0.9 1.3 1524292 107536 ? Ssl 15:56 3:24 node /home/deni/test_process.js
deni 2519941 0.9 1.4 1451128 113156 ? Ssl 20:25 0:55 node /home/deni/test_process.js
deni 2520441 0.9 1.3 1524392 109880 ? Ssl 20:28 0:54 node /home/deni/test_process.js
deni@ariel:~$ ps aux | grep test_process
deni 185724 3.9 0.1 12203484 126772 ? Ssl 16:48 0:01 node /home/deni/test_process.js
The final result is:
1. I have 2 process groups with 1 process in each on earth:
2. Nothing on ariel
What I don’t understand is:
1. Why there are 4 started processes, but only 2 are visible?
2. Even they have the same env variable why the simple detection rule don’t group them?
3. Why the one is shown as “node /home/deni/test_process.js” and the other as “/home/deni/test_process.js”
Thanks!
Regards, Deni















