My friend, this is the logs in loglevel 5 on the nas
Oct 11 10:41:30:178 [140635943184192] nas: ****************[ Starting ]****************
Oct 11 10:41:30:178 [140635943184192] nas: nas 9.06, Oct 19 2018
Oct 11 10:41:30:178 [140635943184192] nas: Copyright 2013, CA. All rights reserved.
Oct 11 10:41:30:296 [140635943184192] nas: No longer checking for restricted hub license
Oct 11 10:41:30:296 [140635943184192] nas: NAS Services called using mode: 1
Oct 11 10:41:30:297 [140635943184192] nas: Scripting license is available.
Oct 11 10:41:30:305 [140635815053056] nas: maint: Successful registration to: maintenance_mode
Oct 11 10:41:30:359 [140635764696832] nas: The Activity-Logger is not initialized...
Oct 11 10:41:30:363 [140635943184192] nas: corrInitialize: Last Alive Time: 1570808460
Oct 11 10:41:30:374 [140635943184192] nas: nsInitialize stats: 1 elements in 101 blocks
Oct 11 10:41:30:426 [140635781482240] nas: nisInitialize: NOT enabling batch mode
Oct 11 10:41:30:429 [140635781482240] nas: _nisQueueDatabaseCreate: Dropped old NIS_QUEUE table from nisqueue.db
Oct 11 10:41:30:562 [140635013117696] nas: Successfully attached to HUB.
Oct 11 10:41:30:678 [140635781482240] nas: nisInitialize completed
Oct 11 10:41:50:462 [140635281553152] nas: (AO) failed to execute script 'ScriptTest', error: scripts/ScriptTest:1: attempt to index global 'al' (a nil value)
Oct 11 10:42:55:656 [140635281553152] nas: (AO) failed to execute script 'ScriptTest', error: scripts/ScriptTest:1: attempt to index global 'al' (a nil value)
Original Message:
Sent: 10-11-2019 08:08 AM
From: Gene HOWARD
Subject: How starting 2 process in specific order when a process it's down
HI I would need you to post the full LUA script for me to review.
many Lua scripts can not be run or tested from the editor because the do a get call for an alarm which of course fails in the editor.
If you have a get alarm in the first couple of lines this is probably your issue and why you are getting a null value.
You will need to create the alarm and test it.
Put in lots of print statements and monitor the nas.log file to understand if it is working or not.
------------------------------
Gene Howard
Principal Support Engineer
Broadcom
Original Message:
Sent: 10-10-2019 06:07 PM
From: Miller Grisepe Echagarreta Parra
Subject: How starting 2 process in specific order when a process it's down
Thanks @Gene Howard
I am test this solution and I think I only need a little to achieve the goal.
I need you help one more time. I am testing this script I found at the community CA, written by @RowanCollis but not working for me, I don't know what is bad.
Original Message:
Sent: 10-10-2019 03:57 PM
From: Gene HOWARD
Subject: How starting 2 process in specific order when a process it's down
1) install nexec on the same machine as the process probe.
2) set up a profile in nexec to execute the batch file and test it.
3) when the process alarm comes in for either of the processes have an AO profile that executes a script to call the batch file.
I would make sure this is done on overdue say 2 minutes or something. the batch file will cause the other profile to send an alarm and you do not want to execute the same script again immediately. You may have to play around with the timing.
Please are some good threads on using nexec with nas
https://community.broadcom.com/communities/community-home/digestviewer/viewthread?MID=741091#bm278ca8f3-9ce2-4912-b26d-f7f2ae442603
https://community.broadcom.com/communities/community-home/digestviewer/viewthread?MID=769105#bm760f76c4-8071-4577-9e76-be9ce203cd82
------------------------------
Gene Howard
Principal Support Engineer
Broadcom
Original Message:
Sent: 10-10-2019 11:56 AM
From: Miller Grisepe Echagarreta Parra
Subject: How starting 2 process in specific order when a process it's down
Thank you very much @Gene Howard
I am see the procedure but I don't how connect it to server for execute the .bat. My intention is with processes probe generate alarm when process it's down and with NAS execute script that connect to server and run the .bat. Is possible this?
Thanks again for all
Original Message:
Sent: 10-10-2019 11:14 AM
From: Gene HOWARD
Subject: How starting 2 process in specific order when a process it's down
if you scroll to the very bottom of the kb you will see the attached zip files with the images in them for you to review.
------------------------------
Gene Howard
Principal Support Engineer
Broadcom
Original Message:
Sent: 10-10-2019 10:51 AM
From: Miller Grisepe Echagarreta Parra
Subject: How starting 2 process in specific order when a process it's down
Hi Gene
Thanks for you comments, I appreciate.
The link that you send me all images i can't see. Is possible send me the information directly to my email (mechagarreta@netreadysolutions.com) or other link that working fine?
Original Message:
Sent: 10-10-2019 09:04 AM
From: Gene HOWARD
Subject: How starting 2 process in specific order when a process it's down
so yes if you have two profiles set up and both stoping and starting each other I would expect this to fail.
Your idea of using nas is a good one.
I would suggest nas in conjunction with nexec.
An example of this would be the below KB
https://ca-broadcom.wolkenservicedesk.com/external/article?articleId=9658
------------------------------
Gene Howard
Principal Support Engineer
Broadcom
Original Message:
Sent: 10-09-2019 05:48 PM
From: Miller Grisepe Echagarreta Parra
Subject: How starting 2 process in specific order when a process it's down
Hi @Gene Howard It's working with "Command path", but I see that this isn't functional because this enters a loop. I will try explain.
processA ----> Monitoring with processes probe.
processB ----> Monitoring with processes probe.
When down processA, the .bat should start the process in order, first processA and after.processB
If processB it's down, the .bat should start in order too, first processA and after.processB
I'm thinking in other strategy, monitoring both processes with the processes probe and when them down with AO, create a filter "Action type = script" to execute a script that connect to the server and execute the .bat.
The problem is that i don't know how can be this script i don't know anything of Perl and I don't know how is the parameter for connect to server
What do you think?
If you know how can be this script please help me.
Thanks for all.
Original Message:
Sent: 10-09-2019 01:16 PM
From: Gene HOWARD
Subject: How starting 2 process in specific order when a process it's down
I do not see why just changing the command path to the full path of your batch files would not work.
Have you tried that?
Did you run into a problem?
------------------------------
Gene Howard
Principal Support Engineer
Broadcom
Original Message:
Sent: 10-09-2019 12:27 PM
From: Miller Grisepe Echagarreta Parra
Subject: How starting 2 process in specific order when a process it's down
Hi all.
I have a challenge. We need monitoring a process of an application and when this process it's down somehow run a .bat that stop and start two processes in order.
I'm thinking of doing this with process probe and when the process it's down, with the probe execute the .bat and from here start the process down and another process necessary for my application.
My question is, can I use process probe for this monitoring?. If isn't possible with process probe, exist other strategy for this monitoring?
Process in monitoring ----->
Can I to use the "Command path" or "Command arguments" or "Start directory" for starting a .bat?