search
Categories
Sponsors
VirtualMetric Hyper-V Monitoring, Hyper-V Reporting
Archive
Blogroll

Badges

Microsoft PowerShell MVP
MCSE
Sponsors

Cozumpark Bilisim Portali
Posted in Windows Server | No Comment | 316 views | 31/10/2016 13:35

Nano Server monitoring is kind of a challenge for System Administrators. Even if your current monitoring product supports Nano Server, installing agents on Nano could be a headache.

In this article, I will show you how to monitor your Nano Server with VirtualMetric’s Bare Metal Monitoring feature.

VirtualMetric supports following Windows OS without agent and additional software requirements:

* Windows Server 2003/2003 R2
* Windows Server 2008/2008 R2
* Windows Server 2012/2012 R2
* Windows Server 2016
* Nano Server
* Windows 7/8/10

VirtualMetric Bare Metal Monitoring provides:

* More than 100 Performance Counters (All Customizable)
* Hardware Health (Currently supported hardwares are IBM, Dell, HP, SuperMicro, Fujitsu and Cisco)
* Change Tracking
* Event and Security Log Collection
* TCP Activity for Network Based Attacks like DDoS etc.
* Firewall Log Collection (Dropped & Allowed Packets)
* Assessments like Pending Updates, Hotfixes, Services, Processes etc.

First, lets start installing our Nano Server on Azure.

1. Go to your Azure Dashboard and find Nano server in compute:

capture1

2. Choose Nano Server for installation:

capture2

3. Select a deployment mode:

capture3

4. Fill username/password and other required informations:

capture4

5. Choose a size for your Nano Server:

capture5

6. Confirm settings and apply:

capture6

7. Validate summary and finish installation:

capture7

After Nano Server installation, we need to enable WinRM for remote connection. VirtualMetric uses WinRM to connect your Windows servers.

1. Go to network interfaces of Nano Server:

capture8

2. Choose your public interface:

capture9

3. Click on Security Network Group to edit:

capture10

4. Click Add button to click new Rule:

capture11

5. Create your WinRMHTTP rule like following:

winrmhttp

6. You should be able to see your rule in the rule list:

ruleadd

After finishing WinRM settings, go to VirtualMetric Dashboard and login with your username:

capture14

After login, you will see Welcome Page. Click on “Go to Settings”:

capture15

On the left menu, click on “Host Settings”:

capture16

On Host Settings, go to Host Management. Click “+” icon to add Nano Server.

capture17

Enter IP address of Nano Server. Disable “Active Directory Authentication”. Type username and password of Nano Server.

capture18

When you add your Nano Server, you will see that Host Status is “In Progress”.

capture19

After a few seconds, you will see that VirtualMetric is connected to Nano Server.

capture22

Now we can go to our Dashboard and see the results.

As you see, I can see TCP connections and Geo Activity.

capture23

I see “Ireland” connections, probably related with Microsoft activation.

Also if I go to Host Reports, I see summarized performance reports, like IO usage, memory usage etc.

capture24

I am able to see my hardware details:

capture25

If I go to Inventory Reports, I see some changes on Change Tracking:

changetracking

VirtualMetric can track any changes on your server like software installations, hotfix installation, config changes, server changes, hardware changes etc.

In Event Logs, I see some Errors on my Nano Server but they are not important:

eventlogs

I am able to see Security Logs like failed logins, successful logins etc:

capture29

I am able to track pending updates. I see that there are 2 updates waiting on my Nano Server.

capture29

I see all TCP connections via Geo Information:

capture30

I see all User Activity:

capture31

I see current Services:

capture32

There are many other reports on VirtualMetric. But best advantage is VirtualMetric Insight.

I can see all performance counters on one chart! Yes, I can see IOPS usage, Network usage and Processor usage at the same time on one chart.
This is great feature to make data correlation between performance counters.

capture33

I see all performance counters with 20 seconds interval. Thats almost realtime! :)

This is great. But what is performance impact on my Nano Server. Because collecting more than 100 performance counters, tcp activity and event logs could make some impact on my server.

We can see this usage also on VirtualMetric, but to be objective, lets use Azure Resource Usage:

performance

As you see, 20 seconds interval just makes %9 CPU usage (I have only one core) which is average of 24 Mhz cpu usage (according to CPU model and speed)!

Also lets see other activities:

ndiskac

Network and Disk Activity is also almost nothing! Because VirtualMetric uses gzip to send all usage, thats why we don’t see much network usage. Disk usage is also at normal rates.

As you see, I am able to monitor my Nano Server with just few clicks!


Posted in Windows Powershell | No Comment | 260 views | 25/06/2016 17:17

You can get detailed info about SQL Server Availability Replicas via following code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
$MSSQLServerManager = New-Object 'Microsoft.SqlServer.Management.SMO.Server'
 
# Get SQL Availability Replicas
$HostSQLAvailabilityReplica = @($MSSQLServerManager.AvailabilityReplicas)[0]
 
# Get SQL Availability Group Replicas Properties
$HostSQLName = $HostSQLAvailabilityReplica.Name;
$HostSQLAvailabilityReplicaGuid = $HostSQLAvailabilityReplica.UniqueId;
$HostSQLRole = $HostSQLAvailabilityReplica.Role;
$HostSQLAvailabilityMode = $HostSQLAvailabilityReplica.AvailabilityMode;
$HostSQLConnectionModeInPrimaryRole = $HostSQLAvailabilityReplica.ConnectionModeInPrimaryRole;
$HostSQLConnectionModeInSecondaryRole = $HostSQLAvailabilityReplica.ConnectionModeInSecondaryRole;
$HostSQLEndpointUrl = $HostSQLAvailabilityReplica.EndpointUrl;
$HostSQLFailoverMode = $HostSQLAvailabilityReplica.FailoverMode;
$HostSQLJoinState = $HostSQLAvailabilityReplica.JoinState;
$HostSQLQuorumVoteCount = $HostSQLAvailabilityReplica.QuorumVoteCount;
$HostSQLSessionTimeout = $HostSQLAvailabilityReplica.SessionTimeout;
$HostSQLBackupPriority = $HostSQLAvailabilityReplica.BackupPriority;
$HostSQLCreateDate = $HostSQLAvailabilityReplica.CreateDate;
$HostSQLDateLastModified = $HostSQLAvailabilityReplica.DateLastModified;

You can also check other properties by listing all properties of $HostSQLAvailabilityReplica.


Posted in Windows Powershell | No Comment | 253 views | 07/06/2016 00:12

You can get detailed info about SQL Server Database Replica States via following code:

1
2
3
4
5
6
7
8
9
10
11
12
$MSSQLServerManager = New-Object 'Microsoft.SqlServer.Management.SMO.Server'
 
# Get SQL Database Replica States
$HostSQLDatabaseReplicaState = @($MSSQLServerManager.DatabaseReplicaStates)[0]
 
# Get SQL Database Replica Properties
$HostSQLReplicaGuid = $HostSQLDatabaseReplicaState .AvailabilityReplicaId;
$HostSQLDatabaseID = $HostSQLDatabaseReplicaState .DatabaseID;
$HostSQLAvailabilityReplicaServerName = $HostSQLDatabaseReplicaState .AvailabilityReplicaServerName;
$HostSQLAvailabilityDatabaseName = $HostSQLDatabaseReplicaState .AvailabilityDatabaseName;
$HostSQLReplicaAvailabilityMode = $HostSQLDatabaseReplicaState .ReplicaAvailabilityMode;
$HostSQLReplicaRole = $HostSQLDatabaseReplicaState .ReplicaRole;

You can also check other properties by listing all properties of $HostSQLDatabaseReplicaState.


Posted in Windows Powershell | No Comment | 412 views | 11/05/2016 15:42

You can get detailed info about SQL Server Availability Group Listeners via following code:

1
2
3
4
5
6
7
8
9
10
$MSSQLServerManager = New-Object 'Microsoft.SqlServer.Management.SMO.Server'
 
# Get SQL Availability Group Listener
$HostSQLAvailabilityGroupListener = @($MSSQLServerManager.AvailabilityGroupListeners)[0]
 
# Get SQL Availability Group Listener Properties
$HostSQLName = $HostSQLAvailabilityGroupListener.Name;
$HostSQLAvailabilityGroupListenerGuid = $HostSQLAvailabilityGroupListener.UniqueId;
$HostSQLIPAddresses = $HostSQLAvailabilityGroupListener.AvailabilityGroupListenerIPAddresses;
$HostSQLPortNumber = $HostSQLAvailabilityGroupListener.PortNumber;

You can also check other properties by listing all properties of $HostSQLAvailabilityGroupListener.


Posted in Windows Powershell | No Comment | 341 views | 05/05/2016 16:39

You can get detailed info about SQL Server Availability Groups via following code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
$MSSQLServerManager = New-Object 'Microsoft.SqlServer.Management.SMO.Server'
 
# Get SQL Availability Groups
$HostSQLAvailabilityGroup = @($MSSQLServerManager.AvailabilityGroups)[0]
 
# Get SQL Availability Groups Properties
$HostSQLAvailabilityGroupName = $HostSQLAvailabilityGroup.Name;
$HostSQLAvailabilityGroupID = $HostSQLAvailabilityGroup.Id;
$HostSQLAvailabilityGroupGuid = $HostSQLAvailabilityGroup.UniqueId;
$HostSQLLocalReplicaRole = $HostSQLAvailabilityGroup.LocalReplicaRole;
$HostSQLAutomatedBackupPreference = $HostSQLAvailabilityGroup.AutomatedBackupPreference;
$HostSQLFailureConditionLevel = $HostSQLAvailabilityGroup.FailureConditionLevel;
$HostSQLPrimaryReplicaServerName = $HostSQLAvailabilityGroup.PrimaryReplicaServerName;
$HostSQLHealthCheckTimeout = $HostSQLAvailabilityGroup.HealthCheckTimeout;

You can also check other properties by listing all properties of $HostSQLAvailabilityGroup.


Posted in Windows Powershell | No Comment | 428 views | 24/04/2016 23:25

You can get detailed info about SQL Server Resource Pools via following code:

1
2
3
4
5
6
7
8
9
10
11
12
13
$MSSQLServerManager = New-Object 'Microsoft.SqlServer.Management.SMO.Server'
 
# Get SQL Resource Pools
$MSSQLResourcePool = @($MSSQLServerManager.ResourceGovernor.ResourcePools)[0]
 
# Get SQL Resource Pools Properties
$HostSQLResourcePoolName = $MSSQLResourcePool.Name;
$HostSQLMaximumCpuPercentage = $MSSQLResourcePool.MaximumCpuPercentage;
$HostSQLMaximumIopsPerVolume = $MSSQLResourcePool.MaximumIopsPerVolume;
$HostSQLMaximumMemoryPercentage = $MSSQLResourcePool.MaximumMemoryPercentage;
$HostSQLMinimumCpuPercentage = $MSSQLResourcePool.MinimumCpuPercentage;
$HostSQLMinimumIopsPerVolume = $MSSQLResourcePool.MinimumIopsPerVolume;
$HostSQLMinimumMemoryPercentage = $MSSQLResourcePool.MinimumMemoryPercentage;

You can also check other properties by listing all properties of $MSSQLResourcePool.


Posted in Windows Powershell | No Comment | 848 views | 13/04/2016 13:22

There is no jscript limitation on PoSHServer.

However you need to use escape characters to make it work.

If you need to use something like this:

$(function() { $.ajax({

Then you should change your codes like this:

`$(function() {`$.ajax({

` is a escape character in PowerShell.