The most recent content from our members.
I am using below script to count the files in a directory with name RTLOG_$DATE but this script is not working in SAM Template, Can some help me to modify the script correct so that I can get the output correctly and use in SAM #!/usr/bin/perl use strict; use warnings; my $date = `date +\%Y\%m\%d`; chomp($date); my…
I have a perl code for searching sites from apache2 server and checking ssl certificate expiration days for each site.code gives right result if I run it on node shell but running from solarwinds SAM templates scrip editor (GET SCRIPT OUTPUT), i'll get error "No fields were recognized in the script output:" and then…
Hi all, I'm using a perl script that returns the age of a file. In addition to that data, I want to capture the last 10 lines of that file, so that if the alert triggers I can easily see the last thing written to it. So I capture those last lines and store them as a variable "$lastlines", then print that as my message.…
Add a component using the Linux perl script. I want to run a netstat and if it doesn't give me any results it is understood as idle status and if it gives me any data the status would be active. This is my script, but I don't understand how to run the script in the Script Argument section and the Script Body part. I still…
Hey guys, our webapplication team wants to monitor specific log-files for specific entries. For example the words "memory" or "sql". After searching a bit i found the sam template "Log Parser (Perl)" for linux. After editing the template my linux colleague created some fake entries. After polling the sam template the…
I have a Linux server running Red Hat. I have a monitoring template that will tell me how many files are currently in a specific folder. I'm trying to get an alert working to where if there are more than 1 file in that folder it sends an alert. The alert part is not working. This is how I have the alert configured. This is…
Overview Since I enjoy scripting, I figured that I'd gather all of my thoughts around what is required when creating a custom script component and place it here. Hopefully it'll help as you build your own. There are two main things that the SAM script component monitor is looking for: 1. The Exit Code. Ok, I'll be honest.…
I found a script on the internet that kind of meets my needs of finding a script to determine if a linux machine has a staled NFS Mount Point. I tweeked the script a little bit to fit my environment and I have came up with the below script. I was successfully able to run the script locally on the machine but when I use SAM…
Does anyone have any thoughts on speed and/or weight of Perl vs. Bash ( or another shell ) when running script monitors? The included Perl examples seem heavy-handed at best. Eg. the one I'm looking at at the moment just runs some grep and awk commands under the blankets. Surely, this would be better accomplished using…
Hello Everyone, we've been using the log parser for linux (perl) a lot. I am not versed in scripting perl. Log Parser (Perl) I need help/assistance or guidance on how to add a new parameter that would accept regex to filter out line results (like grep -v regex) out of the first regex pattern match. Thanks!
It looks like you're new here. Sign in or register to get started.