


To filter the event log, click onįilter current log in the right-pan of the event viewer. Service startup time, we must filter the event ID 17162. You can see the numerous events that occurred on the workstation.
LOG FILE MONITOR UPTIME WINDOWS
In the event viewer MMC (Microsoft Management console), expand Windows Logs Click onĪpplication. Open Control Panel OpenĪdministrative tools Click on Event viewer. We can view the SQL Server instance uptime from the windows event viewer. The Server startup time is in HH: MM AM/PM format.Īs you can see in the above screenshot, the server startup time is 12:10 AM.

Is in the Server Startup Time dashboard of the Configuration Details grid. In the server dashboard report, you can view the details of the SQL Server instance. The SQL Server connection Hover on Reports Hover on Standard Reports Click on Server dashboard. Monitor the real-time performance of the SQL Server instances and the databases. We can view the SQL Server instance uptime from the SQL Server monitoring dashboard.

Note: The TempDB creation time is 00:10:14, and the value returned by the DMV is 00:10:12.953, which indicates that it took two seconds to initialize other user databases.dm_os_sys_infoĪs you can see in the above image, the SQL Server startup time is 00:10:12.953. The "10" option causes the plugin to return a CRITICAL state if the MRTG log file is older than 10 minutes (it should be updated every 5 minutes).Select sqlserver_start_time as from sys. The "5000000,5000000" are critical thresholds (in bytes) for incoming and outgoing traffic rates respectively. The "1000000,2000000" options are the warning thresholds (in bytes) for incoming and outgoing traffic rates respectively. The "AVG" option tells it that it should use average bandwidth statistics. In the example above, the "/var/lib/mrtg/192.168.1.253_1.log" option that gets passed to the check_local_mrtgtraf command tells the plugin which MRTG log file to read from. Here's the service definition I use to monitor the bandwidth data that's stored in the log file. In my example, I'm monitoring one of the ports on a Linksys switch. You'll need to let the check_mrtgtraf plugin know what log file the MRTG data is being stored in, along with thresholds, etc. The check_mrtgtraf plugin (which is included in the Nagios plugins distribution) allows you to do this. If you're monitoring bandwidth usage on your switches or routers using MRTG, you can have Nagios alert you when traffic rates exceed thresholds you specify. Tip: You can usually find the OIDs that can be monitored on a switch by running the following command (replace 192.168.1.253 with the IP address of the switch): There are a million things that can be monitored via SNMP, so its up to you to decide what you need and want to monitor. That's it for the SNMP monitoring example. The "-m RFC1213-MIB" is optional and tells the check_snmp plugin to only load the "RFC1213-MIB" instead of every single MIB that's installed on your system, which can help speed things up. The "-r 1" option tells the check_snmp plugin to return an OK state if "1" is found in the SNMP result (1 indicates an "up" state on the port) and CRITICAL if it isn't found. In the example above, the "-o ifOperStatus.1" refers to the OID for the operational status of port 1 on the switch. If you want to ensure that a specific port/interface on the switch is in an up state, you could add a service definition like this:Ĭheck_command check_snmp!-C public -o ifOperStatus.1 -r 1 -m RFC1213-MIB In the check_command directive of the service definition above, the "-C public" tells the plugin that the SNMP community name to be used is "public" and the "-o sysUpTime.0" indicates which OID should be checked. Use generic-service Inherit values from a templateĬheck_command check_snmp!-C public -o sysUpTime.0 If it doesn't, skip this section.Īdd the following service definition to monitor the uptime of the switch. If your switch or router supports SNMP, you can monitor a lot of information by using the check_snmp plugin.
