opendns-fetchstats

Comments

105 comments

  • Avatar
    japjap (Edited )

    Just tested and did not work. My password is now like: Password6*

    cscript //NoLogo fetchstats.vbs myemailaddr@domain.com 4694xxxxx 2020-09-04 2020-09-05

    aftr enter it asks password.. enter Password6*... nada.. 

    0
    Comment actions Permalink
  • Avatar
    mcoy (Edited )

    And the password definitely works if you log straight into OpenDNS?

    This is my script.

    cscript /NoLogo OpenDNSFetchstats.vbs myemail@domain.com xx.x.xxx.xxx 2020-09-04 >file_11.09.2020_.csv

    (xx.xx. etc being my OpenDNS domain)

    Your password pretty much matches mine in terms of Cap, letters, number and special character.

    0
    Comment actions Permalink
  • Avatar
    japjap

    Actually it seems to work now. 

    So I had to change asterisk to my password. 

    I also had to change this from netwrench

    Comment or delete this line (single quote is a comment)

    ' regEx.Pattern = ".*Logging you in.*"

    Change it to this (they just changed the word, but there could be some error or other conditions this fix could miss, but it works)
    regEx.Pattern = ".*Login*"

    I also did add that 2.5min line to script and I'm now testing if it works. Already got 200 rows..then after while I got 200 rows more (=400) and let's see if it prints all out.

    Now just for curiosity you are printing data to csv file. Are you running script always manually and creating new csv file?

    Is there a way to tell script to print todays information automatically so that there would be no need to add 2020-09-05 to command (and change it everytime)?

     

    0
    Comment actions Permalink
  • Avatar
    mcoy

    I export the CSV files, per day, to a folder and then import the whole folder into Excel for analysis (using the Power Query Excel add-on). Each file is per day.

    Script it run manually every day. Like you, I'd like for it to be more automated - in fact Power Query can read directly from a web but not the paged interface of OpenDNS.

    0
    Comment actions Permalink
  • Avatar
    japjap

    Your 2.5min add works. I got full report. Thank you so much. It would be cool if 2020-09-05 could be changed to "Today" :) Then it would be easy to run it per day and create new file for everyday automatically.

    0
    Comment actions Permalink
  • Avatar
    mcoy

    Good news! Pleased it worked. Yes, totally agree re the "today". You can do a range of days and reduce frequency. Not something I've ever tried and I suspect it would take hours to run.

    0
    Comment actions Permalink
  • Avatar
    japjap (Edited )

    This seems to be an issue:

    "* I do still occasionally experience instances where the site fails to export all stats. I think the interface / server is quite fragile... Running the script again, sometimes later in the day, seems to solve the problem."

    Actually when I changed it to print csv file first file included only headings. Second run brought 800 rows. Now I'm running it third time and got 200 rows.

    So it ends script running and does not complete all pages.

    This is what I added to script (that bolded line)

    page=1
    Do While True
    Wscript.Sleep(150000) '(include time delay between pages)
    data = GetUrlData(CSVURL & "/stats/" & Network & "/topdomains/" & DateRange & "/page" & page & ".csv", "GET", "")
    If page = 1 Then

    Now I'm testing it without csv just to see if it is able to complete all pages.

    EDIT: and this is able to get only 400rows. Weird. It worked only one time.

    0
    Comment actions Permalink
  • Avatar
    mcoy

    Be interested to hear the outcome. I find there are just days when it does not work. I'd assumed an issue at the OpenDNS end.

     

    0
    Comment actions Permalink
  • Avatar
    japjap

    Yep just updated..doesnt work. You might be right. It is as hard to use from browser..

    By the way..is there any other dns services what provides reports. I could even pay for it.. :)

    0
    Comment actions Permalink
  • Avatar
    japjap (Edited )

    Tried to get report but not did not succeed. Went to browser interface and opendns says oops.. 

    Can't get anything..

    This service is awful. Have to see if there is alternative to play with.

    0
    Comment actions Permalink
  • Avatar
    japjap (Edited )

    There was stats problems in opendns and that is why I did not get anything out.

    Now that everything is working I'm testing script and it seems that after "stats problem" script never completes. Are you guys experiencing same?

    I mean it fetches report but seems like it never automatically reaches end. If I manually close cmd after waiting a while it updates csv file from 0kb to 200kb or what ever. List is perfect but for some reason cmd hangs.

    EDIT: just tested and now it works. It might be that sometimes it works and sometimes..

    0
    Comment actions Permalink
  • Avatar
    mcoy

    My hunch is that you may not be leaving the job to run long enough. I often go off, have dinner, etc etc etc... Eventually it ends and goes back to displaying the prompt ready for a new command.

    0
    Comment actions Permalink
  • Avatar
    mcoy

    Seems today's challenge is my Anti-Virus spotting malicous content in the script and not allowing it to run. regEx.Execute is the offending code...

    No idea why this has started and what to do about it...

    0
    Comment actions Permalink
  • Avatar
    japjap

    Your hunch was spot on. It's working and it takes some time.

    What antivirus are you using? I'm using trend micro and windows's own security. No problems here.

    0
    Comment actions Permalink
  • Avatar
    mcoy

    Update... 3-4 days later, and a Windows update, and it's working again. I suspect an earlier Windows Update got Windows Security / AV being a little over-enthusiastic... Just a hunch given the sequence of events.

    0
    Comment actions Permalink

Please sign in to leave a comment.