Author Topic: Corona Renderer DrServer status job to Zabbix  (Read 1595 times)

2020-03-11, 09:08:13

mikeroygbiv

  • Users
  • *
  • Posts: 4
    • View Profile
Hello!
By chance, none of you did a monitoring of the Dr Server logs in Zabbix for example?
I had such a need, because only I have access to DrServer, and my 3D designers often ask me to see who occupied the server - and there is a problem - Dr Server displays only the IP address in GUI, that is, I have to go into the CMD and do ping with the key -a "ip-address" to see the dns name of the master pc (the name of the machine in my case is very informative, and I give an answer to my colleagues)

this is very inconvenient (developers of the crown, this is your application;))

implement at least display in the GUI dns the name of the master machine

I have already started writing a script in a powershell, with further transfer of the received data to Zabbix

if you already have any ideas, thoughts, or any other ideas, I will be very grateful to you !!

2020-03-11, 09:23:22
Reply #1

mikeroygbiv

  • Users
  • *
  • Posts: 4
    • View Profile
here is a working piece of my primitive "code" that I plan to modify to transfer data to zabbix


#set path variable
$LogPath = "\\server\C$\Users\administrator\AppData\Local\CoronaRenderer\DrData\Drlog.txt"
#Get string with iP
$Lines =  Get-Content $LogPath,$LogPath2 | Where-Object {$_ -match "Accepted remote connection from"}
#pull out last ip from $lines var
$IP = ($Lines  |  Select-String -Pattern "\d{1,3}(\.\d{1,3}){3}" -AllMatches).Matches.Value | Select-Object -Last 1
#resolve ip to DNS
Resolve-DnsName $IP -ErrorAction SilentlyContinue

#can also get the username on the master pc
#Get-WmiObject -ComputerName $IP -Class Win32_ComputerSystem | Select-Object UserName

2020-03-11, 09:37:50
Reply #2

mikeroygbiv

  • Users
  • *
  • Posts: 4
    • View Profile
I saw here only one thread on this topic
https://forum.corona-renderer.com/index.php?topic=18163.msg114098#msg114098

who used?
as I understand it, it's not free

let's join forces in creating a parser, cmd, power-shell, on anything, to subtract the necessary data from the logs, and transfer them to the zabbix
so far, my script shows who last occupied the other server, but does not show the status of the server (here, of course, you can do just monitoring the CPU and RAM)

here you need to write a condition, what is the last message - finish or start

2020-03-11, 10:01:38
Reply #3

mikeroygbiv

  • Users
  • *
  • Posts: 4
    • View Profile
slightly modified script
he became more informative

produces:

HOSTNAME
IPADDRESS

Username
--------------------------------
domain\username



#set path variable
$LogPath = "\\server\C$\Users\administrator\AppData\Local\CoronaRenderer\DrData\Drlog.txt"
#Got string with iP
$Lines =  Get-Content $LogPath | Where-Object {$_ -match "Accepted remote connection from"}
#pull out last ip from $lines var
$IP = ($Lines  |  Select-String -Pattern "\d{1,3}(\.\d{1,3}){3}" -AllMatches).Matches.Value | Select-Object -Last 1
#resolve ip to DNS
(Resolve-DnsName $IP -ErrorAction SilentlyContinue).NAMEHOST
$IP
Get-WmiObject -ComputerName $IP -Class Win32_ComputerSystem | Select-Object UserName