# Queries & Suggestion about Licode Monitoring

**URL:** <https://discourse.lynckia.com/t/queries-suggestion-about-licode-monitoring/583>\
**Category:** Support\
**Created:** [August 30, 2017, 5:46am UTC](https://discourse.lynckia.com/t/queries-suggestion-about-licode-monitoring/583 "2017-08-30T05:46:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![HemanthAnakapalle](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.lynckia.com/hemanthanakapalle/32/144_2.png) [@HemanthAnakapalle](https://discourse.lynckia.com/u/HemanthAnakapalle)\
**Post date:** [August 30, 2017, 5:46am UTC](https://discourse.lynckia.com/t/queries-suggestion-about-licode-monitoring/583/1 "2017-08-30T05:46:39Z")

</div>

Hi Team,

Currently **initLicode .sh** script will only bring the licode node process up.  
But it won’t monitor (up & running?) those node process. @Suggestion - Better we can come up with monitoring scripts.

To overcome this, we have a python script integrated to upstart, which monitor and ensures licode service is always up & running.

NOTE: Upstart is a linux monitoring utility.

## Please find our current monitoring flow:

- Python script - Accepts 2 arguments - start/stop

- Python script - start - executes **initLicode .sh** script (It stores pid’s of all licode node process)

- In a infinite loop, It fetches current pid’s of licode node process and matches with stored values.

- If there is a mismatch/pid doesn’t exists (even for 1 node process) , it will kill all the licode node process & executes the start up flow again.

- Python script - stop - will kill all the licode node process (This is issued through upstart command)

**`We are thinking to revamp our current approach for better solution.`**

## Our new Approach:

- Replacing **initLicode .sh** script with 3 upstart configurations for all licode process - nuve, erizoController, erizoAgent

- Upstart will bring those node process up and monitors. (It wont follow any sequence - all are independent)

- NOTE: In case, if one process is down, it will just bring that specific one up.

Is this fine?  
Can you please guide us, which way is the ideal way?

## Queries:

1. Is there any dependency between licode node process - nuve, erizoController & erizoAgent?

2. If erizoAgent is down, is it enough to start only the erizoAgent process (or) do we need to kill all and start all again?

3. Is there any sequence that we need to follow while bringing up the licode node process - nuve, erizoController, erizoAgent?

> **If any better solutions are already available, please share here.**

Thanks & Regards,  
Hemanth

---

<div class="post-metadata">

**Author:** ![Francesco\_Durighetto](https://avatars.discourse-cdn.com/v4/letter/f/a9a28c/32.png) [@Francesco\_Durighetto](https://discourse.lynckia.com/u/Francesco_Durighetto)\
**Post date:** [August 30, 2017, 4:07pm UTC](https://discourse.lynckia.com/t/queries-suggestion-about-licode-monitoring/583/2 "2017-08-30T16:07:24Z")

</div>

I think you are in the right path with

> Replacing initLicode .sh script with 3 upstart configurations for all licode process - nuve, erizoController, erizoAgent

I also use this approach with initV.  
there are also other “easier” way to do that: ex. pm2 but I like the old fashioned way

---

<div class="post-metadata">

**Author:** ![HemanthAnakapalle](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.lynckia.com/hemanthanakapalle/32/144_2.png) [@HemanthAnakapalle](https://discourse.lynckia.com/u/HemanthAnakapalle)\
**Post date:** [August 31, 2017, 4:19am UTC](https://discourse.lynckia.com/t/queries-suggestion-about-licode-monitoring/583/3 "2017-08-31T04:19:10Z")

</div>

Thanks for the reply Francesco.

But how about dependency between nuve, erizoController & erizoAgent?  
We need not start them in a specific sequence at any point of time?

---

<div class="post-metadata">

**Author:** ![Francesco\_Durighetto](https://avatars.discourse-cdn.com/v4/letter/f/a9a28c/32.png) [@Francesco\_Durighetto](https://discourse.lynckia.com/u/Francesco_Durighetto)\
**Post date:** [August 31, 2017, 9:01am UTC](https://discourse.lynckia.com/t/queries-suggestion-about-licode-monitoring/583/4 "2017-08-31T09:01:34Z")

</div>

obviously nuve has to be running since it handles the cloudhandler. then controller and agents self register them in nuve, so no problem with timings

---

<div class="post-metadata">

**Author:** ![HemanthAnakapalle](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.lynckia.com/hemanthanakapalle/32/144_2.png) [@HemanthAnakapalle](https://discourse.lynckia.com/u/HemanthAnakapalle)\
**Post date:** [August 31, 2017, 12:34pm UTC](https://discourse.lynckia.com/t/queries-suggestion-about-licode-monitoring/583/5 "2017-08-31T12:34:28Z")

</div>

You are saying sequence matters? … It have to be like nuve, erizoController, erizoAgent?

(or)

Just can we be bring all three up … irrespective of the sequence?

---

<div class="post-metadata">

**Author:** ![Francesco\_Durighetto](https://avatars.discourse-cdn.com/v4/letter/f/a9a28c/32.png) [@Francesco\_Durighetto](https://discourse.lynckia.com/u/Francesco_Durighetto)\
**Post date:** [September 1, 2017, 7:03am UTC](https://discourse.lynckia.com/t/queries-suggestion-about-licode-monitoring/583/6 "2017-09-01T07:03:53Z")

</div>

My script starts them all in order (nuve, controller, agent), for sure nuve has to be started before the other 2. Idk if you can start agent before controller.  
Anyway it’s a simple test to make
