监控AppFabric缓存 [英] Monitoring AppFabric Cache
问题描述
我在3台服务器(AppFabric 1.1)上都有一个HighlyAvailable AppFabric缓存设置.我想监视每台服务器上的本地缓存,如果由于某种原因它关闭了,请备份它.
I have a HighlyAvailable AppFabric cache setup across 3 servers (AppFabric 1.1). I want to monitor the local cache on each server and, if it is down for any reason start it back up.
问题是权限-我编写了Powershell脚本来执行此操作,如果我在登录时运行或设置了计划任务以自己身份运行它,则效果很好-但我是所有计算机上的管理员.如果我尝试与服务用户一起运行此脚本,它将失败.我不想让我的服务用户成为所有3台计算机上的管理员.
The problem is permissions - I wrote a Powershell script to do this, and it works great if I run while logged in or set up a Scheduled Task to run it as me - but I am an administrator on all machines. If I try running this script with a service user, it fails. I don't want to make my service user an administrator on all 3 machines.
- 是否有一种方法可以在不以管理员身份运行的情况下使其正常运行?还有其他人这样做吗?
- 是否还有另一种方法可以监视这些高速缓存并在它们消失时重新启动它们?我很高兴抛弃我的powershell脚本(虽然不高兴,但我会:).
我知道我可以登录到服务器并以管理员身份运行缓存管理Windows PowerShell",然后发出以下命令来检查本地节点的状态:
I know I can log onto the server and run 'Caching Administration Windows PowerShell' as Administrator, then issue the following commands to check the status of the local node:
Get-CacheHost localhost 22233
然后,如果出现故障,请发出以下命令将其启动:
Then, if it is down issue the following command to start it:
Start-CacheHost localhost 22233
因此,我编写了一个powershell脚本来执行此操作.除了上面提到的权限问题外,它的工作原理非常好.我没有显示该脚本,因为它与这个convo无关,但是如果有帮助,我会分享.
So, I wrote a powershell script to do this. It works great, other than the permissions issues mentioned above. I haven't shown the script because it isn't really pertinent to this convo, but I will share if it helps.
推荐答案
直接在没有管理员的情况下,真的不可能因为某些原因而无法将Powershell监视脚本作为计划的Windows任务运行吗?
Directly without admin, not really possible is there some reason that you could not run your powershell monitoring script as a scheduled windows task?
这篇关于监控AppFabric缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!