Product:
Microsoft Windows Server
Issue:
How configure the agent-config.yaml file to work?

Solution:
The new windows agent for Grafana Cloud should make it easy to collect some metrics from your  computers to the dashboard in the cloud.

Sign up for a account at https://grafana.com/auth/sign-up/create-user?pg=dl&plcmt=box-right


Download the agent and install the agent from here https://grafana.com/blog/2021/04/22/weve-added-first-class-windows-support-to-grafana-agent/

If you click “Get Started with Grafana”, from your grafana.net page, you will see a list of local agent you can install to collect metrics (data) from your system. Click on Windows exporter and Next.

After you have configure the windows agent, as below, you can go back to this page and click “Test integration and finish installation”.

There is a default agent-config.yaml file created, where you need to add your url and username to make the agent ship data to the grafana cloud.
You get your Password (API key) on your host page – go to your name under grafana cloud, and then click on prometheus details to get the key and urls.  Click on grafana details to go to your cloud dashboard.

You need to copy the following values, and place in your yaml file.
Remote Write Endpoint (Use this URL to send Prometheus metrics to Grafana Cloud.)
Username / Instance ID (Your Grafana Cloud Prometheus username.)
Password / API Key (Your Grafana Cloud API Key. Be sure to grant the key a role with metrics push privileges.)

Open C:\Program Files\Grafana Agent\agent-config.yaml in notepad++ on your computer.

You need to add the lines remote_write (very important that every line is indent with two spaces)

remote_write:
  - url: https://prometheus-blocks-prod-us-central1.grafana.net/api/prom/push
    basic_auth:
      username: (the user number from your account)
      password: (the long password from your account)

In YAML file is important to indent the text correct, and the order of the lines, have a meaning. Above setup worked for me, to send data to the grafana cloud. You may find other configurations, also work well.

Then go to your grafana.net page, and select “integration – Windows Exporter” dashboard.

Monitoring Windows Services with Grafana, InfluxDB ‎and Telegraf

You will soon fill up your free account, so you must limit the services that is reported up to the cloud.

Add last to your agent-config.yaml file this lines, to limit the information collected:

 # List of collectors to enable
 enabled_collectors: "cpu,system,os,cs,time"

You can copy your text to a YAML checker: https://codebeautify.org/yaml-validator

Here is some information of possible values in the file:

cpu CPU usage
cpu_info CPU Information
cs “Computer System” metrics (system properties, num cpus/total memory)
net Network interface I/O
os OS metrics (memory, processes, users)
process Per-process metrics
remote_fx RemoteFX protocol (RDP) metrics
service Service state metrics
smtp IIS SMTP Server
system System calls

https://github.com/prometheus-community/windows_exporter/blob/master/README.md

https://grafana.com/grafana/dashboards/6593

More Information:

https://github.com/prometheus-community/windows_exporter

https://github.com/grafana/agent/blob/main/docs/configuration/integrations-config.md#windows_exporter_config

For a full description of configuration options, see windows_exporter_config in the Grafana Agent documentation.

After installation, the Agent config is stored in C:\Program Files\Grafana Agent\agent-config.yaml. Anytime the config file is modified, run the following to restart the Windows Agent so it can pick up changes:

sc stop "Grafana Agent" 
sc start "Grafana Agent"

https://grafana.com/blog/2020/07/02/getting-started-with-the-grafana-agent-a-remote_write-focused-prometheus-agent/ 

Windows Server Monitoring using Prometheus and WMI Exporter

https://devconnected.com/how-to-setup-grafana-and-prometheus-on-linux/

https://prometheus.io/download/

https://githubmemory.com/repo/prometheus-community/windows_exporter/issues/757

https://grafana.com/docs/grafana-cloud/how-do-i/control-prometheus-metrics-usage/usage-reduction/

https://grafana.com/docs/grafana-cloud/how-do-i/control-prometheus-metrics-usage/usage-analysis-explore/ 

https://grafana.com/tutorials/grafana-fundamentals/

Product:
Microsoft Windows 2019 server

Issue:
Problem to connect to Remote Desktop from old laptop.

Solution:

Newer Microsoft Windows server has the possible to harden the communication, to not use old security protocols, then it will not allow connections from Windows 2012 or Windows 7 computers.

Try to connect from a Windows 10 computer with the latest service packs.

 

More information:

https://support.microsoft.com/en-us/topic/microsoft-security-advisory-update-for-disabling-rc4-479fd6f0-c7b5-0671-975b-c45c3f2c0540

https://support.microsoft.com/en-us/topic/rc4-cipher-is-no-longer-supported-in-internet-explorer-11-or-microsoft-edge-f8687bc1-1f88-9abe-5c81-b00c26290f36#bkmk_more

https://death-to-ie11.com/

https://www.syvik.com/multidesk/documentation.en.html

Product:
Microsoft Windows 2019

Issue:
Message when you try to add a schedule

Solution:

On the local server use Local Security Policy manager:

  1. Click START and type secpol.msc then press Enter
  2. Expand Security Settings > Local Policies > User Rights Assignment node
  3. Double click Log on as a batch job
  4. Click the Add User or Group button and add your service account user
  5. Click OK

You should use a service account that is part of the administrator group, to ensure it have rights to do the task you have in your cmd script file.

More Information:
https://www.urtech.ca/2019/06/solved-this-task-requires-that-the-user-account-specified-has-log-on-as-batch-job-rights/

Product:
BigFix Client
Microsoft Windows 2012

Problem:
How install the Big Fix client/agent on the Windows server?

Solution:
On the ILMT linux server you can search for the client files with find . -name ClientMSI*

Copy the files you need over to your Windows server

Copy BigFixAgent.msi setup, its .mst files and the actionsite.afxm masthead file to a folder of your target computer, for instance C:\install\bigfix. Actionsite.afxm file is in the /var/opt/BESInstallers/Client folder of the Linux server.

Then create a CMD file with following content:

msiexec.exe /i “BigFixAgent.msi” TRANSFORMS=”1033.mst” REBOOT=ReallySuppress MSIRESTARTMANAGERCONTROL=Disable /qn

Start a DOS prompt as administrator and go to the \install\bigfix folder

Run your installagent.cmd file, to install.

If you run the BIGFIXAGENT.MSI it can look like this

You will have a new “BES Client” windows service on your computer after the installation.

You must copy the actionsite.afxm file to the folder C:\Program Files (x86)\BigFix Enterprise\BES Client to make the client start.

Client/Agent can be downloaded from https://support.bigfix.com/bes/release/10.0/patch2/

More information:

https://help.hcltechsw.com/bigfix/9.5/platform/Platform/Installation/c_installing_the_client_with_msi.html

https://help.hcltechsw.com/bigfix/9.5/platform/Platform/Installation/c_using_login_scripts.html

https://cdn2.hubspot.net/hubfs/1697611/Events/Webinar.%20Basic%20ILMT%20Skills%20for%20IT%203.16.17.pdf

https://www.ibm.com/software/passportadvantage/subcaplicensing.html

https://exploringtm1.com/tm1-ilmt/

Product:

Microsoft Powershell

Problem:
You are low on disk space, or the Cognos BI have created some large file (dump files or log files) and you want to know where they are.

Solution:
Enter below text in notepad++ and save as checksize.ps1 in your c:\temp folder

$folder = “C:\Program Files\ibm\cognos”
Get-ChildItem $folder -recurse -ErrorAction SilentlyContinue |Sort-Object length -descending| Select-Object -first 27 @{Name=”MegaBytes”;Expression={“{0:F2}” -f ($_.length/1MB)}} , Fullname | Export-Csv c:\temp\LargeFiles_Report.csv

Start Powershell from Start menu
Go to temp folder with command cd /temp
Enter ./checksize.ps1 to run the script


Open the Largefile_report.csv in notepad++

You need to change the first line to your folder for Cognos products e.g. $folder = “D:\Program Files\ibm\cognos\analytics”

Then you check the list to find the files that you do not need, and can remove them, to get more space.

More Information:
https://www.linkedin.com/pulse/powershell-script-finding-large-size-files-your-windows-milad-mousavi/?articleId=6610936483329257472

http://woshub.com/find-large-files-with-powershell/ 

https://blog.danskingdom.com/find-largest-or-smallest-files-in-a-directory-or-drive-with-powershell/