Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Directory
jetole
byjetole, December 5, 2011
If you're getting the error
: bad variable nameH
This is because it's a Windows formatted file. Not sure how a Windows formatted bash script came to exist anywhere but there is one in this release. The difference is that Linux and Unix (which includes Mac OSX) use \n for newlines in their text files while Windows uses \r\n for new lines in their text files.
To convert the file to unix format you can use the command fromdos or on some systems, the older command dos2unix.
...or you could try out my much simpler Python check I wrote to do the same thing as this script and more without requiring compiled Java binaries in order to work. It's a simple, single, Python script with no other files combined with it that you can get from either:
http://exchange.nagios.org/directory/Plugins/Databases/SQLServer/MSSQL-Job-History/details
or
https://github.com/jetole/MSSQL-Job-History
Doesn't require Java. Doesn't have Windows line endings, provides more options and gives more detailed reports.
: bad variable nameH
This is because it's a Windows formatted file. Not sure how a Windows formatted bash script came to exist anywhere but there is one in this release. The difference is that Linux and Unix (which includes Mac OSX) use \n for newlines in their text files while Windows uses \r\n for new lines in their text files.
To convert the file to unix format you can use the command fromdos or on some systems, the older command dos2unix.
...or you could try out my much simpler Python check I wrote to do the same thing as this script and more without requiring compiled Java binaries in order to work. It's a simple, single, Python script with no other files combined with it that you can get from either:
http://exchange.nagios.org/directory/Plugins/Databases/SQLServer/MSSQL-Job-History/details
or
https://github.com/jetole/MSSQL-Job-History
Doesn't require Java. Doesn't have Windows line endings, provides more options and gives more detailed reports.