# Advanced Netwatch

**URL:** <https://forum.mikrotik.com/t/advanced-netwatch/158909>\
**Category:** Scripting\
**Created:** [June 22, 2022, 8:38am UTC](https://forum.mikrotik.com/t/advanced-netwatch/158909 "2022-06-22T08:38:58Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Jotne](https://forum.mikrotik.com/user_avatar/forum.mikrotik.com/jotne/32/56097_2.png) [@Jotne](https://forum.mikrotik.com/u/Jotne)\
**Post date:** [June 25, 2022, 6:21pm UTC](https://forum.mikrotik.com/t/advanced-netwatch/158909/5 "2022-06-25T18:21:35Z")

</div>

You do not need two script. Use same script for both up/down and then use the status variable to see if its up/down as I already posted above:  
[http://forum.mikrotik.com/t/tool-using-splunk-to-analyse-mikrotik-logs-4-0-graphing-everything/153043/3](http://forum.mikrotik.com/t/tool-using-splunk-to-analyse-mikrotik-logs-4-0-graphing-everything/153043/3)

Any reason for using global variable in the script? Use local variable if you do not intend to store the data for later use or use in another script.

---

_[View the full topic](https://forum.mikrotik.com/t/advanced-netwatch/158909)._
