Показаны сообщения с ярлыком Monitoring. Показать все сообщения
Показаны сообщения с ярлыком Monitoring. Показать все сообщения

четверг, 24 марта 2016 г.

Windows Server 2016 TP4 Hyper-V Container fails to start with 80070002

So,

I was playing with new Windows Server containers feature the other day and for some reason Hyper-V container didn't want to start with the following error:

start-container : 'sg-cnt1' failed to start.
'sg-cnt1' failed to initialize: The system cannot find the file specified. (0x80070002).

It took some time and with help of Process Explorer I was able to conclude that WindowsServerCore image, which container host downloads, doesn't contain the template virtual drive (SystemTemplate.vhdx). You can check that NanoServer image does have the template, but not the full windows container image.

You might ask why I don't use a default (non-hyperv) containers? Well, because Microsoft has a bug and you cannot change container computer name - it will change the computer name of the host machine instead. That's why I was trying Hyper-V containers, from breif Nano container examitation I found that this type of container doesn't have this bug. Unfortunately I cannot use the Nano because I need to install some software and on Nano it's going to be difficult.

Solution:

Don't know. I need to find a correct SystemTemplate.vhdx somewhere. I'll update the post when I find.

пятница, 26 июня 2015 г.

Remove specific data from XML with PowerShell. Records from SCOM Default User MP for example

Hi,

Just to save for myself too. I was playing with XML support in PowerShell and was able to use the following to delete part of the XML. This is very useful, especialy for dealing with Operations Manager Default User Management Pack. You can select data for a specific Management Pack and delete it, so that the desired Management pack can be removed without deleting the Default User MP.
$xml = [xml](Get-Content ".\Microsoft.SystemCenter.OperationsManager.DefaultUser.xml")
$xml.ManagementPack.Monitoring.Overrides.MonitorPropertyOverride | ? {$_.Monitor -like "*Exchange*" -or $_.Context -like "*Exchange*"} | % {$_.ParentNode.RemoveChild($_)}
You can also export these contents before deleting. Like that
$xml.ManagementPack.Monitoring.Overrides.MonitorPropertyOverride | ? {$_.Monitor -like "*Exchange*" -or $_.Context -like "*Exchange*"} | % {$_.OuterXML} | Out-File .\MPO.xml

 To save the update MP, use Save method:
$xml.Save("FullPath")

пятница, 16 января 2015 г.

Netgear Stora with connected Arduino and Zabbix

Was able to install Zabbix on my Netgear Stora device. Took some time and setup code modifications were required (because mysql is lower version in Stora as well as some php addons).

Zabbix is very usefull tool to quickly configure the monitoring and notification system with ability to check metric charts and trends and set triggers and actions.

I'm using it now to monitor the free space and overall health of the Netgear Stora device, router traffic (via SNMP) and, what is more important for me - different aspects of Arduino subsystem (I have Arduino Due connected via USB). I've created a PHP script which takes commands as parameters and returns data reported by arduino. Zabbix agent is using this script to get data from Arduino. Currently I monitor RAM usage of my Arduino system (because has a dynamic tree-like memory allocation system for data reported by remote nodes), so that I can see if my Arduino is about to kaboom :) because of too many nodes reporting to the root node or just because of firmware glitch on Arduino, illumination using the photoresistor on one of the nodes (just for testing purposes), here is the chart screenshot


Also I'm collecting number of cycles certain node is unresponsive, so that zabbix can notify me if certain node is not responding anymore. I have plans to use Zabbix way of autodiscovering new nodes and automatically monitoring them, currently I've just added 2 active node manually, here is the configuration of the Zabbix item, Arduino RAM usage in this case.


Below is a config of my zabbix agent. It should be placed as a separate .conf file into zabbix_agentd.conf.d subfolder, but before that you have to uncomment the following line in the main agentd config:

Include=/opt/usr/local/etc/zabbix_agentd.conf.d/*.conf

userparameter_arduino.conf:

UserParameter=arduino.light,/opt/bin/php -f /home/sg_parser/ardu_get.php l 1 3
UserParameter=arduino.ram,/opt/bin/php -f /home/sg_parser/ardu_get.php s 0 3
UserParameter=arduino.cycles[*],/opt/bin/php -f /home/sg_parser/ardu_get.php c $1 3

All of the paramters for ardu_get.php is just to extract the numeric part of certain node, light sensor is on the node 1 for example, while RAM is on the parent or 0 node and cycles can be gathered for any discovered node.

And now non-arduino part of using Zabbix, here is free space on my Stora, Stora CPU usage and traffic via router (using SNMP data). I'm also monitoring mysql load and apache performance.