z

Commercial Support Clients: Clients with support contracts can get escalated support assistance by visiting Nagios Answer Hub. These forums are for community support services. Although we at Nagios try our best to help out on the forums here, we always give priority support to our support clients.

Automate Excel with VBScript to process Nagios Logs

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.

Automate Excel with VBScript to process Nagios Logs

Postby FramJamesgot » Thu Sep 29, 2022 2:20 am

I'm using VBScript to extract a LOG file from Nagios XI. I have automated a script that will use IE.Aplication navigate, choose the right parameters (to filter) and export as CSV (Excel usable). That has been done!

Now I want to filter MORE (of what Nagios can't do). I have multiple logs of CPU, and I want to DELETE ALL the rows contain this word. I found lots of scripts in VBA, but the problem in my case that I override the file each use this is the vba script I use (in another Excel). I need to change it to work from "outside" of the application (meaning from the main script)

Sub CellColor(rng As Range)
For Each row In rng.Rows
For Each cell In row.Cells
If cell.Value = ActiveCell.Value Then '--- The Condition of the function
cell.Style = "Bad" '--- Changing the "Style" atribbute
Else
cell.Style = "Good" '--- Changing the "Style" atribbute
End If
Next cell
Next row
End Sub
Can any body advise on how to convert this?
FramJamesgot
 
Posts: 6
Joined: Wed Jun 29, 2022 3:02 am

Return to Open Source Nagios Projects

Who is online

Users browsing this forum: No registered users and 16 guests